- Timestamp:
- Oct 19, 2021, 9:55:27 PM (3 years ago)
- Branches:
- ADT, ast-experimental, enum, master, pthread-emulation, qualifiedEnum
- Children:
- 2b30370
- Parents:
- fe18b46
- Location:
- tests/collections
- Files:
-
- 2 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/collections/string-overwrite.cfa
rfe18b46 r0ca15b7 1 1 #include <containers/string.hfa> 2 #include <string_sharectx.hfa> 2 3 3 4 /* … … 11 12 WE = witness end 12 13 13 The dest does:14 The test does: 14 15 starts with the entire string being, initially, the alphabet; prints this entire alphabet 15 16 sets up modifier and witness as ranges within it, and prints a visualization of those ranges … … 24 25 This API's convention has Start positions being inclusive and end positions being exclusive. 25 26 27 v Case number in output 26 28 With 1 equivalence class: 27 29 MS = ME = WS = WE 1 … … 118 120 struct { int ms; int me; int ws; int we; char *replaceWith; char *label; } cases[] = { 119 121 { 12, 14, 10, 20, "xxxxx", "warmup" }, 120 // { 12, 14, 12, 14, "xxxxx", "" }, // the bug that got me into this test (should be a dup with case 6)121 122 { 10, 10, 10, 10, "=====", "1" }, 122 123 { 10, 10, 10, 10, "==" , "" }, … … 223 224 { 12, 14, 10, 16, "=" , "" }, 224 225 { 12, 14, 10, 16, "" , "" }, 225 /*226 { , , , , "=====", "NN" },227 { "==" , "" },228 { "=" , "" },229 { "" , "" },230 */231 226 }; 232 227 for ( i; sizeof(cases)/sizeof(cases[0]) ) { … … 238 233 239 234 240 // void f( string & s, string & toEdit ) {241 242 // sout | s | "|" | toEdit | "|";243 244 // s(14, 16) = "-";245 // sout | s | "|" | toEdit | "|";246 // }247 248 235 int main() { 236 237 #ifdef STRING_SHARING_OFF 238 string_sharectx c = { NO_SHARING }; 239 #endif 240 241 249 242 // 0 1 2 250 243 // 01234567890123456789012345
Note: See TracChangeset
for help on using the changeset viewer.