Ignore:
Timestamp:
Jun 21, 2023, 9:45:08 PM (11 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/finally.cfa

    r2de175ce r3bf9d10  
    11// Finally Clause Tests
    22
     3#include <fstream.hfa>
    34#include "except-io.hfa"
    45
     
    1213        try {
    1314                try {
    14                         printf("termination throw\n");
     15                        sout | "termination throw";
    1516                        throw exc;
    1617                } finally {
    1718                        loud_exit a = "termination inner finally";
    18                         printf("finally during unwind\n");
     19                        sout | "finally during unwind";
    1920                }
    2021        } catch (myth * error) {
    21                 printf("termination catch\n");
     22                sout | "termination catch";
    2223        } finally {
    2324                loud_exit a = "termination outer finally";
    24                 printf("finally after catch\n");
     25                sout | "finally after catch";
    2526        }
    26         printf("\n");
     27        sout | nl;
    2728
    2829        try {
    2930                try {
    30                         printf("resumption throw\n");
     31                        sout | "resumption throw";
    3132                        throwResume exc;
    3233                } finally {
    3334                        loud_exit a = "resumption inner finally";
    34                         printf("finally after resume\n");
     35                        sout | "finally after resume";
    3536                }
    3637        } catchResume (myth * error) {
    37                 printf("resumption catch\n");
     38                sout | "resumption catch";
    3839        } finally {
    3940                loud_exit a = "resumption outer finally";
    40                 printf("finally after catch\n");
     41                sout | "finally after catch";
    4142        }
    42         printf("\n");
     43        sout | "";
    4344
    4445        try {
    45                 printf("walking out of try\n");
     46                sout | "walking out of try";
    4647        } finally {
    4748                loud_exit a = "walking finally";
    48                 printf("walking through finally\n");
     49                sout | "walking through finally";
    4950        }
    50         printf("\n");
     51        sout | "";
    5152
    5253        try {
    53                 printf("jumping out of try\n");
     54                sout | "jumping out of try";
    5455                goto endoffunction;
    5556        } finally {
    5657                loud_exit a = "jumping finally";
    57                 printf("jumping through finally\n");
     58                sout | "jumping through finally";
    5859        }
    5960        endoffunction:
Note: See TracChangeset for help on using the changeset viewer.