Ignore:
Timestamp:
Jun 21, 2023, 9:45:08 PM (13 months ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
master
Children:
6065281f
Parents:
2de175ce
Message:

change printf to sout

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/exceptions/data-except.cfa

    r2de175ce r3bf9d10  
    11// Test exceptions that add data but no functionality.
     2
     3#include <fstream.cfa>
    24
    35exception paired {
     
    1820                throw except;
    1921        } catch (paired * exc) {
    20                 printf("%s(%d, %d)\n", virtual_msg(exc), exc->first, exc->second);
     22                sout | virtual_msg(exc) | '(' | exc->first | ", " | exc->second | ')';
    2123                ++exc->first;
    2224        }
    2325
    24         printf("%s(%d, %d)\n", virtual_msg(&except), except.first, except.second);
     26        sout | virtual_msg(&except) | '(' | except.first | ", " | except.second | ')';
    2527
    2628        try {
    2729                throwResume except;
    2830        } catchResume (paired * exc) {
    29                 printf("%s(%d, %d)\n", virtual_msg(exc), exc->first, exc->second);
     31                sout | virtual_msg(exc) | '(' | exc->first | ", " | exc->second | ')';
    3032                ++exc->first;
    3133        }
    3234
    33         printf("%s(%d, %d)\n", virtual_msg(&except), except.first, except.second);
     35        sout | virtual_msg(&except) | '(' | except.first | ", " | except.second | ')';
    3436}
Note: See TracChangeset for help on using the changeset viewer.