Changeset 90152a4 for tests/ifwhileCtl.c
- Timestamp:
- Aug 27, 2018, 4:40:34 PM (7 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- b7c89aa
- Parents:
- f9feab8 (diff), 305581d (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. - File:
-
- 1 moved
-
tests/ifwhileCtl.c (moved) (moved from src/tests/ifcond.c ) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tests/ifwhileCtl.c
rf9feab8 r90152a4 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // if cond.c --7 // ifwhileCtl.c -- 8 8 // 9 9 // Author : Peter A. Buhr 10 10 // Created On : Sat Aug 26 10:13:11 2017 11 // Last Modified By : Rob Schluntz12 // Last Modified On : Fri Sep 01 15:22:19 201713 // Update Count : 1411 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Jun 6 17:15:09 2018 13 // Update Count : 21 14 14 // 15 15 16 #include <fstream >16 #include <fstream.hfa> 17 17 18 18 int f( int r ) { return r; } … … 40 40 sout | "x != y incorrect" | endl; 41 41 } // if 42 43 if ( struct S { int i; } s = { 3 }; s.i < 4 ) { 44 S s1; 45 sout | "s.i < 4 correct" | endl; 46 } else { 47 S s1; 48 sout | "s.i >= 4 incorrect" | endl; 49 } // if 50 51 while ( int x = 1 ) { 52 sout | "x != 0 correct" | endl; 53 break; 54 } // while 55 56 while ( int x = 4, y = 0 ) { 57 sout | "x != 0 && y != 0 incorrect" | endl; 58 } // while 59 60 while ( int x = 5, y = f( x ); x == y ) { 61 sout | "x == y correct" | endl; 62 break; 63 } // while 64 65 while ( struct S { int i; } s = { 3 }; s.i < 4 ) { 66 S s1; 67 sout | "s.i < 4 correct" | endl; 68 break; 69 } // while 42 70 } // main 43 71 44 72 // Local Variables: // 45 73 // tab-width: 4 // 46 // compile-command: "cfa if cond.c" //74 // compile-command: "cfa ifwhileCtl.c" // 47 75 // End: //
Note:
See TracChangeset
for help on using the changeset viewer.