- Timestamp:
- Jul 7, 2017, 10:39:08 AM (7 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:
- 29038ef
- Parents:
- 52a9004
- Location:
- src/tests
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/tests/.expect/io.txt
r52a9004 r53a6c2a 4 4 123 5 5 6 opening delimiters 6 opening delimiters 7 7 x (1 x [2 x {3 x =4 x $5 x £6 x ¥7 x ¡8 x ¿9 x «10 8 8 9 closing delimiters 10 1, x 2. x 3; x 4! x 5? x 6% x 7¢ x 8» x 9) x 10] x 11} x 9 closing delimiters 10 1, x 2. x 3; x 4! x 5? x 6% x 7¢ x 8» x 9) x 10] x 11} x 11 11 12 opening/closing delimiters 12 opening/closing delimiters 13 13 x`1`x'2'x"3"x:4:x 5 x 6 x 14 14 7 … … 19 19 x 20 20 10 21 x 21 x 22 22 23 override opening/closing delimiters 23 override opening/closing delimiters 24 24 x ( 1 ) x 2 , x 3 :x: 4 25 25 26 input bacis types 26 input bacis types 27 27 28 output basic types 28 output basic types 29 29 A 30 30 1 2 3 4 5 6 7 8 … … 32 32 1.1+2.3i 1.1-2.3i 1.1-2.3i 33 33 34 tuples 35 1, 2, 3 3, 4, 534 tuples 35 1, 2, 3 4, 5, 6 36 36 37 toggle separator 37 toggle separator 38 38 1.11.21.3 39 39 1.1+2.3i1.1-2.3i1.1-2.3i 40 abcxyz 41 abcxyz 40 1.1+2.3i 1.1-2.3i1.1-2.3i 41 1.1+2.3i 1.1-2.3i 1.1-2.3i 42 1.1+2.3i1.1-2.3i 1.1-2.3i 43 abcxyz 44 abcxyz 42 45 43 change separator 44 from " "to ", $"46 change separator 47 from " " to ", $" 45 48 1.1, $1.2, $1.3 46 49 1.1+2.3i, $1.1-2.3i, $1.1-2.3i 47 abc, $xyz , $48 1, 2, 3, $ 3, 4, 550 abc, $xyz 51 1, 2, 3, $4, 5, 6 49 52 50 from ", $" to " "53 from ", $" to " " 51 54 1.1 1.2 1.3 52 55 1.1+2.3i 1.1-2.3i 1.1-2.3i 53 abc xyz 54 1, 2, 3 3, 4, 556 abc xyz 57 1, 2, 3 4, 5, 6 55 58 56 1 2 3 59 check sepOn/sepOff 60 1 2 3 57 61 12 3 58 1 2 359 62 1 2 3 60 63 1 2 3 61 64 65 1 2 3 66 67 check enable/disable 62 68 123 63 69 1 23 … … 65 71 123 66 72 1 2 3 67 123 73 123 68 74 1 2 3 69 75 70 1 2 3 3 4 5" "71 1, 2, 3 3, 4, 5 ","72 1, 2, 3 3, 4, 576 1 2 3 4 5 6 " " 77 1, 2, 3 4, 5, 6 " " 78 1, 2, 3 4, 5, 6 73 79 74 80 3, 4, a, 7.2 75 81 3, 4, a, 7.2 76 82 3 4 a 7.2 77 83 3 4 a 7.234a7.23 4 a 7.2 78 84 3-4-a-7.2^3^4^3-4-a-7.2 -
src/tests/io.c
r52a9004 r53a6c2a 10 10 // Created On : Wed Mar 2 16:56:02 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sun Jul 2 09:40:58201713 // Update Count : 6812 // Last Modified On : Thu Jul 6 23:26:12 2017 13 // Update Count : 78 14 14 // 15 15 … … 104 104 105 105 sout | "tuples" | endl; 106 [int, [ int, int ] ] t1 = [ 1, [ 2, 3 ] ], t2 = [ 3, [ 4, 5] ];106 [int, [ int, int ] ] t1 = [ 1, [ 2, 3 ] ], t2 = [ 4, [ 5, 6 ] ]; 107 107 sout | t1 | t2 | endl; // print tuple 108 108 sout | endl; … … 110 110 sout | "toggle separator" | endl; 111 111 sout | f | "" | d | "" | ld | endl // floating point without separator 112 | sepDisable | fc | dc | ldc | sepEnable | endl // complex without separator 113 | sepOn | s1 | sepOff | s2 | endl // local separator removal 114 | s1 | "" | s2 | endl; // C string without separator 112 | sepDisable | fc | dc | ldc | endl // complex without separator 113 | fc | sepOn | dc | ldc | endl // local separator add 114 | sepEnable | fc | dc | ldc | endl // complex with separator 115 | fc | sepOff | dc | ldc | endl // local separator removal 116 | s1 | sepOff | s2 | endl // local separator removal 117 | s1 | "" | s2 | endl; // local separator removal 115 118 sout | endl; 116 119 117 120 sout | "change separator" | endl; 118 sout | "from \" " | sepGet( sout )| "\"";121 sout | "from \"" | sep | "\""; 119 122 sepSet( sout, ", $" ); // change separator, maximum of 15 characters 120 sout | " to \" " | sepGet( sout )| "\"" | endl;123 sout | " to \"" | sep | "\"" | endl; 121 124 sout | f | d | ld | endl 122 125 | fc | dc | ldc | endl … … 124 127 | t1 | t2 | endl; // print tuple 125 128 sout | endl; 126 sout | "from \"" | sep Get( sout ) | "\"";129 sout | "from \"" | sep | "\" "; 127 130 sepSet( sout, " " ); // restore separator 128 sout | "to \"" | sep Get( sout )| "\"" | endl;131 sout | "to \"" | sep | "\"" | endl; 129 132 sout | f | d | ld | endl 130 133 | fc | dc | ldc | endl … … 133 136 sout | endl; 134 137 135 sout | sepOn | 1 | 2 | 3 | sepOn | endl; // separator at start/end of line 138 sout | "check sepOn/sepOff" | endl; 139 sout | sepOn | 1 | 2 | 3 | sepOn | endl; // no separator at start/end of line 136 140 sout | 1 | sepOff | 2 | 3 | endl; // locally turn off implicit separator 137 sout | sepOn | 1 | 2 | 3 | sepOn | sepOff | endl; // separator at startof line138 sout | 1 | 2 | 3 | endl | sepOn; //separator at start of next line141 sout | sepOn | sepOn | 1 | 2 | 3 | sepOn | sepOff | sepOn | '\n'; // no separator at start/end of line 142 sout | 1 | 2 | 3 | "\n\n" | sepOn; // no separator at start of next line 139 143 sout | 1 | 2 | 3 | endl; 140 144 sout | endl; 141 145 146 sout | "check enable/disable" | endl; 142 147 sout | sepDisable | 1 | 2 | 3 | endl; // globally turn off implicit separation 143 148 sout | 1 | sepOn | 2 | 3 | endl; // locally turn on implicit separator … … 149 154 sout | endl; 150 155 156 // sout | fmt( d, "%8.3f" ) || endl; 157 // sout | endl; 158 151 159 sepSetTuple( sout, " " ); // set tuple separator from ", " to " " 152 sout | t1 | t2 | " \"" | sep GetTuple( sout )| "\"" | endl;160 sout | t1 | t2 | " \"" | sep | "\"" | endl; 153 161 sepSetTuple( sout, ", " ); // reset tuple separator to ", " 154 sout | t1 | t2 | " \"" | sep GetTuple( sout )| "\"" | endl;162 sout | t1 | t2 | " \"" | sep | "\"" | endl; 155 163 sout | t1 | t2 | endl; // print tuple 156 164 sout | endl;
Note: See TracChangeset
for help on using the changeset viewer.