Changeset 65240bb for tests


Ignore:
Timestamp:
Jul 12, 2019, 1:46:10 PM (3 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
arm-eh, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation
Children:
302d84c2
Parents:
1d760934
Message:

first attempt to add streams exit and abort, rename private iostream nl function to ends

Location:
tests
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • tests/loopctrl.cfa

    r1d760934 r65240bb  
    1010// Created On       : Wed Aug  8 18:32:59 2018
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sat Apr 13 11:03:09 2019
    13 // Update Count     : 104
     12// Last Modified On : Fri Jul 12 12:05:05 2019
     13// Update Count     : 106
    1414//
    1515
     
    3232S ?-=?( S & t, one_t ) { t.i -= 1; t.j -= 1; return t; }
    3333ofstream & ?|?( ofstream & os, S v ) { return os | '(' | v.i | v.j | ')'; }
    34 void & ?|?( ofstream & os, S v ) { (ofstream &)(os | v); nl( os ); }
     34void & ?|?( ofstream & os, S v ) { (ofstream &)(os | v); ends( os ); }
    3535
    3636int main() {
  • tests/math1.cfa

    r1d760934 r65240bb  
    1010// Created On       : Fri Apr 22 14:59:21 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon Mar 25 22:56:47 2019
    13 // Update Count     : 109
     12// Last Modified On : Fri Jul 12 12:04:56 2019
     13// Update Count     : 111
    1414//
    1515
     
    5959        S ?\?( S s, unsigned long y ) { return (S){ s.i \ y }; }
    6060        ofstream & ?|?( ofstream & os, S s ) { return os | s.i; }
    61         void ?|?( ofstream & os, S s ) { (ofstream &)(os | s); nl( os ); }
     61        void ?|?( ofstream & os, S s ) { (ofstream &)(os | s); ends( os ); }
    6262        S s = { 4 };
    6363        S x = s \ 2;
  • tests/sum.cfa

    r1d760934 r65240bb  
    1111// Created On       : Wed May 27 17:56:53 2015
    1212// Last Modified By : Peter A. Buhr
    13 // Last Modified On : Thu Jun  6 16:18:22 2019
    14 // Update Count     : 333
     13// Last Modified On : Fri Jul 12 12:05:16 2019
     14// Update Count     : 335
    1515//
    1616
     
    9797        S ?++( S & t ) { S temp = t; t += (S){1}; return temp; }
    9898        ofstream & ?|?( ofstream & os, S v ) { return os | v.i | v.j; }
    99         void ?|?( ofstream & os, S v ) { (ofstream &)(os | v); nl( os ); }
     99        void ?|?( ofstream & os, S v ) { (ofstream &)(os | v); ends( os ); }
    100100
    101101        S s = (S){0}, a[size], v = { low, low };
     
    184184        S ?++( S & t ) { S temp = t; t += (S){1}; return temp; }
    185185        ofstream & ?|?( ofstream & os, S v ) { return os | v.i | v.j; }
    186         void ?|?( ofstream & os, S v ) { (ofstream &)(os | v); nl( os ); }
     186        void ?|?( ofstream & os, S v ) { (ofstream &)(os | v); ends( os ); }
    187187
    188188        S s = (S){0}, a[size], v = { low, low };
  • tests/swap.cfa

    r1d760934 r65240bb  
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sun Dec 23 23:00:49 2018
    13 // Update Count     : 77
     12// Last Modified On : Fri Jul 12 12:05:26 2019
     13// Update Count     : 79
    1414//
    1515
     
    8585        struct S { int i, j; } s1 = { 1, 2 }, s2 = { 2, 1 };
    8686        ofstream & ?|?( ofstream & os, S s ) { return os | s.i | s.j; }
    87         void ?|?( ofstream & os, S s ) { (ofstream &)(os | s.i | s.j); nl( os ); }
     87        void ?|?( ofstream & os, S s ) { (ofstream &)(os | s.i | s.j); ends( os ); }
    8888        sout | "struct S\t\t" | s1 | "," | s2 | "\t\tswap " | nonl;
    8989        swap( s1, s2 );
Note: See TracChangeset for help on using the changeset viewer.