Changeset ae4af81 for tests


Ignore:
Timestamp:
Aug 20, 2018, 7:34:27 AM (6 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, no_list, persistent-indexer, pthread-emulation, qualifiedEnum
Children:
69efc321
Parents:
5346dce
Message:

more forctrl changes

Location:
tests
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • tests/coroutine/fibonacci.c

    r5346dce rae4af81  
    66//
    77// fibonacci.c -- 3-state finite-state machine
    8 
    98//
    109// Author           : Thierry Delisle
    1110// Created On       : Thu Jun  8 07:29:37 2017
    1211// Last Modified By : Peter A. Buhr
    13 // Last Modified On : Thu Aug 16 08:18:16 2018
    14 // Update Count     : 20
     12// Last Modified On : Sat Aug 18 11:21:58 2018
     13// Update Count     : 24
    1514//
    1615
     
    3938int main() {
    4039        Fibonacci f1, f2;
    41         for ( int i = 1; i <= 10; i += 1 ) {
     40        for ( 10 ) {                                                                            // print N Fibonacci values
    4241                sout | next( f1 ) | next( f2 ) | endl;
    4342        } // for
  • tests/coroutine/pingpong.c

    r5346dce rae4af81  
    1010// Created On       : Wed Sep 20 11:55:23 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Sep 20 13:41:39 2017
    13 // Update Count     : 26
     12// Last Modified On : Sat Aug 18 11:31:11 2018
     13// Update Count     : 28
    1414//
    1515
     
    3939}
    4040void main( PingPong & pingpong ) {                                              // ping's starter ::main, pong's starter ping
    41         for ( unsigned int i = 0; i < pingpong.N; i += 1 ) {
     41        for ( pingpong.N ) {                                                            // N ping-pongs
    4242                sout | pingpong.name | endl;
    4343                cycle( *pingpong.part );
  • tests/coroutine/prodcons.c

    r5346dce rae4af81  
    1010// Created On       : Mon Sep 18 12:23:39 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Jan  2 12:17:01 2018
    13 // Update Count     : 47
     12// Last Modified On : Sat Aug 18 12:55:10 2018
     13// Update Count     : 51
    1414//
    1515
    1616#include <fstream.hfa>
    1717#include <coroutine.hfa>
    18 #include <stdlib.hfa>                                                                           // random
     18#include <stdlib.hfa>                                                                   // random
    1919#include <unistd.h>                                                                             // getpid
    2020
     
    2929void main( Prod & prod ) with( prod ) {                                 // starter ::main
    3030        // 1st resume starts here
    31         for ( int i = 0; i < N; i += 1 ) {
     31        for ( i; N ) {                                                                          // N pairs of values
    3232                int p1 = random( 100 );
    3333                int p2 = random( 100 );
  • tests/gmp.c

    r5346dce rae4af81  
    1010// Created On       : Tue Apr 19 08:55:51 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Sep 28 18:33:51 2017
    13 // Update Count     : 555
     12// Last Modified On : Sat Aug 18 12:43:13 2018
     13// Update Count     : 556
    1414//
    1515
     
    8989        fn = 1; fn2 = fn1; fn1 = fn;                                            // 2nd case
    9090        sout | 1 | fn | endl;
    91         for ( unsigned int i = 2; i <= 200; i += 1 ) {
     91        for ( i; 2u ~= 200 ) {
    9292                fn = fn1 + fn2; fn2 = fn1; fn1 = fn;                    // general case
    9393                sout | i | fn | endl;
     
    9999        Int fact = 1;                                                                           // 1st case
    100100        sout | (int)0 | fact | endl;
    101         for ( unsigned int i = 1; i <= 40; i += 1 ) {
     101        for ( i; 1u ~= 40u ) {
    102102                fact *= i;                                                                              // general case
    103103                sout | i | fact | endl;
Note: See TracChangeset for help on using the changeset viewer.