Changeset 2f19e03 for tests


Ignore:
Timestamp:
Jun 15, 2021, 12:28:48 PM (5 years ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
ADT, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
b51e389c
Parents:
4aba055 (diff), 4f1b8f3f (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' into andrew-mmath, collecting updates.

Location:
tests
Files:
4 added
5 edited
1 moved

Legend:

Unmodified
Added
Removed
  • tests/coroutine/fibonacci.cfa

    r4aba055 r2f19e03  
    3131}
    3232
    33 int next( Fibonacci & fib ) with( fib ) {
    34         resume( fib );                                                                          // restart last suspend
    35         return fn;
    36 }
    37 
    3833int main() {
    3934        Fibonacci f1, f2;
    4035        for ( 10 ) {                                                                            // print N Fibonacci values
    41                 sout | next( f1 ) | next( f2 );
     36                sout | resume( f1 ).fn | resume( f2 ).fn;
    4237        } // for
    4338}
  • tests/generator/fibonacci.cfa

    r4aba055 r2f19e03  
    88//
    99// Author           : Thierry Delisle
    10 // Created On       : Mon Mar  1 16:54:23 2020
    11 // Last Modified By :
    12 // Last Modified On :
    13 // Update Count     :
     10// Created On       : Mon Mar 1 16:54:23 2020
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Thu Jun 10 21:54:14 2021
     13// Update Count     : 3
    1414//
     15
     16#include <fstream.hfa>
    1517
    1618generator Fib {
     
    1820};
    1921
    20 void main(Fib & b) with (b) {
     22void main(Fib & fib) with (fib) {
    2123        [fn1, fn] = [1, 0];
    2224        for () {
     
    2931        Fib f1, f2;
    3032        for ( 10 ) {
    31                 resume( f1 );
    32                 resume( f2 );
    33                 printf("%d %d\n", f1.fn, f2.fn);
     33                resume( f1 ); resume( f2 );
     34                sout | f1.fn | f2.fn;
     35                // sout | resume( f1 ).fn | resume( f2 ).fn; // compiler bug
    3436        }
    35 
    3637}
    3738
  • tests/generator/fmtLines.cfa

    r4aba055 r2f19e03  
    99// Author           : Thierry Delisle
    1010// Created On       : Thu Mar  5 16:09:08 2020
    11 // Last Modified By :
    12 // Last Modified On :
    13 // Update Count     :
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Thu Jun 10 21:56:22 2021
     13// Update Count     : 2
    1414//
    1515
  • tests/generator/suspend_then.cfa

    r4aba055 r2f19e03  
    99// Author           : Peter A. Buhr
    1010// Created On       : Mon Apr 29 12:01:35 2019
    11 // Last Modified By :
    12 // Last Modified On :
    13 // Update Count     :
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Thu Jun 10 21:55:51 2021
     13// Update Count     : 1
    1414//
    1515
  • tests/unified_locking/fast.cfa

    r4aba055 r2f19e03  
    2222uint32_t cs() {
    2323        $thread * me = active_thread();
    24         uint32_t value = (uint32_t)me;
     24        uint32_t value;
    2525        lock(mo.l);
    2626        {
     
    2828                mo.id = me;
    2929                yield(random(5));
     30                value = ((uint32_t)random()) ^ ((uint32_t)me);
    3031                if(mo.id != me) sout | "Intruder!";
    3132                mo.sum = tsum + value;
Note: See TracChangeset for help on using the changeset viewer.