Changeset e5b96bf


Ignore:
Timestamp:
Jun 20, 2016, 11:30:03 AM (8 years ago)
Author:
Thierry Delisle <tdelisle@…>
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:
439a2b4
Parents:
fbaebc6
Message:

fixed a several errors in tests

Location:
src/tests
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • src/tests/Context.c

    rfbaebc6 re5b96bf  
    11//cforall context declaration
    2 context has_q( otype T ) {
     2trait has_q( otype T ) {
    33        T q( T );
    44};
  • src/tests/Forall.c

    rfbaebc6 re5b96bf  
    1010        void f( int );
    1111        void h( void (*p)(void) );
    12  
     12
    1313        int x;
    1414        void (*y)(void);
    1515        char z;
    1616        float w;
    17  
     17
    1818        f( x );
    1919        f( y );
     
    2626        forall( otype T ) void f( T, T );
    2727        forall( otype T, otype U ) void f( T, U );
    28  
     28
    2929        int x;
    3030        float y;
    3131        int *z;
    3232        float *w;
    33  
     33
    3434        f( x, y );
    3535        f( z, w );
     
    4646}
    4747
    48 context sumable( otype T ) {
     48trait sumable( otype T ) {
    4949        const T 0;
    5050        T ?+?(T, T);
  • src/tests/Operators.c

    rfbaebc6 re5b96bf  
    1 int ?*?( int, int );
     1int ?*?( int a, int b ) {
     2        return 0;
     3}
    24
    35int ?()( int number1, int number2 ) {
     
    57}
    68
    7 int ?+?( int, int );
     9int ?+?( int a, int b ) {
     10        return 0;
     11}
    812
    9 int ?=?( int *, int );
     13int ?=?( int *a, int b ) {
     14        return 0;
     15}
    1016struct accumulator {
    1117        int total;
    1218};
    1319
    14 char ?()( struct accumulator a, char number1, char number2 );
     20char ?()( struct accumulator a, char number1, char number2 ) {
     21        return 'a';
     22}
    1523
    1624void f( void ) {
     
    2331}
    2432
     33int main(int argc, char const *argv[]) {
     34        /* code */
     35        return 0;
     36}
     37
    2538// Local Variables: //
    2639// tab-width: 4 //
  • src/tests/Scope.c

    rfbaebc6 re5b96bf  
    1515y p;
    1616
    17 context has_u( otype z ) {
     17trait has_u( otype z ) {
    1818        z u(z);
    1919};
  • src/tests/Subrange.c

    rfbaebc6 re5b96bf  
    11// A small context defining the notion of an ordered otype.  (The standard
    22// library should probably contain a context for this purpose.)
    3 context ordered(otype T) {
     3trait ordered(otype T) {
    44    int ?<?(T, T), ?<=?(T, T);
    55};
  • src/tests/Switch.c

    rfbaebc6 re5b96bf  
    1 int fred() {
     1int main(int argc, char const *argv[]) {
    22    int i;
    33    switch ( i ) case 3 : i = 1;
  • src/tests/Typedef.c

    rfbaebc6 re5b96bf  
    1818a c;
    1919
    20 typedef otypeof(3) x, y;  // GCC
     20typedef typeof(3) x, y;  // GCC
    2121
    2222x p;
     
    2424
    2525int main() {
    26     typedef otypeof(3) z, p;
     26    typedef typeof(3) z, p;
    2727    z w;
    2828    p x;
Note: See TracChangeset for help on using the changeset viewer.