Ignore:
Timestamp:
Jun 16, 2017, 4:55:36 PM (7 years ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
42b0d73
Parents:
365d553c
Message:

Now tests finally during unwind.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/working/exception/impl/test-main.c

    r365d553c re1055441  
    142142
    143143// Finally Test:
    144 void farewell() {
     144void farewell(bool jump) {
    145145        {
    146146                void farewell_finally1() {
     
    150150                        __attribute__((cleanup(farewell_finally1)));
    151151                {
    152                         printf("walk out of farewell\n");
    153                 }
    154         }
     152                        if (jump) {
     153                                printf("jump out of farewell\n");
     154                                goto endoffunction;
     155                        } else {
     156                                printf("walk out of farewell\n");
     157                        }
     158                }
     159        }
     160        endoffunction:
     161        printf("leaving farewell\n");
    155162}
    156163
     
    460467        foo(); printf("\n");
    461468        alpha(); printf("\n");
    462         farewell(); printf("\n");
     469        farewell(false); printf("\n");
     470        farewell(true); printf("\n");
    463471        fallback(); printf("\n");
    464472        terminate_swapped(); printf("\n");
Note: See TracChangeset for help on using the changeset viewer.