Changeset 32ce9b7 for tests


Ignore:
Timestamp:
Feb 19, 2020, 3:37:18 PM (2 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
arm-eh, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation
Children:
1d72a11
Parents:
4aac9ff (diff), e326ebc (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

Location:
tests
Files:
5 added
1 deleted
9 edited
1 moved

Legend:

Unmodified
Added
Removed
  • tests/.expect/alloc-ERROR.txt

    r4aac9ff r32ce9b7  
    1 alloc.cfa:311:1 error: No reasonable alternatives for expression Applying untyped:
     1alloc.cfa:310:1 error: No reasonable alternatives for expression Applying untyped:
    22  Name: ?=?
    33...to:
     
    1919
    2020
    21 alloc.cfa:312:1 error: No reasonable alternatives for expression Applying untyped:
     21alloc.cfa:311:1 error: No reasonable alternatives for expression Applying untyped:
    2222  Name: ?=?
    2323...to:
     
    3939
    4040
    41 alloc.cfa:313:1 error: No reasonable alternatives for expression Applying untyped:
     41alloc.cfa:312:1 error: No reasonable alternatives for expression Applying untyped:
    4242  Name: ?=?
    4343...to:
     
    5050
    5151
    52 alloc.cfa:314:1 error: No reasonable alternatives for expression Applying untyped:
     52alloc.cfa:313:1 error: No reasonable alternatives for expression Applying untyped:
    5353  Name: ?=?
    5454...to:
  • tests/.expect/alloc.txt

    r4aac9ff r32ce9b7  
    22CFA malloc 0xdeadbeef
    33CFA alloc 0xdeadbeef
    4 CFA array alloc, fill 0xde
    54CFA alloc, fill dededede
    65CFA alloc, fill 3
  • tests/.expect/nested-types-ERR1.txt

    r4aac9ff r32ce9b7  
    1 nested-types.cfa:70:1 error: Use of undefined type T
     1nested-types.cfa:83:1 error: Use of undefined type T
  • tests/.expect/nested-types-ERR2.txt

    r4aac9ff r32ce9b7  
    1 nested-types.cfa:73:1 error: Use of undefined global type Z
    2 nested-types.cfa:74:1 error: Qualified type requires an aggregate on the left, but has: signed int
    3 nested-types.cfa:75:1 error: Undefined type in qualified type: Qualified Type:
     1nested-types.cfa:86:1 error: Use of undefined global type Z
     2nested-types.cfa:87:1 error: Qualified type requires an aggregate on the left, but has: signed int
     3nested-types.cfa:88:1 error: Undefined type in qualified type: Qualified Type:
    44  instance of struct S with body 1
    55  instance of type Z (not function type)
  • tests/alloc.cfa

    r4aac9ff r32ce9b7  
    1010// Created On       : Wed Feb  3 07:56:22 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Nov 22 15:34:19 2019
    13 // Update Count     : 404
     12// Last Modified On : Sun Feb 16 09:21:13 2020
     13// Update Count     : 405
    1414//
    1515
     
    4848
    4949        p = alloc_set( fill );                                                          // CFA alloc, fill
    50         printf( "CFA array alloc, fill %#hhx\n", fill );
    5150        printf( "CFA alloc, fill %08x\n", *p );
    5251        free( p );
  • tests/exceptions/except-0.cfa

    r4aac9ff r32ce9b7  
    1919};
    2020
    21 void ?{}(signal_exit * this, const char * area) {
    22         this->area = area;
    23 }
    24 
    25 void ^?{}(signal_exit * this) {
    26         printf("Exiting: %s\n", this->area);
     21void ?{}(signal_exit & this, const char * area) {
     22        this.area = area;
     23}
     24
     25void ^?{}(signal_exit & this) {
     26        printf("Exiting: %s\n", this.area);
    2727//      sout | "Exiting:" | this->area;
    2828}
     
    242242
    243243        // Uncaught termination test.
     244        /* Removed due to non-deterministic output.
    244245        printf("Throw uncaught.\n");
    245246        yang z;
    246247        terminate(&z);
    247 }
     248        */
     249}
  • tests/exceptions/except-2.cfa

    r4aac9ff r32ce9b7  
    1212        struct TABLE(BASE_EXCEPT) const * parent;
    1313        size_t size;
    14         void (*copy)(num_error *this, num_error * other);
    15         void (*free)(num_error *this);
     14        void (*copy)(num_error &this, num_error & other);
     15        void (*free)(num_error &this);
    1616        const char * (*msg)(num_error *this);
    1717        int (*code)(num_error *this);
     
    2828        if ( ! this->msg ) {
    2929                static const char * base = "Num Error with code: X";
    30                 this->msg = malloc(22);
     30                this->msg = (char *)malloc(22);
    3131                for (int i = 0 ; (this->msg[i] = base[i]) ; ++i);
    3232        }
     
    3434        return this->msg;
    3535}
    36 void ?{}(num_error * this, int num) {
    37         this->virtual_table = &INSTANCE(num_error);
    38         this->msg = 0;
    39         this->num = num;
     36void ?{}(num_error & this, int num) {
     37        this.virtual_table = &INSTANCE(num_error);
     38        this.msg = 0;
     39        this.num = num;
    4040}
    41 void ?{}(num_error * this, num_error * other) {
    42         this->virtual_table = other->virtual_table;
    43         this->msg = 0;
    44         this->num = other->num;
     41void ?{}(num_error & this, num_error & other) {
     42        this.virtual_table = other.virtual_table;
     43        this.msg = 0;
     44        this.num = other.num;
    4545}
    46 void ^?{}(num_error * this) {
    47         if( this->msg ) free( this->msg );
     46void ^?{}(num_error & this) {
     47        if( this.msg ) free( this.msg );
    4848}
    4949int num_error_code( num_error * this ) {
  • tests/nested-types.cfa

    r4aac9ff r32ce9b7  
    1010// Created On       : Mon Jul 9 10:20:03 2018
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Nov  6 17:59:40 2018
    13 // Update Count     : 2
     12// Last Modified On : Wed Feb 12 18:21:15 2020
     13// Update Count     : 3
    1414//
    1515
     
    5050//   double d;
    5151// };
     52
     53// struct S {
     54//     enum C { R, G, B };
     55//     int i;
     56//     struct T {
     57//      int i;
     58//     };
     59//     T t;
     60// };
     61
     62// S s;
     63// S.C c;
     64// S.T t;
    5265
    5366int main() {
  • tests/test.py

    r4aac9ff r32ce9b7  
    152152        # run everything in a temp directory to make sure core file are handled properly
    153153        with tempdir():
    154                 # if the make command succeds continue otherwise skip to diff
     154                # if the make command succeeds continue otherwise skip to diff
    155155                if success(make_ret):
    156156                        with Timed() as run_dur:
  • tests/userLiterals.cfa

    r4aac9ff r32ce9b7  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // user_literals.cfa --
     7// userLiterals.cfa --
    88//
    99// Author           : Peter A. Buhr
    1010// Created On       : Wed Sep  6 21:40:50 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Dec  4 22:03:10 2018
    13 // Update Count     : 56
     12// Last Modified On : Wed Feb 19 07:48:45 2020
     13// Update Count     : 74
    1414//
    1515
     
    2424int ?`__thingy_( int x ) { sout | "_thingy_" | x; return x; }
    2525
    26 int ?`s( const char * s ) { sout | "secs" | s; return 0; }
    27 int ?`m( const char16_t * m ) { sout | "mins" | m; return 0;}
    28 int ?`h( const char32_t * h ) { sout | "hours" | h; return 0; }
     26int ?`s( const char * s ) { sout | "s" | s; return 0; }
     27int ?`m( const char16_t * m ) { sout | "m" | m; return 0;}
     28int ?`h( const char32_t * h ) { sout | "h" | h; return 0; }
    2929int ?`_A_( const wchar_t * str ) { sout | "_A_" | str; return 0; }
    3030int ?`__thingy_( const char * str ) { sout | "_thingy_" | str; return 0; }
     
    3737        return (Weight){ l.stones + r.stones };
    3838}
    39 ofstream & ?|?( ofstream & os, Weight w ) { return os | w.stones; }
     39ofstream & ?|?( ofstream & os, Weight w ) { return os | wd(1,1, w.stones); }
     40void ?|?( ofstream & os, Weight w ) { (ofstream)(os | w); ends( os ); }
    4041
    4142Weight ?`st( double w ) { return (Weight){ w }; }               // backquote for user literals
     
    6061        sout | w;
    6162
    62 //      0`secs;
     63        0`s;
    6364        1`s;
    6465        23`s;
     
    8283
    8384        "abc"`s;
    84 //      u"abc"`m;
    85 //      U_"abc"`h;
    86 //      L"abc"`_A_;
     85        // FIX ME: requires char16_t, char32_t, and wchar_t be unique types
     86        // u"abc"`m;
     87        // U_"abc"`h;
     88        // L"abc"`_A_;
    8789        u8_"abc"`__thingy_;
    8890} // main
     
    9092// Local Variables: //
    9193// tab-width: 4 //
    92 // compile-command: "cfa user_literals.cfa" //
     94// compile-command: "cfa userLiterals.cfa" //
    9395// End: //
Note: See TracChangeset for help on using the changeset viewer.