Changeset 200fcb3 for tests/ifwhileCtl.cfa
- Timestamp:
- Dec 12, 2018, 9:16:12 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:
- 5ebb1368
- Parents:
- 3d99498
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/ifwhileCtl.cfa
r3d99498 r200fcb3 10 10 // Created On : Sat Aug 26 10:13:11 2017 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Nov 6 17:57:07201813 // Update Count : 2 212 // Last Modified On : Tue Dec 4 21:39:18 2018 13 // Update Count : 23 14 14 // 15 15 … … 22 22 23 23 if ( int x = 1 ) { 24 sout | "x != 0 correct" | endl;24 sout | "x != 0 correct"; 25 25 } else { 26 sout | "x == 0 incorrect" | endl;26 sout | "x == 0 incorrect"; 27 27 } // if 28 28 29 29 if ( int x = 4, y = 0 ) { 30 sout | "x != 0 && y != 0 incorrect" | endl;30 sout | "x != 0 && y != 0 incorrect"; 31 31 } else if ( int x = 4, y = 1 ) { 32 sout | "x != 0 && y != 0 correct" | endl;32 sout | "x != 0 && y != 0 correct"; 33 33 } else { 34 sout | "x == 0 || y == 0 incorrect" | endl;34 sout | "x == 0 || y == 0 incorrect"; 35 35 } // if 36 36 37 37 if ( int x = 5, y = f( x ); x == y ) { 38 sout | "x == y correct" | endl;38 sout | "x == y correct"; 39 39 } else { 40 sout | "x != y incorrect" | endl;40 sout | "x != y incorrect"; 41 41 } // if 42 42 43 43 if ( struct S { int i; } s = { 3 }; s.i < 4 ) { 44 44 S s1; 45 sout | "s.i < 4 correct" | endl;45 sout | "s.i < 4 correct"; 46 46 } else { 47 47 S s1; 48 sout | "s.i >= 4 incorrect" | endl;48 sout | "s.i >= 4 incorrect"; 49 49 } // if 50 50 51 51 while ( int x = 1 ) { 52 sout | "x != 0 correct" | endl;52 sout | "x != 0 correct"; 53 53 break; 54 54 } // while 55 55 56 56 while ( int x = 4, y = 0 ) { 57 sout | "x != 0 && y != 0 incorrect" | endl;57 sout | "x != 0 && y != 0 incorrect"; 58 58 } // while 59 59 60 60 while ( int x = 5, y = f( x ); x == y ) { 61 sout | "x == y correct" | endl;61 sout | "x == y correct"; 62 62 break; 63 63 } // while … … 65 65 while ( struct S { int i; } s = { 3 }; s.i < 4 ) { 66 66 S s1; 67 sout | "s.i < 4 correct" | endl;67 sout | "s.i < 4 correct"; 68 68 break; 69 69 } // while
Note: See TracChangeset
for help on using the changeset viewer.