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/Tuple.c

    r81419b5 r0b2961f  
    11int f( int, int );
    22int g( int, int, int );
    3 static [ int, int, int, int ] h( int a, int b, * int c, [] char d );
     3static [ int, int *, * int, int ] h( int a, int b, * int c, [] char d );
    44
    55struct inner {
     
    3030
    3131        [ x, y, z ] = [ p, f( 17 ), 3 ];
     32        [ x, y, z ] = ([short, unsigned int, [int, int]])([ p, f( 17 ), 3 ]);
    3233        r = [ x, y, z ];
    3334}
     
    4041        f( t1 );
    4142        g( t1, 3 );
    42         [ 3,5 ];
    43         [ a,b ] = 3;
    44         [ a,b ] = [ 4.6 ];
    45         [ a,b ] = [ c,d ] = [ 3,5 ];
    46         [ a,b,[ c ] ] = [ 2,[ a,b ] ];
    47         [ a,b ] = 3 > 4 ? [ b,6 ] : [ 7,8 ];
    4843
    49         t1 = [ a,b ];
    50         t1 = t2 = [ a,b ];
    51         [ a,b ] = [ c,d ] = d += c += 1;
    52         [ a,b ] = [ c,d ] = t1;
    53         [ a,b ] = t1 = [ c,d ];
    54         [ a,b ] = t1 = t2 = [ c,d ];
    55         t1 = [ 3,4 ] = [ 3,4 ] = t1 = [ 3,4 ];
     44        [ , , , ];                                              /* empty tuple */
     45        [ 3, 5 ];
     46        [ a, b ] = 3;
     47        [ a, b ] = [ 4.6 ];
     48        [ a, b ] = [ c, d ] = [ 3, 5 ];
     49        [ a, b, [ c ] ] = [ 2,[ a, b ] ];
     50        [ a, b ] = 3 > 4 ? [ b, 6 ] : [ 7, 8 ];
     51
     52        t1 = [ a, b ];
     53        t1 = t2 = [ a, b ];
     54        [ a, b ] = [ c, d ] = d += c += 1;
     55        [ a, b ] = [ c, d ] = t1;
     56        [ a, b ] = t1 = [ c, d ];
     57        [ a, b ] = t1 = t2 = [ c, d ];
     58        t1 = [ 3, 4 ] = [ 3, 4 ] = t1 = [ 3, 4 ];
    5659
    5760        s.[ f1, i.[ f2, f3 ], f4 ] = [ 11, 12, 13, 3.14159 ];
    5861        s.[ f1, i.[ f2, f3 ], f4 ] = h( 3, 3, 0, "abc" );
    59         sp->[ f4,f1 ] = sp->[ f1,f4 ];
    60         printf( "expecting 3, 17, 23, 4; got %d, %d, %d, %d\n", s.[ f4, i.[ f3,f2 ], f1 ] );
     62        [ a, , b, ] = h( 3, 3, 0, "abc" );                      /* ignore some results */
     63        sp->[ f4,f1 ] = sp->[ f1, f4 ];
     64        printf( "expecting 3, 17, 23, 4; got %d, %d, %d, %d\n", s.[ f4, i.[ f3, f2 ], f1 ] );
    6165        rc = 0;
    6266}
Note: See TracChangeset for help on using the changeset viewer.