- Timestamp:
- Dec 26, 2018, 7:19:48 AM (6 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, no_list, persistent-indexer, pthread-emulation, qualifiedEnum
- Children:
- f498c51
- Parents:
- 9d362a0
- git-author:
- Peter A. Buhr <pabuhr@…> (12/25/18 17:53:59)
- git-committer:
- Peter A. Buhr <pabuhr@…> (12/26/18 07:19:48)
- Location:
- tests
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/loopctrl.cfa
r9d362a0 ref346f7c 10 10 // Created On : Wed Aug 8 18:32:59 2018 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : S at Dec 22 09:41:15201813 // Update Count : 7 712 // Last Modified On : Sun Dec 23 23:00:29 2018 13 // Update Count : 79 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); if ( getANL( os ) )nl( os ); }34 void & ?|?( ofstream & os, S v ) { (ofstream &)(os | v); nl( os ); } 35 35 36 36 int main() { -
tests/sum.cfa
r9d362a0 ref346f7c 11 11 // Created On : Wed May 27 17:56:53 2015 12 12 // Last Modified By : Peter A. Buhr 13 // Last Modified On : Tue Dec 11 21:50:41201814 // Update Count : 28 513 // Last Modified On : Sun Dec 23 23:00:38 2018 14 // Update Count : 287 15 15 // 16 16 … … 93 93 S ?++( S & t ) { S temp = t; t += (S){1}; return temp; } 94 94 ofstream & ?|?( ofstream & os, S v ) { return os | v.i | v.j; } 95 void ?|?( ofstream & os, S v ) { (ofstream )(os | v); if ( getANL( os ) )nl( os ); }95 void ?|?( ofstream & os, S v ) { (ofstream &)(os | v); nl( os ); } 96 96 97 97 S s = (S){0}, a[size], v = { low, low }; -
tests/swap.cfa
r9d362a0 ref346f7c 10 10 // Created On : Wed May 27 17:56:53 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : S at Dec 22 16:01:33201813 // Update Count : 7 512 // Last Modified On : Sun Dec 23 23:00:49 2018 13 // Update Count : 77 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); if ( getANL( os ) )nl( os ); }87 void ?|?( ofstream & os, S s ) { (ofstream &)(os | s.i | s.j); nl( 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.