Ignore:
Timestamp:
Jun 14, 2016, 12:33:57 PM (8 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
e04ef3a
Parents:
4c82a3c
Message:

update keywords in test files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Tests/Forall.c

    r4c82a3c r55ba7339  
    77
    88void g1() {
    9         forall( type T ) T f( T );
     9        forall( otype T ) T f( T );
    1010        void f( int );
    1111        void h( void (*p)(void) );
     
    2424
    2525void g2() {
    26         forall( type T ) void f( T, T );
    27         forall( type T, type U ) void f( T, U );
     26        forall( otype T ) void f( T, T );
     27        forall( otype T, otype U ) void f( T, U );
    2828 
    2929        int x;
     
    3737}
    3838
    39 typedef forall ( type T ) int (*f)( int );
     39typedef forall ( otype T ) int (*f)( int );
    4040
    41 forall( type T )
     41forall( otype T )
    4242void swap( T left, T right ) {
    4343        T temp = left;
     
    4646}
    4747
    48 context sumable( type T ) {
     48context sumable( otype T ) {
    4949        const T 0;
    5050        T ?+?(T, T);
     
    5353};
    5454
    55 type T1 | { const T1 0; T1 ?+?(T1, T1); T1 ?++(T1); [T1] ?+=?(T1,T1); },
    56         T2(type P1, type P2 ),
     55otype T1 | { const T1 0; T1 ?+?(T1, T1); T1 ?++(T1); [T1] ?+=?(T1,T1); },
     56        T2(otype P1, otype P2 ),
    5757        T3 | sumable(T3);
    5858
    59 type T2(type P1, type P2) | sumable(T2(P1,P2)) = struct { P1 i; P2 j; };
     59otype T2(otype P1, otype P2) | sumable(T2(P1,P2)) = struct { P1 i; P2 j; };
    6060
    6161T2(int, int) w1;
    6262typedef T2(int, int) w2;
    6363w2 g2;
    64 type w3 = T2(int, int);
     64otype w3 = T2(int, int);
    6565w3 g3;
    6666
    67 forall( type T | sumable( T ) )
     67forall( otype T | sumable( T ) )
    6868T sum( int n, T a[] ) {
    6969        T total = 0;
     
    7474}
    7575
    76 forall( type T | { const T 0; T ?+?(T, T); T ?++(T); [T] ?+=?(T,T); } )
     76forall( otype T | { const T 0; T ?+?(T, T); T ?++(T); [T] ?+=?(T,T); } )
    7777T twice( T t ) {
    7878        return t + t;
    7979}
    8080
    81 forall( type T | { const T 0; int ?!=?(T, T); int ?<?(T, T); } )
     81forall( otype T | { const T 0; int ?!=?(T, T); int ?<?(T, T); } )
    8282T min( T t1, T t2 ) {
    8383        return t1 < t2 ? t1 : t2;
Note: See TracChangeset for help on using the changeset viewer.