- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/collections/string-overwrite.cfa
r0ca15b7 r6cc87c0 1 1 #include <containers/string.hfa> 2 #include <string_sharectx.hfa>3 2 4 3 /* … … 12 11 WE = witness end 13 12 14 The test does:13 The dest does: 15 14 starts with the entire string being, initially, the alphabet; prints this entire alphabet 16 15 sets up modifier and witness as ranges within it, and prints a visualization of those ranges … … 25 24 This API's convention has Start positions being inclusive and end positions being exclusive. 26 25 27 v Case number in output28 26 With 1 equivalence class: 29 27 MS = ME = WS = WE 1 … … 120 118 struct { int ms; int me; int ws; int we; char *replaceWith; char *label; } cases[] = { 121 119 { 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) 122 121 { 10, 10, 10, 10, "=====", "1" }, 123 122 { 10, 10, 10, 10, "==" , "" }, … … 224 223 { 12, 14, 10, 16, "=" , "" }, 225 224 { 12, 14, 10, 16, "" , "" }, 225 /* 226 { , , , , "=====", "NN" }, 227 { "==" , "" }, 228 { "=" , "" }, 229 { "" , "" }, 230 */ 226 231 }; 227 232 for ( i; sizeof(cases)/sizeof(cases[0]) ) { … … 233 238 234 239 240 // void f( string & s, string & toEdit ) { 241 242 // sout | s | "|" | toEdit | "|"; 243 244 // s(14, 16) = "-"; 245 // sout | s | "|" | toEdit | "|"; 246 // } 247 235 248 int main() { 236 237 #ifdef STRING_SHARING_OFF238 string_sharectx c = { NO_SHARING };239 #endif240 241 242 249 // 0 1 2 243 250 // 01234567890123456789012345
Note:
See TracChangeset
for help on using the changeset viewer.