Ignore:
Timestamp:
Jun 9, 2015, 3:19:04 PM (9 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, string, with_gc
Children:
8a95629
Parents:
81419b5
Message:

fix warnings from prelude.cf, work on regression testing

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Tests/SynTree/Forall.c

    r81419b5 r0b2961f  
    99
    1010context sumable( type T ) {
    11     const T 0;
    12     T ?+?(T, T);
    13     T ?++(T);
    14     [T] ?+=?(T,T);
     11        const T 0;
     12        T ?+?(T, T);
     13        T ?++(T);
     14        [T] ?+=?(T,T);
    1515};
    1616
     
    3232        int i;
    3333        for ( i = 0; i < n; i += 1 )
    34             total = total + a[i];
     34                total = total + a[i];
    3535        return total;
    3636}
     
    4141}
    4242
     43forall( type T | { const T 0; int ?!=?(T, T); int ?<?(T, T); } )
     44T min( T t1, T t2 ) {
     45        return t1 < t2 ? t1 : t2;
     46}
     47
    4348int main() {
    44     int x = 1, y = 2, a[10];
    45     float f;
     49        int x = 1, y = 2, a[10];
     50        float f;
    4651
    47     swap( x, y );
    48     twice( x, y );
    49     f = min( 4.0, 3.0 );
    50     sum( 10, a );
     52        swap( x, y );
     53        twice( x );
     54        f = min( 4.0, 3.0 );
     55        sum( 10, a );
    5156}
    5257
Note: See TracChangeset for help on using the changeset viewer.