- Timestamp:
- Jul 1, 2017, 5:24:03 PM (8 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- 86f384b
- Parents:
- b0f7a43
- Location:
- src/tests
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/tests/.expect/io.txt
rb0f7a43 rd395012 5 5 6 6 x (1 x [2 x {3 x =4 x $5 x £6 x ¥7 x ¡8 x ¿9 x «10 7 1, x 2. x 3; x 4! x 5? x 6% x 7¢ x 8» x 9) x 10] x 11} x 7 1, x 2. x 3; x 4! x 5? x 6% x 7¢ x 8» x 9) x 10] x 11} x 8 8 x`1`x'2'x"3"x:4:x 5 x 6 x 9 9 7 … … 14 14 x 15 15 10 16 x 16 x 17 17 x ( 1 ) x 2 , x 3 :x: 4 18 18 A … … 23 23 1.11.21.3 24 24 1.1+2.3i1.1-2.3i1.1-2.3i 25 abcxyz 26 abcxyz 25 abcxyz 26 abcxyz 27 27 28 28 1.1, $1.2, $1.3 29 29 1.1+2.3i, $1.1-2.3i, $1.1-2.3i 30 abc, $xyz 30 abc, $xyz, $ 31 31 32 32 1, 2, 3, 4 33 33 34 1, $2, $3 ", $" 34 35 1 2 3 " " 36 37 1 2 3 38 12 3 35 39 1 2 3 36 12 3 40 1 2 3 41 1 2 3 42 37 43 123 38 44 1 23 39 45 1 2 3 46 123 47 1 2 3 48 123 49 1 2 3 50 40 51 1 2 3 4 " " 41 52 1, 2, 3, 4 ", " 42 53 1, 2, 3, 4 54 43 55 3, 4, a, 7.2 44 56 3, 4, a, 7.2 -
src/tests/io.c
rb0f7a43 rd395012 10 10 // Created On : Wed Mar 2 16:56:02 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Jun 8 09:52:10201713 // Update Count : 5 112 // Last Modified On : Sat Jul 1 16:21:07 2017 13 // Update Count : 58 14 14 // 15 15 … … 108 108 [int, int] t1 = [1, 2], t2 = [3, 4]; 109 109 sout | t1 | t2 | endl; // print tuple 110 sout | endl; 110 111 111 112 sepSet( sout, " " ); … … 114 115 sepSet( sout, " " ); // reset separator to " " 115 116 sout | 1 | 2 | 3 | " \"" | sepGet( sout ) | "\"" | endl; 117 sout | endl; 116 118 117 sout | sepOn | 1 | 2 | 3 | sepOn | endl; // separator at start of line119 sout | sepOn | 1 | 2 | 3 | sepOn | endl; // separator at start/end of line 118 120 sout | 1 | sepOff | 2 | 3 | endl; // locally turn off implicit separator 121 sout | sepOn | 1 | 2 | 3 | sepOn | sepOff | endl; // separator at start of line 122 sout | 1 | 2 | 3 | endl | sepOn; // separator at start of next line 123 sout | 1 | 2 | 3 | endl; 124 sout | endl; 119 125 120 126 sout | sepDisable | 1 | 2 | 3 | endl; // globally turn off implicit separation 121 127 sout | 1 | sepOn | 2 | 3 | endl; // locally turn on implicit separator 122 sout | sepEnable | 1 | 2 | 3 | endl; // globally turn on implicit separation 128 sout | sepEnable | 1 | 2 | 3 | endl | sepDisable; // globally turn on/off implicit separation 129 sout | 1 | 2 | 3 | endl | sepEnable; // globally turn on implicit separation 130 sout | 1 | 2 | 3 | sepOn | sepDisable | endl; // ignore seperate at end of line 131 sout | 1 | 2 | 3 | sepOn | sepEnable | endl; // separator at end of line 132 sout | 1 | 2 | 3 | endl; 133 sout | endl; 123 134 124 135 sepSetTuple( sout, " " ); // set tuple separator from ", " to " " … … 126 137 sepSetTuple( sout, ", " ); // reset tuple separator to ", " 127 138 sout | t1 | t2 | " \"" | sepGetTuple( sout ) | "\"" | endl; 128 129 139 sout | t1 | t2 | endl; // print tuple 140 sout | endl; 130 141 131 142 [int, int, const char *, double] t3 = { 3, 4, "a", 7.2 };
Note:
See TracChangeset
for help on using the changeset viewer.