Changes in / [6065281f:f02f546]


Ignore:
Location:
tests/exceptions
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • tests/exceptions/.expect/polymorphic.txt

    r6065281f rf02f546  
    44
    55-7
    6 false
    7 true
     60
     71
  • tests/exceptions/cancel/coroutine.cfa

    r6065281f rf02f546  
    11// Try cancelling a coroutine.
    22
    3 #include <fstream.hfa>
    43#include <coroutine.hfa>
    54
     
    1413
    1514void main(WillCancel & wc) {
    16         sout | '1';
     15        printf("1");
    1716        cancel_stack((internal_error){&internal_vt});
    18         sout | '!';
     17        printf("!");
    1918}
    2019
    2120int main(int argc, char * argv[]) {
    22         sout | nlOff;
    2321        WillCancel cancel;
    2422        try {
    25                 sout | '0';
     23                printf("0");
    2624                resume(cancel);
    27                 sout | '4';
     25                printf("4");
    2826        } catchResume (CoroutineCancelled(WillCancel) * error) {
    29                 sout | '2';
     27                printf("2");
    3028                if ((virtual internal_error *)error->the_exception) {
    31                         sout | '3';
     29                        printf("3");
    3230                }
    3331        }
    34         sout | '5' | nl;
     32        printf("5\n");
    3533}
  • tests/exceptions/cancel/thread.cfa

    r6065281f rf02f546  
    11// Try cancelling a thread.
    22
    3 #include <fstream.hfa>
    43#include <thread.hfa>
    54
     
    1413
    1514void main(WillCancel &) {
    16         sout | '1';
     15        printf("1");
    1716        cancel_stack((internal_error){&internal_vt});
    18         sout | '!';
     17        printf("!");
    1918}
    2019
    2120void explicit() {
    2221        try {
    23                 sout | '0';
     22                printf("0");
    2423                WillCancel cancel;
    25                 sout | '1';
     24                printf("1");
    2625                join(cancel);
    27                 sout | '4';
     26                printf("4");
    2827        } catchResume (ThreadCancelled(WillCancel) * error) {
    29                 sout | '2';
     28                printf("2");
    3029                if ((virtual internal_error *)error->the_exception) {
    31                         sout | '3';
     30                        printf("3");
    3231                }
    3332        }
    34         sout | '5' | nl;
     33        printf("5\n");
    3534}
    3635
     
    3837        try {
    3938                {
    40                         sout | '0';
     39                        printf("0");
    4140                        WillCancel cancel;
    42                         sout | '1';
     41                        printf("1");
    4342                }
    44                 sout | '4';
     43                printf("4");
    4544        } catchResume (ThreadCancelled(WillCancel) * error) {
    46                 sout | '2';
     45                printf("2");
    4746                if ((virtual internal_error *)error->the_exception) {
    48                         sout | '3';
     47                        printf("3");
    4948                }
    5049        }
    51         sout | '5' | nl;
     50        printf("5\n");
    5251}
    5352
    5453int main(int argc, char * argv[]) {
    55         sout | nlOff;
    5654        explicit();
    5755        implicit();
  • tests/exceptions/conditional.cfa

    r6065281f rf02f546  
    33// I may fold this back into terminate.cfa and resume.cfa once setting
    44// up the non-trivial exception is reasonable to do.
    5 
    6 #include <fstream.cfa>
    75
    86exception num_error {
     
    1311
    1412void caught_num_error(int expect, num_error * actual) {
    15         sout | "Caught num_error: expected=" | expect | "actual=" | actual->num | '.';
     13        printf("Caught num_error: expected=%d actual=%d.\n", expect, actual->num);
    1614}
    1715
  • tests/exceptions/data-except.cfa

    r6065281f rf02f546  
    11// Test exceptions that add data but no functionality.
    2 
    3 #include <fstream.cfa>
    42
    53exception paired {
     
    2018                throw except;
    2119        } catch (paired * exc) {
    22                 sout | virtual_msg(exc) | '(' | exc->first | ", " | exc->second | ')';
     20                printf("%s(%d, %d)\n", virtual_msg(exc), exc->first, exc->second);
    2321                ++exc->first;
    2422        }
    2523
    26         sout | virtual_msg(&except) | '(' | except.first | ", " | except.second | ')';
     24        printf("%s(%d, %d)\n", virtual_msg(&except), except.first, except.second);
    2725
    2826        try {
    2927                throwResume except;
    3028        } catchResume (paired * exc) {
    31                 sout | virtual_msg(exc) | '(' | exc->first | ", " | exc->second | ')';
     29                printf("%s(%d, %d)\n", virtual_msg(exc), exc->first, exc->second);
    3230                ++exc->first;
    3331        }
    3432
    35         sout | virtual_msg(&except) | '(' | except.first | ", " | except.second | ')';
     33        printf("%s(%d, %d)\n", virtual_msg(&except), except.first, except.second);
    3634}
  • tests/exceptions/defaults.cfa

    r6065281f rf02f546  
    11// Tests for providing new default operations.
    22
    3 #include <fstream.hfa>
    43#include <string.h>
    54
     
    3635                throwResume (log_message){&log_vt, "Should be printed.\n"};
    3736        } catchResume (log_message * this) {
    38                 sout | this->virtual_table->msg(this) | nonl;
     37                printf("%s", this->virtual_table->msg(this));
    3938        }
    4039        // But we don't have to:
     
    4544exception jump {};
    4645void defaultTerminationHandler(jump &) {
    47         sout | "jump default handler.";
     46        printf("jump default handler.\n");
    4847}
    4948
     
    5453                throw (jump){&jump_vt};
    5554        } catch (jump * this) {
    56                 sout | "jump catch handler.";
     55                printf("jump catch handler.\n");
    5756        }
    5857        throw (jump){&jump_vt};
     
    7675                throw (first){&first_vt};
    7776        } catch (unhandled_exception * t) {
    78                 sout | "Catch unhandled_exception.";
     77                printf("Catch unhandled_exception.\n");
    7978        }
    8079}
     
    8584void cross_test(void) {
    8685        void defaultTerminationHandler(first &) {
    87                 sout | "cross terminate default";
     86                printf("cross terminate default\n");
    8887                throw (second){&second_vt};
    8988        }
    9089        void defaultResumptionHandler(first &) {
    91                 sout | "cross resume default";
     90                printf("cross resume default\n");
    9291                throwResume (second){&second_vt};
    9392        }
    9493        try {
    95                 sout | "cross terminate throw";
     94                printf("cross terminate throw\n");
    9695                throw (first){&first_vt};
    9796        } catch (second *) {
    98                 sout | "cross terminate catch";
     97                printf("cross terminate catch\n");
    9998        }
    10099        try {
    101                 sout | "cross resume throw";
     100                printf("cross resume throw\n");
    102101                throwResume (first){&first_vt};
    103102        } catchResume (second *) {
    104                 sout | "cross resume catch";
     103                printf("cross resume catch\n");
    105104        }
    106105}
  • tests/exceptions/except-io.hfa

    r6065281f rf02f546  
    22
    33// Echo when a destructor is run and an area/block is left.
    4 
    5 #include <fstream.hfa>
    6 
    74struct loud_exit {
    85    const char * area;
     
    1411
    1512inline void ^?{}(loud_exit & this) {
    16     sout | "Exiting: " | this.area;
     13    printf("Exiting: %s\n", this.area);
    1714}
    1815
     
    2320inline void ?{}(loud_region & this, const char * region) {
    2421        this.region = region;
    25         sout | "Entering: " | region;
     22        printf("Entering: %s\n", region);
    2623}
    2724
    2825inline void ^?{}(loud_region & this) {
    29         sout | "Exiting: " | this.region;
     26        printf("Exiting: %s\n", this.region);
    3027}
  • tests/exceptions/finally.cfa

    r6065281f rf02f546  
    11// Finally Clause Tests
    22
    3 #include <fstream.hfa>
    43#include "except-io.hfa"
    54
     
    1312        try {
    1413                try {
    15                         sout | "termination throw";
     14                        printf("termination throw\n");
    1615                        throw exc;
    1716                } finally {
    1817                        loud_exit a = "termination inner finally";
    19                         sout | "finally during unwind";
     18                        printf("finally during unwind\n");
    2019                }
    2120        } catch (myth * error) {
    22                 sout | "termination catch";
     21                printf("termination catch\n");
    2322        } finally {
    2423                loud_exit a = "termination outer finally";
    25                 sout | "finally after catch";
     24                printf("finally after catch\n");
    2625        }
    27         sout | nl;
     26        printf("\n");
    2827
    2928        try {
    3029                try {
    31                         sout | "resumption throw";
     30                        printf("resumption throw\n");
    3231                        throwResume exc;
    3332                } finally {
    3433                        loud_exit a = "resumption inner finally";
    35                         sout | "finally after resume";
     34                        printf("finally after resume\n");
    3635                }
    3736        } catchResume (myth * error) {
    38                 sout | "resumption catch";
     37                printf("resumption catch\n");
    3938        } finally {
    4039                loud_exit a = "resumption outer finally";
    41                 sout | "finally after catch";
     40                printf("finally after catch\n");
    4241        }
    43         sout | "";
     42        printf("\n");
    4443
    4544        try {
    46                 sout | "walking out of try";
     45                printf("walking out of try\n");
    4746        } finally {
    4847                loud_exit a = "walking finally";
    49                 sout | "walking through finally";
     48                printf("walking through finally\n");
    5049        }
    51         sout | "";
     50        printf("\n");
    5251
    5352        try {
    54                 sout | "jumping out of try";
     53                printf("jumping out of try\n");
    5554                goto endoffunction;
    5655        } finally {
    5756                loud_exit a = "jumping finally";
    58                 sout | "jumping through finally";
     57                printf("jumping through finally\n");
    5958        }
    6059        endoffunction:
  • tests/exceptions/interact.cfa

    r6065281f rf02f546  
    11// Testing Interactions Between Termination and Resumption
    22
    3 #include <fstream.hfa>
    43#include "except-io.hfa"
    54
     
    1514                throwResume (star){&star_vt};
    1615        } catch (star *) {
    17                 sout | "caught as termination";
     16                printf("caught as termination\n");
    1817        }
    1918        // Variant of the above to check timing.
     
    2221                throwResume (star){&star_vt};
    2322        } catch (star *) {
    24                 sout | "caught as termination";
     23                printf("caught as termination\n");
    2524        } catchResume (star *) {
    26                 sout | "intermediate rethrow";
     25                printf("intermediate rethrow\n");
    2726                throwResume;
    2827        }
    29         sout | nl;
     28        printf("\n");
    3029
    3130        // Resume does not catch terminate.
     
    3433                        throw (star){&star_vt};
    3534                } catchResume (star *) {
    36                         sout | "resume catch on terminate";
     35                        printf("resume catch on terminate\n");
    3736                }
    3837        } catchResume (star *) {
    39                 sout | "resume catch on terminate";
     38                printf("resume catch on terminate\n");
    4039        } catch (star *) {
    41                 sout | "terminate catch on terminate";
     40                printf("terminate catch on terminate\n");
    4241        }
    43         sout | nl;
     42        printf("\n");
    4443
    4544        // Terminate does not catch resume.
     
    4847                        throwResume (star){&star_vt};
    4948                } catch (star *) {
    50                         sout | "terminate catch on resume";
     49                        printf("terminate catch on resume\n");
    5150                }
    5251        } catch (star *) {
    53                 sout | "terminate catch on resume";
     52                printf("terminate catch on resume\n");
    5453        } catchResume (star *) {
    55                 sout | "resume catch on resume";
     54                printf("resume catch on resume\n");
    5655        }
    57         sout | nl;
     56        printf("\n");
    5857
    5958        // Resume a termination exception.
     
    6362                                throw (star){&star_vt};
    6463                        } catchResume (star *) {
    65                                 sout | "inner resume catch (error)";
     64                                printf("inner resume catch (error)\n");
    6665                        }
    6766                } catch (star * error) {
    68                         sout | "termination catch, will resume";
     67                        printf("termination catch, will resume\n");
    6968                        throwResume *error;
    7069                }
    7170        } catchResume (star *) {
    72                 sout | "outer resume catch";
     71                printf("outer resume catch\n");
    7372        }
    74         sout | nl;
     73        printf("\n");
    7574
    7675        // Terminate a resumption exception.
     
    8079                                throwResume (star){&star_vt};
    8180                        } catch (star *) {
    82                                 sout | "inner termination catch";
     81                                printf("inner termination catch\n");
    8382                        }
    8483                } catchResume (star * error) {
    85                         sout | "resumption catch, will terminate";
     84                        printf("resumption catch, will terminate\n");
    8685                        throw *error;
    8786                }
    8887        } catch (star *) {
    89                 sout | "outer terminate catch (error)";
     88                printf("outer terminate catch (error)\n");
    9089        }
    91         sout | nl;
     90        printf("\n");
    9291
    9392        // Unwinding a resumption catch does not break the system.
     
    9695                        try {
    9796                                try {
    98                                         sout | "throwing resume moon";
     97                                        printf("throwing resume moon\n");
    9998                                        throwResume (moon){&moon_vt};
    10099                                } catch (star *) {
    101                                         sout | "termination catch";
     100                                        printf("termination catch\n");
    102101                                }
    103                                 sout | "throwing resume star";
     102                                printf("throwing resume star\n");
    104103                                throwResume (star){&star_vt};
    105104                        } catchResume (star *) {
    106                                 sout | "resumption star catch";
     105                                printf("resumption star catch\n");
    107106                        }
    108107                } catchResume (moon *) {
    109                         sout | "resumption moon catch, will terminate";
     108                        printf("resumption moon catch, will terminate\n");
    110109                        throw (star){&star_vt};
    111110                }
    112111        } catchResume (star *) {
    113                 sout | "outermost catch (error)";
     112                printf("outermost catch (error)\n");
    114113        }
    115114}
  • tests/exceptions/polymorphic.cfa

    r6065281f rf02f546  
    11// Testing polymophic exception types.
    2 
    3 #include <fstream.hfa>
    42
    53forall(T &) exception proxy {};
     
    1513                throw an_int;
    1614        } catch (proxy(int) *) {
    17                 sout | "terminate catch";
     15                printf("terminate catch\n");
    1816        }
    1917
     
    2119                throwResume a_char;
    2220        } catchResume (proxy(char) *) {
    23                 sout | "resume catch";
     21                printf("resume catch\n");
    2422        }
    2523
     
    2725                throw a_char;
    2826        } catch (proxy(int) *) {
    29                 sout | "caught proxy(int)";
     27                printf("caught proxy(int)\n");
    3028        } catch (proxy(char) *) {
    31                 sout | "caught proxy(char)";
     29                printf("caught proxy(char)\n");
    3230        }
    3331}
     
    4644                throw except;
    4745        } catch (cell(int) * error) {
    48                 sout | error->data;
     46                printf("%d\n", error->data);
    4947        }
    5048
     
    5250                cell(bool) ball = {&bool_cell, false};
    5351                throwResume ball;
    54                 sout | ball.data;
     52                printf("%i\n", ball.data);
    5553        } catchResume (cell(bool) * error) {
    56                 sout | error->data;
     54                printf("%i\n", error->data);
    5755                error->data = true;
    5856        }
     
    6159int main(int argc, char * argv[]) {
    6260        proxy_test();
    63         sout | nl;
     61        printf("\n");
    6462        cell_test();
    6563}
  • tests/exceptions/resume.cfa

    r6065281f rf02f546  
    11// Resumption Exception Tests
    22
    3 #include <fstream.hfa>
    43#include "except-io.hfa"
    54
     
    2221        try {
    2322                loud_exit a = "simple try clause";
    24                 sout | "simple throw";
     23                printf("simple throw\n");
    2524                throwResume a_zen;
    26                 sout | "end of try clause";
     25                printf("end of try clause\n");
    2726        } catchResume (zen * error) {
    2827                loud_exit a = "simple catch clause";
    29                 sout | "simple catch";
     28                printf("simple catch\n");
    3029        }
    31         sout | nl;
     30        printf("\n");
    3231
    3332        // Throw catch-all test.
     
    3534                throwResume a_zen;
    3635        } catchResume (exception_t * error) {
    37                 sout | "catch-all";
     36                printf("catch-all\n");
    3837        }
    39         sout | nl;
     38        printf("\n");
    4039
    4140        // Don't catch if handler does not match exception.
     
    4443                        throwResume a_yin;
    4544                } catchResume (zen *) {
    46                         sout | "caught yin as zen";
     45                        printf("caught yin as zen\n");
    4746                }
    4847        } catchResume (yang *) {
    49                 sout | "caught yin as yang";
     48                printf("caught yin as yang\n");
    5049        } catchResume (yin *) {
    51                 sout | "caught yin as yin";
     50                printf("caught yin as yin\n");
    5251        }
    53         sout | nl;
     52        printf("\n");
    5453
    5554        // Test rethrowing an exception.
     
    5756                try {
    5857                        loud_exit a = "rethrow inner try";
    59                         sout | "rethrow inner try";
     58                        printf("rethrow inner try\n");
    6059                        throwResume a_zen;
    6160                } catchResume (zen *) {
    6261                        loud_exit a = "rethrowing catch clause";
    63                         sout | "caught throw, will rethrow";
     62                        printf("caught throw, will rethrow\n");
    6463                        throwResume;
    6564                }
    6665        } catchResume (zen *) {
    6766                loud_exit a = "rethrow catch clause";
    68                 sout | "caught rethrow";
     67                printf("caught rethrow\n");
    6968        }
    70         sout | nl;
     69        printf("\n");
    7170
    7271        // Throw a different exception in a catch.
     
    7574                        throwResume a_yin;
    7675                } catchResume (yin *) {
    77                         sout | "caught yin, will throw yang";
     76                        printf("caught yin, will throw yang\n");
    7877                        throwResume a_yang;
    7978                } catchResume (yang *) {
    80                         sout | "caught exception from same try";
     79                        printf("caught exception from same try\n");
    8180                }
    8281        } catchResume (yang *) {
    83                 sout | "caught yang";
     82                printf("caught yang\n");
    8483        }
    85         sout | nl;
     84        printf("\n");
    8685
    8786        // Another throw in the catch does not interfere.
    8887        try {
    8988                try {
    90                         sout | "throwing first exception";
     89                        printf("throwing first exception\n");
    9190                        throwResume a_yin;
    9291                } catchResume (yin *) {
    93                         sout | "caught first exception";
     92                        printf("caught first exception\n");
    9493                        try {
    95                                 sout | "throwing second exception";
     94                                printf("throwing second exception\n");
    9695                                throwResume a_yang;
    9796                        } catchResume (yang *) {
    98                                 sout | "caught second exception";
     97                                printf("caught second exception\n");
    9998                        }
    10099                        throwResume;
    101100                }
    102101        } catchResume (yin *) {
    103                 sout | "recaught first exception";
     102                printf("recaught first exception\n");
    104103        } catchResume (yang *) {
    105                 sout | "caught second exception (bad location)";
     104                printf("caught second exception (bad location)\n");
    106105        }
    107         sout | nl;
     106        printf("\n");
    108107
    109108        // Check successive operations.
     
    113112                        throwResume a_zen;
    114113                } catchResume (zen *) {
    115                         sout | "inner catch";
     114                        printf("inner catch\n");
    116115                }
    117116                throwResume a_zen;
    118117        } catchResume (zen *) {
    119                 sout | "outer catch";
     118                printf("outer catch\n");
    120119        }
    121         sout | nl;
     120        printf("\n");
    122121
    123122        in_void();
     
    129128        try {
    130129                try {
    131                         sout | "throw";
     130                        printf("throw\n");
    132131                        throwResume a_zen;
    133132                } catchResume (zen *) {
    134                         sout | "rethrow";
     133                        printf("rethrow\n");
    135134                        throwResume;
    136135                }
    137136        } catchResume (zen *) {
    138                 sout | "handle";
     137                printf("handle\n");
    139138        }
    140139}
  • tests/exceptions/terminate.cfa

    r6065281f rf02f546  
    11// Termination Exception Tests
    22
    3 #include <fstream.hfa>
    43#include "except-io.hfa"
    54
     
    2221        try {
    2322                loud_exit a = "simple try clause";
    24                 sout | "simple throw";
     23                printf("simple throw\n");
    2524                throw a_zen;
    26                 sout | "end of try clause";
     25                printf("end of try clause\n");
    2726        } catch (zen * error) {
    2827                loud_exit a = "simple catch clause";
    29                 sout | "simple catch";
     28                printf("simple catch\n");
    3029        }
    31         sout | nl;
     30        printf("\n");
    3231
    3332        // Throw catch-all test.
     
    3534                throw a_zen;
    3635        } catch (exception_t * error) {
    37                 sout | "catch-all";
     36                printf("catch-all\n");
    3837        }
    39         sout | nl;
     38        printf("\n");
    4039
    4140        // Don't catch if handler does not match exception.
     
    4443                        throw a_yin;
    4544                } catch (zen *) {
    46                         sout | "caught yin as zen";
     45                        printf("caught yin as zen\n");
    4746                }
    4847        } catch (yang *) {
    49                 sout | "caught yin as yang";
     48                printf("caught yin as yang\n");
    5049        } catch (yin *) {
    51                 sout | "caught yin as yin";
     50                printf("caught yin as yin\n");
    5251        }
    53         sout | nl;
     52        printf("\n");
    5453
    5554        // Test rethrowing an exception.
     
    5756                try {
    5857                        loud_exit a = "rethrow inner try";
    59                         sout | "rethrow inner try";
     58                        printf("rethrow inner try\n");
    6059                        throw a_zen;
    6160                } catch (zen *) {
    6261                        loud_exit a = "rethrowing catch clause";
    63                         sout | "caught throw, will rethrow";
     62                        printf("caught throw, will rethrow\n");
    6463                        throw;
    6564                }
    6665        } catch (zen *) {
    6766                loud_exit a = "rethrow catch clause";
    68                 sout | "caught rethrow";
     67                printf("caught rethrow\n");
    6968        }
    70         sout | nl;
     69        printf("\n");
    7170
    7271        // Throw a different exception in a catch.
     
    7574                        throw a_yin;
    7675                } catch (yin *) {
    77                         sout | "caught yin, will throw yang";
     76                        printf("caught yin, will throw yang\n");
    7877                        throw a_yang;
    7978                } catch (yang *) {
    80                         sout | "caught exception from same try";
     79                        printf("caught exception from same try\n");
    8180                }
    8281        } catch (yang *) {
    83                 sout | "caught yang";
     82                printf("caught yang\n");
    8483        }
    85         sout | nl;
     84        printf("\n");
    8685
    8786        // Another throw in the catch does not interfere.
    8887        try {
    8988                try {
    90                         sout | "throwing first exception";
     89                        printf("throwing first exception\n");
    9190                        throw a_yin;
    9291                } catch (yin *) {
    93                         sout | "caught first exception";
     92                        printf("caught first exception\n");
    9493                        try {
    95                                 sout | "throwing second exception";
     94                                printf("throwing second exception\n");
    9695                                throw a_yang;
    9796                        } catch (yang *) {
    98                                 sout | "caught second exception";
     97                                printf("caught second exception\n");
    9998                        }
    10099                        throw;
    101100                }
    102101        } catch (yin *) {
    103                 sout | "recaught first exception";
     102                printf("recaught first exception\n");
    104103        } catch (yang *) {
    105                 sout | "caught second exception (bad location)";
     104                printf("caught second exception (bad location)\n");
    106105        }
    107         sout | nl;
     106        printf("\n");
    108107
    109108        // Check successive operations.
     
    113112                        throw a_zen;
    114113                } catch (zen *) {
    115                         sout | "inner catch";
     114                        printf("inner catch\n");
    116115                }
    117116                throw a_zen;
    118117        } catch (zen *) {
    119                 sout | "outer catch";
     118                printf("outer catch\n");
    120119        }
    121         sout | nl;
     120        printf("\n");
    122121
    123122        in_void();
     
    129128        try {
    130129                try {
    131                         sout | "throw";
     130                        printf("throw\n");
    132131                        throw a_zen;
    133132                } catch (zen *) {
    134                         sout | "rethrow";
     133                        printf("rethrow\n");
    135134                        throw;
    136135                }
    137136        } catch (zen *) {
    138                 sout | "handle";
     137                printf("handle\n");
    139138        }
    140139}
  • tests/exceptions/trash.cfa

    r6065281f rf02f546  
    11// Make sure throw-catch during unwind does not trash internal data.
    2 
    3 #include <fstream.hfa>
    42
    53exception yin {};
     
    1715                                throw (yang){&yang_vt};
    1816                        } catch (yin *) {
    19                                 sout | "inner yin";
     17                                printf("inner yin\n");
    2018                        } catch (yang *) {
    21                                 sout | "inner yang";
     19                                printf("inner yang\n");
    2220                        }
    2321                }
    2422        } catch (yin *) {
    25                 sout | "outer yin";
     23                printf("outer yin\n");
    2624        } catch (yang *) {
    27                 sout | "outer yang";
     25                printf("outer yang\n");
    2826        }
    2927}
  • tests/exceptions/virtual-cast.cfa

    r6065281f rf02f546  
    99 */
    1010
    11 #include <fstream.hfa>
    1211#include <stdlib.hfa>
    1312#include <assert.h>
     13
     14
    1415
    1516// Hand defined alpha virtual type:
     
    105106        free(tri);
    106107        free(top);
    107         sout | "done";                                                                          // non-empty .expect file
     108        printf( "done\n" );                             // non-empty .expect file
    108109}
  • tests/exceptions/virtual-poly.cfa

    r6065281f rf02f546  
    66 */
    77
    8 #include <fstream.hfa>
    98#include <assert.h>
    109
     
    106105        mono_poly_test();
    107106        poly_poly_test();
    108         sout | "done";
     107        printf( "done\n" );
    109108}
Note: See TracChangeset for help on using the changeset viewer.