Changeset fc12f05 for tests


Ignore:
Timestamp:
Nov 13, 2023, 3:43:43 AM (23 months ago)
Author:
JiadaL <j82liang@…>
Branches:
master
Children:
25f2798
Parents:
0030b508 (diff), 2174191 (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:
3 added
15 edited

Legend:

Unmodified
Added
Removed
  • tests/collections/.expect/string-istream-manip.txt

    r0030b508 rfc12f05  
    696913 wwwwwwww
    707014 cccc
    71 15
     7115 q
    72721 yyyyyyyyyyyyyyyyyyyy
    73732 abcxxx
     
    848413 wwwwwwww
    858514 cccc
    86 15
     8615 q
  • tests/collections/string-istream-manip.cfa

    r0030b508 rfc12f05  
    3838        void echoTillX(const char * casename) {
    3939            string s;
    40             do {
     40            // loop assumes behaviour not tested until main-case #15:
     41            // on reading nothing, the prior string value is left alone
     42            do {
     43                s = "";
    4144                forceStringHeapFreeSpaceTo(9);
    4245                sin | s;
     
    5457            string s;
    5558            do {
     59                s = "";
    5660                sin | plainjane( s );
    5761                sout | casename | s;
     
    6872            string_res s;
    6973            do {
     74                s = "";
    7075                sin | plainjane( s );
    7176                sout | casename | s;
     
    8287            string s;
    8388            do {
     89                s = "";
    8490                sin | skip("-\n");
    8591                sin | incl( ".:|# x", s );
     
    97103            string s;
    98104            do {
     105                s = "";
    99106                sin | skip("-\n");
    100107                sin | excl( "-\n", s );
     
    113120            string s;
    114121            do {
     122                s = "";
    115123                sin | getline( s );
    116124                sout | casename | s;
     
    127135            string s;
    128136            do {
     137                s = "";
    129138                sin | getline( s, '@' );
    130139                sout | casename | s;
  • tests/concurrency/actors/.expect/dynamic.txt

    r0030b508 rfc12f05  
    11starting
    22started
    3 stopping
    43Done
    54stopped
  • tests/concurrency/actors/.expect/static.txt

    r0030b508 rfc12f05  
    11starting
    22started
    3 stopping
    43Done
    54stopped
  • tests/concurrency/actors/dynamic.cfa

    r0030b508 rfc12f05  
    5858        *d_actor | *d_msg;
    5959
    60         sout | "stopping";
    61 
    6260        stop_actor_system();
    6361
  • tests/concurrency/actors/static.cfa

    r0030b508 rfc12f05  
    5555        actor | msg;
    5656
    57         sout | "stopping";
    58 
    5957        stop_actor_system();
    6058
  • tests/concurrency/cofor.cfa

    r0030b508 rfc12f05  
    11#include <cofor.hfa>
    2 
    32
    43void add_num( long * total, long val ) { __atomic_fetch_add( total, (long)val, __ATOMIC_SEQ_CST ); }
     
    87    processor p[4];
    98    long total = 0;
    10     COFOR( i, 0, 10, __atomic_fetch_add( &total, i, __ATOMIC_SEQ_CST ); );
     9    cofor( i; 10 ) {
     10        __atomic_fetch_add( &total, i, __ATOMIC_SEQ_CST );
     11    }
    1112    {
    1213        corun;      // does nothing
  • tests/concurrency/waitfor/parse.cfa

    r0030b508 rfc12f05  
    1010// Created On       : Wed Aug 30 17:53:29 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon Apr 10 22:52:18 2023
    13 // Update Count     : 64
     12// Last Modified On : Wed Nov  1 07:28:19 2023
     13// Update Count     : 65
    1414//
    1515
     
    258258// Local Variables: //
    259259// tab-width: 4 //
    260 // compile-command: "cfa waitfor.cfa" //
     260// compile-command: "cfa parse.cfa" //
    261261// End: //
  • tests/concurrency/waituntil/channel_close.cfa

    r0030b508 rfc12f05  
    2626        for( ;; ) {
    2727            if ( useAnd ) {
    28                 waituntil( (in << A) ) { assert( A_removes == in ); A_removes++; removes++; }
    29                 and waituntil( (in2 << B) ) { assert( B_removes == in2 ); B_removes++; removes++; }
     28                waituntil( (in << A) ) { __atomic_thread_fence( __ATOMIC_SEQ_CST ); assert( A_removes == in ); A_removes++; removes++; }
     29                and waituntil( (in2 << B) ) { __atomic_thread_fence( __ATOMIC_SEQ_CST ); assert( B_removes == in2 ); B_removes++; removes++; }
    3030                continue;
    3131            }
    32             waituntil( (in << A) ) { assert( A_removes == in ); A_removes++; removes++; }
    33             or waituntil( (in << B) ) { assert( B_removes == in ); B_removes++; removes++; }
     32            waituntil( (in << A) ) { __atomic_thread_fence( __ATOMIC_SEQ_CST ); assert( A_removes == in ); A_removes++; removes++; }
     33            or waituntil( (in << B) ) { __atomic_thread_fence( __ATOMIC_SEQ_CST ); ( B_removes == in ); B_removes++; removes++; }
    3434        }
    3535    } catchResume ( channel_closed * e ) {} // continue to remove until would block
     
    3737    try {
    3838        for( ;; )
    39             waituntil( (in << A) ) { assert( A_removes == in ); A_removes++; removes++; }
     39            waituntil( (in << A) ) { __atomic_thread_fence( __ATOMIC_SEQ_CST ); assert( A_removes == in ); A_removes++; removes++; }
    4040    } catchResume ( channel_closed * e ) {} // continue to remove until would block
    4141    catch ( channel_closed * e ) {}
    4242    try {
    4343        for( ;; )
    44             waituntil( (in << B) ) { assert( B_removes == in ); B_removes++; removes++; }
     44            waituntil( (in << B) ) { __atomic_thread_fence( __ATOMIC_SEQ_CST ); assert( B_removes == in ); B_removes++; removes++; }
    4545    } catchResume ( channel_closed * e ) {} // continue to remove until would block
    4646    catch ( channel_closed * e ) {}
  • tests/genericUnion.cfa

    r0030b508 rfc12f05  
    1010// Created On       : Tue Dec 25 14:42:46 2018
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Dec 25 14:46:33 2018
    13 // Update Count     : 2
     12// Last Modified On : Fri Oct 20 09:13:26 2023
     13// Update Count     : 15
    1414//
    1515
     16#include <fstream.hfa>
    1617#include <limits.hfa>
    1718
    18 forall(T)
     19forall( T )
    1920union ByteView {
    2021        T val;
     
    2324
    2425forall(T)
    25 void print(ByteView(T) x) {
    26         for (int i = 0; i < sizeof(int); i++) {                         // want to change to sizeof(T)
    27                 printf("%02x", x.bytes[i] & 0xff);
     26void print( ByteView(T) x ) {
     27        for ( i; sizeof(int) ) {                                                        // want to change to sizeof(T)
     28                sout | nobase( pad0( wd( 2, hex( x.bytes[i] & 0xff ) ) ) ) | nosep;
    2829        }
    2930}
    3031
    3132forall(T)
    32 void f(ByteView(T) x, T val) {
    33         print(x);
    34         printf(" ");
     33void f( ByteView(T) x, T val ) {
     34        print( x );
     35        sout | " ";
    3536        x.val = val;
    36         print(x);
    37         printf("\n");
     37        print( x );
     38        sout | nl;
    3839}
    3940
    4041int main() {
     42        sout | nlOff;
    4143        ByteView(unsigned) u = { 0 };
    4244        ByteView(int) i = { 0 };
    43         f(u, MAX);
    44         f(i, -1);
     45        f( u, MAX );
     46        f( i, -1 );
    4547}
    4648
  • tests/io/.expect/manipulatorsInput.arm64.txt

    r0030b508 rfc12f05  
    24243 abcxxx
    25254 aaaaaaaa
    26 5 aaaaaaaa
     265
    27276 aabbccbb
    28287 dddwww
    29 8 dddwww
    30 9 dddwww
     298
     309
    313110 aaaaaaaa
    323211 wwwwwwww
    33 12 wwwwwwww
    34 13 wwwwwwww
     3312
     3413
    353514 cccc
    363615
  • tests/io/.expect/manipulatorsInput.x64.txt

    r0030b508 rfc12f05  
    24243 abcxxx
    25254 aaaaaaaa
    26 5 aaaaaaaa
     265
    27276 aabbccbb
    28287 dddwww
    29 8 dddwww
    30 9 dddwww
     298
     309
    313110 aaaaaaaa
    323211 wwwwwwww
    33 12 wwwwwwww
    34 13 wwwwwwww
     3312
     3413
    353514 cccc
    363615
  • tests/io/.expect/manipulatorsInput.x86.txt

    r0030b508 rfc12f05  
    24243 abcxxx
    25254 aaaaaaaa
    26 5 aaaaaaaa
     265
    27276 aabbccbb
    28287 dddwww
    29 8 dddwww
    30 9 dddwww
     298
     309
    313110 aaaaaaaa
    323211 wwwwwwww
    33 12 wwwwwwww
    34 13 wwwwwwww
     3312
     3413
    353514 cccc
    363615
  • tests/io/.expect/manipulatorsOutput4.txt

    r0030b508 rfc12f05  
    225225-1.55051464826854e+28 -15.5051e27 -15.5051e27   -15.505e27   -15.505e27 -15.50515e27 -15.50515e27 -0015.505e27 -0015.505e27 -15.50515e27 -15.50515e27 -15.505e27   -15.505e27   -15.50515e27 -15.50515e27 -15.505e27   -15.505e27   -15.50515e27 -15.50515e27
    226226-6.51216152272788e+29 -651.216e27 -651.216e27   -651.22e27   -651.22e27 -651.21615e27 -651.21615e27 -00651.22e27 -00651.22e27 -651.21615e27 -651.21615e27 -651.22e27   -651.22e27   -651.21615e27 -651.21615e27 -651.22e27   -651.22e27   -651.21615e27 -651.21615e27
     2270 1 1 1.0 1
     2281 2 2 2.0 2
     2292 4 4 4.0 4
     2303 8 8 8.0 8
     2314 16 16 16.0 16
     2325 32 32 32.0 32
     2336 64 64 64.0 64
     2347 128 128 128.0 128
     2358 256 256 256.0 256
     2369 512 512 512.0 512
     23710 1024 1.024K 1.0K 1K
     23811 2048 2.048K 2.0K 2K
     23912 4096 4.096K 4.1K 4K
     24013 8192 8.192K 8.2K 8K
     24114 16384 16.384K 16.4K 16K
     24215 32768 32.768K 32.8K 33K
     24316 65536 65.536K 65.5K 66K
     24417 131072 131.072K 131.1K 131K
     24518 262144 262.144K 262.1K 262K
     24619 524288 524.288K 524.3K 524K
     24720 1048576 1.04858M 1.0M 1M
     24821 2097152 2.09715M 2.1M 2M
     24922 4194304 4.1943M 4.2M 4M
     25023 8388608 8.38861M 8.4M 8M
     25124 16777216 16.7772M 16.8M 17M
     25225 33554432 33.5544M 33.6M 34M
     25326 67108864 67.1089M 67.1M 67M
     25427 134217728 134.218M 134.2M 134M
     25528 268435456 268.435M 268.4M 268M
     25629 536870912 536.871M 536.9M 537M
     25730 1073741824 1.07374G 1.1G 1G
     25831 2147483648 2.14748G 2.1G 2G
  • tests/io/manipulatorsOutput4.cfa

    r0030b508 rfc12f05  
    77// Created On       : Tue Apr 13 17:55:02 2021
    88// Last Modified By : Peter A. Buhr
    9 // Last Modified On : Tue Apr 13 18:00:33 2021
    10 // Update Count     : 4
     9// Last Modified On : Tue Oct 17 08:37:42 2023
     10// Update Count     : 5
    1111//
    1212
     
    4242                         | left(ws(12,5, eng(w) )) | left(sign(ws(12,5, eng(w) ))) | left(wd(12,5, eng(w) )) | left(sign(wd(12,5, eng(w) ))) | left(pad0(ws(12,5, eng(w) ))) | left(pad0(sign(ws(12,5, eng(w) )))) | left(pad0(wd(12,5, eng(w) ))) | left(pad0(sign(wd(12,5, eng(w) ))));
    4343        } // for
     44
     45        for ( exp; sizeof(int) * 8 ) {
     46                size_t pow2 = 1z << exp;
     47                sout | exp | pow2 | unit(eng(pow2)) | wd(0,1, unit(eng( pow2 ))) | wd(0,0, unit(eng(pow2)));
     48        } // for
    4449} // main
    4550
Note: See TracChangeset for help on using the changeset viewer.