- Timestamp:
- Jul 12, 2019, 1:46:10 PM (4 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 302d84c2
- Parents:
- 1d760934
- Location:
- tests
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/loopctrl.cfa
r1d760934 r65240bb 10 10 // Created On : Wed Aug 8 18:32:59 2018 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sat Apr 13 11:03:09201913 // Update Count : 10 412 // Last Modified On : Fri Jul 12 12:05:05 2019 13 // Update Count : 106 14 14 // 15 15 … … 32 32 S ?-=?( S & t, one_t ) { t.i -= 1; t.j -= 1; return t; } 33 33 ofstream & ?|?( ofstream & os, S v ) { return os | '(' | v.i | v.j | ')'; } 34 void & ?|?( ofstream & os, S v ) { (ofstream &)(os | v); nl( os ); }34 void & ?|?( ofstream & os, S v ) { (ofstream &)(os | v); ends( os ); } 35 35 36 36 int main() { -
tests/math1.cfa
r1d760934 r65240bb 10 10 // Created On : Fri Apr 22 14:59:21 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Mon Mar 25 22:56:47201913 // Update Count : 1 0912 // Last Modified On : Fri Jul 12 12:04:56 2019 13 // Update Count : 111 14 14 // 15 15 … … 59 59 S ?\?( S s, unsigned long y ) { return (S){ s.i \ y }; } 60 60 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 ); } 62 62 S s = { 4 }; 63 63 S x = s \ 2; -
tests/sum.cfa
r1d760934 r65240bb 11 11 // Created On : Wed May 27 17:56:53 2015 12 12 // Last Modified By : Peter A. Buhr 13 // Last Modified On : Thu Jun 6 16:18:22201914 // Update Count : 33 313 // Last Modified On : Fri Jul 12 12:05:16 2019 14 // Update Count : 335 15 15 // 16 16 … … 97 97 S ?++( S & t ) { S temp = t; t += (S){1}; return temp; } 98 98 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 ); } 100 100 101 101 S s = (S){0}, a[size], v = { low, low }; … … 184 184 S ?++( S & t ) { S temp = t; t += (S){1}; return temp; } 185 185 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 ); } 187 187 188 188 S s = (S){0}, a[size], v = { low, low }; -
tests/swap.cfa
r1d760934 r65240bb 10 10 // Created On : Wed May 27 17:56:53 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sun Dec 23 23:00:49 201813 // Update Count : 7 712 // Last Modified On : Fri Jul 12 12:05:26 2019 13 // Update Count : 79 14 14 // 15 15 … … 85 85 struct S { int i, j; } s1 = { 1, 2 }, s2 = { 2, 1 }; 86 86 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 ); } 88 88 sout | "struct S\t\t" | s1 | "," | s2 | "\t\tswap " | nonl; 89 89 swap( s1, s2 );
Note: See TracChangeset
for help on using the changeset viewer.