- Timestamp:
- Oct 13, 2023, 7:13:21 PM (2 years ago)
- Branches:
- master
- Children:
- a97b9ed, bab2917
- Parents:
- 85034ed (diff), 0bf0b978 (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. - Location:
- tests
- Files:
-
- 10 added
- 15 edited
-
.expect/linkonce.txt (modified) (1 diff)
-
collections/.expect/string-istream-manip.txt (modified) (3 diffs)
-
collections/.in/string-istream-manip.txt (modified) (1 diff)
-
collections/string-istream-manip.cfa (modified) (3 diffs)
-
concurrency/cofor.cfa (modified) (1 diff)
-
errors/.expect/scope-type.txt (added)
-
errors/.expect/scope.txt (modified) (1 diff)
-
errors/scope-type.cfa (added)
-
errors/scope.cfa (modified) (1 diff)
-
exceptions/.expect/hotpotato.arm64.txt (added)
-
exceptions/.expect/hotpotato.x64.txt (added)
-
exceptions/.expect/hotpotato.x86.txt (added)
-
exceptions/.expect/hotpotato_checked.arm64.txt (added)
-
exceptions/.expect/hotpotato_checked.x64.txt (added)
-
exceptions/.expect/hotpotato_checked.x86.txt (added)
-
exceptions/hotpotato.cfa (added)
-
exceptions/hotpotato_checked.cfa (added)
-
io/.expect/manipulatorsInput.arm64.txt (modified) (3 diffs)
-
io/.expect/manipulatorsInput.x64.txt (modified) (3 diffs)
-
io/.expect/manipulatorsInput.x86.txt (modified) (3 diffs)
-
io/.in/manipulatorsInput.txt (modified) (1 diff)
-
io/manipulatorsInput.cfa (modified) (3 diffs)
-
link-once/main.cfa (modified) (1 diff)
-
link-once/partner.cfa (modified) (1 diff)
-
test.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tests/.expect/linkonce.txt
r85034ed r8cbe732 1 signed= -7 unsigned=121 signed=7 unsigned=12 -
tests/collections/.expect/string-istream-manip.txt
r85034ed r8cbe732 1 preS1 0123456 2 preS1 x 3 preS2 01234567 4 preS2 x 5 preS3 012345678 6 preS3 x 7 preS4 0123456789 8 preS4 x 9 preSMN1 ...:...:...:...|...:...:...:...|...:...:...:...|...:...:...:...#...:...:...:...|...:...:...:...|...:...:...:...|...:...0123456 10 preSMN1 x 11 preSMN2 ...:...:...:...|...:...:...:...|...:...:...:...|...:...:...:...#...:...:...:...|...:...:...:...|...:...:...:...|...:...01234567 12 preSMN2 x 13 preSMN3 ...:...:...:...|...:...:...:...|...:...:...:...|...:...:...:...#...:...:...:...|...:...:...:...|...:...:...:...|...:...012345678 14 preSMN3 x 15 preSMN4 ...:...:...:...|...:...:...:...|...:...:...:...|...:...:...:...#...:...:...:...|...:...:...:...|...:...:...:...|...:...0123456789 16 preSMN4 x 17 preRMN1 ...:...:...:...|...:...:...:...|...:...:...:...|...:...:...:...#...:...:...:...|...:...:...:...|...:...:...:...|...:...0123456 18 preRMN1 x 19 preRMN2 ...:...:...:...|...:...:...:...|...:...:...:...|...:...:...:...#...:...:...:...|...:...:...:...|...:...:...:...|...:...01234567 20 preRMN2 x 21 preRMN3 ...:...:...:...|...:...:...:...|...:...:...:...|...:...:...:...#...:...:...:...|...:...:...:...|...:...:...:...|...:...012345678 22 preRMN3 x 23 preRMN4 ...:...:...:...|...:...:...:...|...:...:...:...|...:...:...:...#...:...:...:...|...:...:...:...|...:...:...:...|...:...0123456789 24 preRMN4 x 25 preSMI1 "...:...:...:...|...:...:...:...|...:...:...:...|...:...:...:...#...:...:...:...|...:...:...:...|...:...:...:...|...:... " 26 preSMI1 "x" 27 preSMI2 "...:...:...:...|...:...:...:...|...:...:...:...|...:...:...:...#...:...:...:...|...:...:...:...|...:...:...:...|...:... " 28 preSMI2 "x" 29 preSMI3 "...:...:...:...|...:...:...:...|...:...:...:...|...:...:...:...#...:...:...:...|...:...:...:...|...:...:...:...|...:... " 30 preSMI3 "x" 31 preSMI4 "...:...:...:...|...:...:...:...|...:...:...:...|...:...:...:...#...:...:...:...|...:...:...:...|...:...:...:...|...:... " 32 preSMI4 "x" 33 preSME1 "...:...:...:...|...:...:...:...|...:...:...:...|...:...:...:...#...:...:...:...|...:...:...:...|...:...:...:...|...:... " 34 preSME1 "x" 35 preSME2 "...:...:...:...|...:...:...:...|...:...:...:...|...:...:...:...#...:...:...:...|...:...:...:...|...:...:...:...|...:... " 36 preSME2 "x" 37 preSME3 "...:...:...:...|...:...:...:...|...:...:...:...|...:...:...:...#...:...:...:...|...:...:...:...|...:...:...:...|...:... " 38 preSME3 "x" 39 preSME4 "...:...:...:...|...:...:...:...|...:...:...:...|...:...:...:...#...:...:...:...|...:...:...:...|...:...:...:...|...:... " 40 preSME4 "x" 41 preSMG1 ...:...:...:...|...:...:...:...|...:...:...:...|...:...:...:...#...:...:...:...|...:...:...:...|...:...:...:...|...:...0123456 42 preSMG1 x 43 preSMG2 ...:...:...:...|...:...:...:...|...:...:...:...|...:...:...:...#...:...:...:...|...:...:...:...|...:...:...:...|...:...01234567 44 preSMG2 x 45 preSMG3 ...:...:...:...|...:...:...:...|...:...:...:...|...:...:...:...#...:...:...:...|...:...:...:...|...:...:...:...|...:...012345678 46 preSMG3 x 47 preSMG4 ...:...:...:...|...:...:...:...|...:...:...:...|...:...:...:...#...:...:...:...|...:...:...:...|...:...:...:...|...:...0123456789 48 preSMG4 x 49 preSMD1 ...:...:...:...|...:...:...:...|...:...:...:...|...:...:...:...#...:...:...:...|...:...:...:...|...:...:...:...|...:...0123456 50 preSMD1 x 51 preSMD2 ...:...:...:...|...:...:...:...|...:...:...:...|...:...:...:...#...:...:...:...|...:...:...:...|...:...:...:...|...:...01234567 52 preSMD2 x 53 preSMD3 ...:...:...:...|...:...:...:...|...:...:...:...|...:...:...:...#...:...:...:...|...:...:...:...|...:...:...:...|...:...012345678 54 preSMD3 x 55 preSMD4 ...:...:...:...|...:...:...:...|...:...:...:...|...:...:...:...#...:...:...:...|...:...:...:...|...:...:...:...|...:...0123456789 56 preSMD4 x 1 57 1 yyyyyyyyyyyyyyyyyyyy 2 58 2 abcxxx … … 12 68 12 wwwwwwww 13 69 13 wwwwwwww 70 14 cccc 71 15 14 72 1 yyyyyyyyyyyyyyyyyyyy 15 73 2 abcxxx … … 25 83 12 wwwwwwww 26 84 13 wwwwwwww 85 14 cccc 86 15 -
tests/collections/.in/string-istream-manip.txt
r85034ed r8cbe732 1 0123456 x 2 01234567 x 3 012345678 x 4 0123456789 x 5 ...:...:...:...|...:...:...:...|...:...:...:...|...:...:...:...#...:...:...:...|...:...:...:...|...:...:...:...|...:...0123456 x 6 ...:...:...:...|...:...:...:...|...:...:...:...|...:...:...:...#...:...:...:...|...:...:...:...|...:...:...:...|...:...01234567 x 7 ...:...:...:...|...:...:...:...|...:...:...:...|...:...:...:...#...:...:...:...|...:...:...:...|...:...:...:...|...:...012345678 x 8 ...:...:...:...|...:...:...:...|...:...:...:...|...:...:...:...#...:...:...:...|...:...:...:...|...:...:...:...|...:...0123456789 x 9 ...:...:...:...|...:...:...:...|...:...:...:...|...:...:...:...#...:...:...:...|...:...:...:...|...:...:...:...|...:...0123456 x 10 ...:...:...:...|...:...:...:...|...:...:...:...|...:...:...:...#...:...:...:...|...:...:...:...|...:...:...:...|...:...01234567 x 11 ...:...:...:...|...:...:...:...|...:...:...:...|...:...:...:...#...:...:...:...|...:...:...:...|...:...:...:...|...:...012345678 x 12 ...:...:...:...|...:...:...:...|...:...:...:...|...:...:...:...#...:...:...:...|...:...:...:...|...:...:...:...|...:...0123456789 x 13 ...:...:...:...|...:...:...:...|...:...:...:...|...:...:...:...#...:...:...:...|...:...:...:...|...:...:...:...|...:... -x- 14 ...:...:...:...|...:...:...:...|...:...:...:...|...:...:...:...#...:...:...:...|...:...:...:...|...:...:...:...|...:... -x- 15 ...:...:...:...|...:...:...:...|...:...:...:...|...:...:...:...#...:...:...:...|...:...:...:...|...:...:...:...|...:... -x- 16 ...:...:...:...|...:...:...:...|...:...:...:...|...:...:...:...#...:...:...:...|...:...:...:...|...:...:...:...|...:... -x- 17 ...:...:...:...|...:...:...:...|...:...:...:...|...:...:...:...#...:...:...:...|...:...:...:...|...:...:...:...|...:... -x- 18 ...:...:...:...|...:...:...:...|...:...:...:...|...:...:...:...#...:...:...:...|...:...:...:...|...:...:...:...|...:... -x- 19 ...:...:...:...|...:...:...:...|...:...:...:...|...:...:...:...#...:...:...:...|...:...:...:...|...:...:...:...|...:... -x- 20 ...:...:...:...|...:...:...:...|...:...:...:...|...:...:...:...#...:...:...:...|...:...:...:...|...:...:...:...|...:... -x- 21 ...:...:...:...|...:...:...:...|...:...:...:...|...:...:...:...#...:...:...:...|...:...:...:...|...:...:...:...|...:...0123456 22 x 23 ...:...:...:...|...:...:...:...|...:...:...:...|...:...:...:...#...:...:...:...|...:...:...:...|...:...:...:...|...:...01234567 24 x 25 ...:...:...:...|...:...:...:...|...:...:...:...|...:...:...:...#...:...:...:...|...:...:...:...|...:...:...:...|...:...012345678 26 x 27 ...:...:...:...|...:...:...:...|...:...:...:...|...:...:...:...#...:...:...:...|...:...:...:...|...:...:...:...|...:...0123456789 28 x 29 ...:...:...:...|...:...:...:...|...:...:...:...|...:...:...:...#...:...:...:...|...:...:...:...|...:...:...:...|...:...0123456@x@ 30 ...:...:...:...|...:...:...:...|...:...:...:...|...:...:...:...#...:...:...:...|...:...:...:...|...:...:...:...|...:...01234567@x@ 31 ...:...:...:...|...:...:...:...|...:...:...:...|...:...:...:...#...:...:...:...|...:...:...:...|...:...:...:...|...:...012345678@x@ 32 ...:...:...:...|...:...:...:...|...:...:...:...|...:...:...:...#...:...:...:...|...:...:...:...|...:...:...:...|...:...0123456789@x@ 1 33 abc 2 abc34 cccccb 3 35 xx 4 36 abcxxx 5 37 abcyyy 6 38 aaaaaaaaxxxxxxxxaabbccbbdddwwwbbbbbbbbwwwwwwwwaaaaaaaawwwwwwww 39 uuuuuccccuuuuu 7 40 abc 8 abc41 cccccb 9 42 xx 10 43 abcxxx 11 44 abcyyy 12 45 aaaaaaaaxxxxxxxxaabbccbbdddwwwbbbbbbbbwwwwwwwwaaaaaaaawwwwwwww 46 uuuuuccccuuuuu -
tests/collections/string-istream-manip.cfa
r85034ed r8cbe732 3 3 #include <collections/string.hfa> 4 4 #include <collections/string_res.hfa> 5 #include <stdio.h> 6 7 // No-op manipulators. 8 // Temporary hack while there are two code paths in the string implementation. 9 // (One for reading plain strings, the other for reading via a manipulator.) 10 // The test cases that use plainjane(-) are exercising the via-manipulator code path, 11 // just with trivial manipulation. 12 static _Istream_Sstr plainjane( string & s ) { return (_Istream_Sstr)@{ s, {{0p}, -1, {.flags.rwd : false}} }; } 13 static _Istream_Rstr plainjane( string_res & s ) { return (_Istream_Rstr)@{ &s, {{0p}, -1, {.flags.rwd : false}} }; } 14 15 static void forceStringHeapFreeSpaceTo(int desiredSize) { 16 for (1_000_000) { 17 string x = "a"; 18 (void)x; 19 if (desiredSize == DEBUG_string_bytes_avail_until_gc(DEBUG_string_heap())) return; 20 } 21 sout | "Unable to force size" | desiredSize | "in 1,000,000 tries"; 22 } 5 23 6 24 int main() { 25 // These "pre" cases deal with issues analogous to the "pre" cases of io/manipulatorsInput. 26 // The acceptance criterion is simpler but driving the cases is harder. 27 // The tests just read strings and echo what they read; acceptance of simple echoing assures 28 // no spurious splitting merging. 29 // The lengths of the strings are chosen to match white-box knowledge of when the string layer 30 // has tor drive the cstring layer through a second iteration: 31 // - for no-manip, lengths are near the room at end of string heap 32 // (chosen target size of 9 showed the original bug on preS2, aligned with the other cases) 33 // - for manip, lengths are near the auxiliary buffer size of 128 34 // Only first case repeats for string_res; rest run only from the passthru string layer. 35 // Similarly, the manipulator breadth isn't checked at the cstring layer either. 36 { 37 // S: string, no manipulator 38 void echoTillX(const char * casename) { 39 string s; 40 do { 41 forceStringHeapFreeSpaceTo(9); 42 sin | s; 43 sout | casename | s; 44 } while ( size(s) > 0 && s[size(s)-1] != 'x' ); 45 } 46 echoTillX("preS1"); 47 echoTillX("preS2"); 48 echoTillX("preS3"); 49 echoTillX("preS4"); 50 } 51 { 52 // SMN: string, manipulator for no-op 53 void echoTillX(const char * casename) { 54 string s; 55 do { 56 sin | plainjane( s ); 57 sout | casename | s; 58 } while ( size(s) > 0 && s[size(s)-1] != 'x' ); 59 } 60 echoTillX("preSMN1"); 61 echoTillX("preSMN2"); 62 echoTillX("preSMN3"); 63 echoTillX("preSMN4"); 64 } 65 { 66 // RMN: string_res, manipulator for no-op 67 void echoTillX(const char * casename) { 68 string_res s; 69 do { 70 sin | plainjane( s ); 71 sout | casename | s; 72 } while ( size(s) > 0 && s[size(s)-1] != 'x' ); 73 } 74 echoTillX("preRMN1"); 75 echoTillX("preRMN2"); 76 echoTillX("preRMN3"); 77 echoTillX("preRMN4"); 78 } 79 { 80 // SMI: string, manipulator `incl` 81 void echoTillX(const char * casename) { 82 string s; 83 do { 84 sin | skip("-\n"); 85 sin | incl( ".:|# x", s ); 86 sout | casename | " \"" | s | "\""; 87 } while ( size(s) > 0 && s[size(s)-1] != 'x' ); 88 } 89 echoTillX("preSMI1"); 90 echoTillX("preSMI2"); 91 echoTillX("preSMI3"); 92 echoTillX("preSMI4"); 93 } 94 { 95 // SME: string, manipulator `excl` 96 void echoTillX(const char * casename) { 97 string s; 98 do { 99 sin | skip("-\n"); 100 sin | excl( "-\n", s ); 101 sout | casename | " \"" | s | "\""; 102 } while ( size(s) > 0 && s[size(s)-1] != 'x' ); 103 } 104 echoTillX("preSME1"); 105 echoTillX("preSME2"); 106 echoTillX("preSME3"); 107 echoTillX("preSME4"); 108 } 109 sin | skip("-\n"); 110 { 111 // SMG: string, manipulator `getline` 112 void echoTillX(const char * casename) { 113 string s; 114 do { 115 sin | getline( s ); 116 sout | casename | s; 117 } while ( size(s) > 0 && s[size(s)-1] != 'x' ); 118 } 119 echoTillX("preSMG1"); 120 echoTillX("preSMG2"); 121 echoTillX("preSMG3"); 122 echoTillX("preSMG4"); 123 } 124 { 125 // SMD: string, manipulator (`getline` with custom) delimiter 126 void echoTillX(const char * casename) { 127 string s; 128 do { 129 sin | getline( s, '@' ); 130 sout | casename | s; 131 } while ( size(s) > 0 && s[size(s)-1] != 'x' ); 132 sin | skip(" \n"); 133 } 134 echoTillX("preSMD1"); 135 echoTillX("preSMD2"); 136 echoTillX("preSMD3"); 137 echoTillX("preSMD4"); 138 } 139 7 140 /* Keep harmonized with io/manipulatorsInput */ 8 141 { … … 23 156 sin | ignore( incl( "abc", wdi( 8, s ) ) ); sout | "12" | s; 24 157 sin | ignore( excl( "abc", wdi( 8, s ) ) ); sout | "13" | s; 25 } 158 159 s = "q"; 160 sin | incl( "abc", s ); sout | "14" | s; 161 s = "q"; 162 sin | excl( "u", s ); sout | "15" | s; 163 sin | skip( "u" ); 164 sin | "\n"; 165 } 166 // Full repeat on string_res layer assures the full manipulator vocabulary is supported there. 26 167 { 27 168 string_res s = "yyyyyyyyyyyyyyyyyyyy"; … … 41 182 sin | ignore( incl( "abc", wdi( 8, s ) ) ); sout | "12" | s; 42 183 sin | ignore( excl( "abc", wdi( 8, s ) ) ); sout | "13" | s; 184 185 s = "q"; 186 sin | incl( "abc", s ); sout | "14" | s; 187 s = "q"; 188 sin | excl( "u", s ); sout | "15" | s; 189 sin | skip( "u" ); 190 sin | "\n"; 43 191 } 44 192 } -
tests/concurrency/cofor.cfa
r85034ed r8cbe732 1 1 #include <cofor.hfa> 2 2 3 long total = 0; 4 void add_num( void * arg ) { __atomic_fetch_add( &total, (long)arg, __ATOMIC_SEQ_CST ); }3 4 void add_num( long * total, long val ) { __atomic_fetch_add( total, (long)val, __ATOMIC_SEQ_CST ); } 5 5 6 6 int main() { 7 7 printf("start\n"); 8 8 processor p[4]; 9 long total = 0; 9 10 COFOR( i, 0, 10, __atomic_fetch_add( &total, i, __ATOMIC_SEQ_CST ); ); 10 parallel_stmt_t stmts[5] = { add_num, add_num, add_num, add_num, add_num }; 11 void * nums[5] = { (void *)11, (void *)12, (void *)13, (void *)14, (void *)15 }; 12 parallel( stmts, nums, 5 ); 11 { 12 corun; // does nothing 13 corun{}; // does nothing 14 corun add_num( &total, 11 ); 15 corun { add_num( &total, 12 ); } 16 corun __atomic_fetch_add( &total, 13, __ATOMIC_SEQ_CST ); 17 corun { __atomic_fetch_add( &total, 14, __ATOMIC_SEQ_CST ); } 18 __atomic_fetch_add( &total, 15, __ATOMIC_SEQ_CST ); // run by main thd 19 } 13 20 printf("total: %ld\n", total); 14 21 printf("done\n"); -
tests/errors/.expect/scope.txt
r85034ed r8cbe732 1 errors/scope.cfa: 2:1 error: duplicate object definition for thisIsAnError: signed int2 errors/scope.cfa: 20:1 error: duplicate function definition for butThisIsAnError: function1 errors/scope.cfa:13:1 error: duplicate object definition for thisIsAnError: signed int 2 errors/scope.cfa:30:1 error: duplicate function definition for butThisIsAnError: function 3 3 ... with parameters 4 4 double -
tests/errors/scope.cfa
r85034ed r8cbe732 1 int thisIsAnError; 2 int thisIsAnError; 1 // Keep harmonized with errors/scope. 3 2 4 int thisIsNotAnError; 5 float thisIsNotAnError; 3 #ifdef OMIT_DRIVING_REJECTIONS 4 // For manual sanity checking: 5 // Leave out the offensive declarations and verify that what's left is accepted. 6 #define EXPREJ(...) 7 #else 8 #define EXPREJ(...) __VA_ARGS__ 9 #endif 6 10 7 int thisIsAlsoNotAnError() {8 int thisIsNotAnError;9 }10 11 11 int thisIsAlsoNotAnError( double x ) { 12 } 12 int thisIsAnError; 13 EXPREJ( int thisIsAnError; ) 13 14 14 double thisIsStillNotAnError( double );15 double thisIsStillNotAnError( double );15 int thisIsNotAnError; 16 float thisIsNotAnError; 16 17 17 double butThisIsAnError( double ) { 18 } 18 int thisIsAlsoNotAnError() { 19 int thisIsNotAnError; 20 } 19 21 20 double butThisIsAnError( double ) { 21 } 22 int thisIsAlsoNotAnError( double x ) { 23 } 24 25 double thisIsStillNotAnError( double ); 26 double thisIsStillNotAnError( double ); 27 28 double butThisIsAnError( double ) { 29 } 30 EXPREJ( 31 double butThisIsAnError( double ) { 32 } 33 ) 22 34 23 35 // Local Variables: // -
tests/io/.expect/manipulatorsInput.arm64.txt
r85034ed r8cbe732 1 1 pre1 "123456", canary ok 2 pre2a "1234567", exception occurred, canary ok 3 pre2b "89", canary ok 2 pre2 "1234567", canary ok 3 pre3a "1234567", exception occurred, canary ok 4 pre3b "8", canary ok 5 pre4a "1234567", exception occurred, canary ok 6 pre4b "89", canary ok 4 7 1 yyyyyyyyyyyyyyyyyyyy 5 8 2 abcxxx … … 15 18 12 wwwwwwww 16 19 13 wwwwwwww 20 14 rc=1, cccc 21 15 rc=0, q 17 22 1 yyyyyyyyyyyyyyyyyyyy 18 23 2 abcxxx … … 28 33 12 wwwwwwww 29 34 13 wwwwwwww 35 14 cccc 36 15 30 37 a 31 38 a -
tests/io/.expect/manipulatorsInput.x64.txt
r85034ed r8cbe732 1 1 pre1 "123456", canary ok 2 pre2a "1234567", exception occurred, canary ok 3 pre2b "89", canary ok 2 pre2 "1234567", canary ok 3 pre3a "1234567", exception occurred, canary ok 4 pre3b "8", canary ok 5 pre4a "1234567", exception occurred, canary ok 6 pre4b "89", canary ok 4 7 1 yyyyyyyyyyyyyyyyyyyy 5 8 2 abcxxx … … 15 18 12 wwwwwwww 16 19 13 wwwwwwww 20 14 rc=1, cccc 21 15 rc=0, q 17 22 1 yyyyyyyyyyyyyyyyyyyy 18 23 2 abcxxx … … 28 33 12 wwwwwwww 29 34 13 wwwwwwww 35 14 cccc 36 15 30 37 a 31 38 a -
tests/io/.expect/manipulatorsInput.x86.txt
r85034ed r8cbe732 1 1 pre1 "123456", canary ok 2 pre2a "1234567", exception occurred, canary ok 3 pre2b "89", canary ok 2 pre2 "1234567", canary ok 3 pre3a "1234567", exception occurred, canary ok 4 pre3b "8", canary ok 5 pre4a "1234567", exception occurred, canary ok 6 pre4b "89", canary ok 4 7 1 yyyyyyyyyyyyyyyyyyyy 5 8 2 abcxxx … … 15 18 12 wwwwwwww 16 19 13 wwwwwwww 20 14 rc=1, cccc 21 15 rc=0, q 17 22 1 yyyyyyyyyyyyyyyyyyyy 18 23 2 abcxxx … … 28 33 12 wwwwwwww 29 34 13 wwwwwwww 35 14 cccc 36 15 30 37 a 31 38 a -
tests/io/.in/manipulatorsInput.txt
r85034ed r8cbe732 1 1 123456 2 1234567 3 12345678 2 4 123456789 3 5 abc 4 abc6 cccccb 5 7 xx 6 8 abcxxx 7 9 abcyyy 8 10 aaaaaaaaxxxxxxxxaabbccbbdddwwwbbbbbbbbwwwwwwwwaaaaaaaawwwwwwww 11 uuuuuccccuuuuu 9 12 abc 10 abc13 cccccb 11 14 xx 12 15 abcxxx 13 16 abcyyy 14 17 aaaaaaaaxxxxxxxxaabbccbbdddwwwbbbbbbbbwwwwwwwwaaaaaaaawwwwwwww 18 uuuuuccccuuuuu 15 19 ab 16 20 0xff 017 15-15 -
tests/io/manipulatorsInput.cfa
r85034ed r8cbe732 45 45 } 46 46 47 rep("pre1"); 48 rep("pre2a"); 49 rep("pre2b"); 47 rep("pre1"); // 123456 | 123456 48 rep("pre2"); // 1234567 | 1234567 49 rep("pre3a"); // 12345678 | 1234567 50 rep("pre3b"); // | 8 51 rep("pre4a"); // 123456789 | 1234567 52 rep("pre4b"); // | 89 53 50 54 scanf("\n"); // next test does not start with %s so does not tolerate leading whitespace 51 55 } 52 56 { 53 57 char s[] = "yyyyyyyyyyyyyyyyyyyy"; 54 const char sk [] = "abc";55 scanf( "abc " ); scanf( sk ); for ( 5 ) scanf( "%*c" );printf( "1 %s\n", s );58 const char sk_fmt[] = "%*[abc]"; 59 scanf( "abc " ); scanf( sk_fmt ); for ( 5 ) scanf( "%*c" ); printf( "1 %s\n", s ); 56 60 scanf( "%s", s ); printf( "2 %s\n", s ); 57 61 scanf( "%*s" ); printf( "3 %s\n", s ); … … 67 71 scanf( "%*8[abc]" ); printf( "12 %s\n", s ); 68 72 scanf( "%*8[^abc]" ); printf( "13 %s\n", s ); 73 74 int rc; 75 s[0] = 'q'; s[1] = '\0'; rc = 99; 76 rc = scanf( "%[abc]", s ); printf( "14 rc=%d, %s\n", rc, s ); 77 s[0] = 'q'; s[1] = '\0'; rc = 99; 78 rc = scanf( "%[^u]", s ); printf( "15 rc=%d, %s\n", rc, s ); 79 scanf( "%*[u]" ); 80 scanf("\n"); 69 81 } 70 82 { … … 85 97 sin | ignore( incl( "abc", wdi( sizeof(s), 8, s ) ) ); sout | "12" | s; 86 98 sin | ignore( excl( "abc", wdi( sizeof(s), 8, s ) ) ); sout | "13" | s; 99 100 s[0] = 'q'; s[1] = '\0'; 101 sin | incl( "abc", wdi( sizeof(s), s ) ); sout | "14" | s; 102 s[0] = 'q'; s[1] = '\0'; 103 sin | excl( "u", wdi( sizeof(s), s ) ); sout | "15" | s; 104 sin | skip( "u" ); 105 sin | "\n"; 87 106 } 88 107 /* Keep harmonized with collections/string-istream-manip */ -
tests/link-once/main.cfa
r85034ed r8cbe732 1 1 // Test our new cfa_linkonce attribute: 2 2 3 __attribute__(( cfa_linkonce )) signed int example = -7;3 __attribute__(( cfa_linkonce )) signed int example = 7; 4 4 __attribute__(( cfa_linkonce )) unsigned int example = 12; 5 5 -
tests/link-once/partner.cfa
r85034ed r8cbe732 1 1 // Side file for the link-once test. 2 2 3 __attribute__(( cfa_linkonce )) signed int example = -7;3 __attribute__(( cfa_linkonce )) signed int example = 7; 4 4 __attribute__(( cfa_linkonce )) unsigned int example = 12; 5 5 -
tests/test.py
r85034ed r8cbe732 116 116 parser.add_argument('--no-invariant', help='Tell the compiler not to check invariants.', action='store_false', dest='invariant') 117 117 parser.add_argument('--invariant', help='Tell the compiler to check invariants.', action='store_const', const=True) 118 parser.add_argument('--timeout', help='Maximum duration in seconds after a single test is considered to have timed out', type=int, default= 180)118 parser.add_argument('--timeout', help='Maximum duration in seconds after a single test is considered to have timed out', type=int, default=240) 119 119 parser.add_argument('--global-timeout', help='Maximum cumulative duration in seconds after the ALL tests are considered to have timed out', type=int, default=7200) 120 120 parser.add_argument('--timeout-with-gdb', help='Instead of killing the command when it times out, orphan it and print process id to allow gdb to attach', type=yes_no, default="no") … … 125 125 parser.add_argument('--archive-errors', help='If called with a valid path, on test crashes the test script will copy the core dump and the executable to the specified path.', type=str, default='') 126 126 parser.add_argument('-j', '--jobs', help='Number of tests to run simultaneously, 0 (default) for unlimited', nargs='?', const=0, type=int) 127 parser.add_argument('--list-comp', help='List all valid earguments', action='store_true')127 parser.add_argument('--list-comp', help='List all valid arguments', action='store_true') 128 128 parser.add_argument('--list-dist', help='List all tests for distribution', action='store_true') 129 129 parser.add_argument('-I','--include', help='Directory of test to include, can be used multiple time, All if omitted', action='append')
Note:
See TracChangeset
for help on using the changeset viewer.