- Timestamp:
- Sep 11, 2023, 12:55:49 PM (2 years ago)
- Branches:
- master
- Children:
- c0035fc
- Parents:
- 9509d67a (diff), 73d0a84c (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:
-
- 1 added
- 1 deleted
- 6 edited
- 1 moved
-
concurrency/waituntil/locks.cfa (modified) (1 diff)
-
exceptions/.expect/finally-error.txt (deleted)
-
exceptions/.expect/try-ctrl-flow.txt (added)
-
exceptions/try-ctrl-flow.cfa (moved) (moved from tests/exceptions/finally-error.cfa ) (2 diffs)
-
io/.expect/manipulatorsInput.arm64.txt (modified) (1 diff)
-
io/.expect/manipulatorsInput.x64.txt (modified) (1 diff)
-
io/.expect/manipulatorsInput.x86.txt (modified) (1 diff)
-
io/.in/manipulatorsInput.txt (modified) (1 diff)
-
io/manipulatorsInput.cfa (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
tests/concurrency/waituntil/locks.cfa
r9509d67a rc8ec58e 73 73 printf("done\n"); 74 74 } 75 -
tests/exceptions/try-ctrl-flow.cfa
r9509d67a rc8ec58e 1 // All of these should be caught as long as the check remains in the same2 // pass. (Although not even all of the checks are in place yet.)1 // Check all the local control flow structures that are "sealed" by some the 2 // try statement clauses; where structured programming is stricter. 3 3 4 4 void break_in_finally() { … … 151 151 } 152 152 153 // Now just use return to test the other try control flow interactions. 154 155 exception nil_exception {}; 156 157 void return_in_try_with_catch() { 158 try { 159 return; 160 } catch (nil_exception *) { 161 ; 162 } 163 } 164 165 // Allowed. 166 void return_in_try_with_catchReturn() { 167 try { 168 return; 169 } catchResume (nil_exception *) { 170 ; 171 } 172 } 173 174 // Allowed. 175 void return_in_try_with_finally() { 176 try { 177 return; 178 } finally { 179 ; 180 } 181 } 182 183 void return_in_catch() { 184 try { 185 ; 186 } catch (nil_exception *) { 187 return; 188 } 189 } 190 191 void return_in_catchResume() { 192 try { 193 ; 194 } catchResume (nil_exception *) { 195 return; 196 } 197 } 198 153 199 void main() { 154 200 // Should not compile. -
tests/io/.expect/manipulatorsInput.arm64.txt
r9509d67a rc8ec58e 1 pre1 "123456", canary ok 2 pre2a "1234567", exception occurred, canary ok 3 pre2b "89", canary ok 1 4 1 yyyyyyyyyyyyyyyyyyyy 2 5 2 abcxxx -
tests/io/.expect/manipulatorsInput.x64.txt
r9509d67a rc8ec58e 1 pre1 "123456", canary ok 2 pre2a "1234567", exception occurred, canary ok 3 pre2b "89", canary ok 1 4 1 yyyyyyyyyyyyyyyyyyyy 2 5 2 abcxxx -
tests/io/.expect/manipulatorsInput.x86.txt
r9509d67a rc8ec58e 1 pre1 "123456", canary ok 2 pre2a "1234567", exception occurred, canary ok 3 pre2b "89", canary ok 1 4 1 yyyyyyyyyyyyyyyyyyyy 2 5 2 abcxxx -
tests/io/.in/manipulatorsInput.txt
r9509d67a rc8ec58e 1 123456 2 123456789 1 3 abc 2 4 abc -
tests/io/manipulatorsInput.cfa
r9509d67a rc8ec58e 15 15 16 16 int main() { 17 { 18 // Upfront checks to ensure buffer safety. Once these pass, the simpler `wdi(sizeof(s),s)` 19 // usage, as in the scanf alignment cases below, is justified. 20 struct { 21 char buf[8]; 22 char canary; 23 } data; 24 static_assert( sizeof(data.buf) == 8 ); 25 static_assert( &data.buf[8] == &data.canary ); // canary comes right after buf 26 27 void rep(const char* casename) { 28 data.canary = 42; 29 bool caught = false; 30 try { 31 sin | wdi( sizeof(data.buf), data.buf ); 32 } catch (cstring_length*) { 33 caught = true; 34 } 35 printf( "%s \"%s\"", casename, data.buf ); 36 if ( caught ) { 37 printf(", exception occurred"); 38 } 39 if ( data.canary == 42 ) { 40 printf(", canary ok"); 41 } else { 42 printf(", canary overwritten to %d", data.canary); 43 } 44 printf("\n"); 45 } 46 47 rep("pre1"); 48 rep("pre2a"); 49 rep("pre2b"); 50 scanf("\n"); // next test does not start with %s so does not tolerate leading whitespace 51 } 17 52 { 18 53 char s[] = "yyyyyyyyyyyyyyyyyyyy";
Note:
See TracChangeset
for help on using the changeset viewer.