- Timestamp:
- Dec 20, 2024, 2:31:09 PM (4 weeks ago)
- Branches:
- master
- Children:
- 5251c6b
- Parents:
- 584612d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/collections/string-api-coverage.cfa
r584612d rb12b1ba 1 1 #include <collections/string.hfa> 2 2 #include <string_sharectx.hfa> 3 4 void assertWellFormedHandleList( int maxLen ) { // with(HeapArea)5 // HandleNode *n;6 // int limit1 = maxLen;7 // for ( n = Header.flink; (limit1-- > 0) && n != &Header; n = n->flink ) {}8 // assert (n == &Header);9 // int limit2 = maxLen;10 // for ( n = Header.blink; (limit2-- > 0) && n != &Header; n = n->blink ) {}11 // assert (n == &Header);12 // assert (limit1 == limit2);13 }14 15 // The given string is reachable.16 void assertOnHandleList( string & q ) { // with(HeapArea)17 // HandleNode *n;18 // for ( n = Header.flink; n != &Header; n = n->flink ) {19 // if ( n == & q.inner->Handle ) return;20 // }21 // assert( false );22 }23 3 24 4 … … 61 41 62 42 63 assertWellFormedHandleList( 10 );64 43 // 65 44 // breadth Constructors … … 116 95 sout | b11; // 5.5+3.4i 117 96 } 118 assertWellFormedHandleList( 10 ); 97 119 98 // 120 99 // Assignments … … 176 155 sout | b; // 5.5+3.4i 177 156 } 178 assertWellFormedHandleList( 10 ); 157 179 158 180 159 … … 187 166 188 167 string sx = s + s3; 189 assertWellFormedHandleList( 10 );190 168 sout | sx; // helloworld 191 assertWellFormedHandleList( 10 );192 169 sx = "xx"; 193 assertWellFormedHandleList( 10 );194 170 sx = s + s3; 195 assertWellFormedHandleList( 10 );196 171 sout | sx; // helloworld 197 assertWellFormedHandleList( 10 );198 172 199 173 sx += '!'; … … 205 179 sx += s; 206 180 sout | sx; // hellohello 207 assertWellFormedHandleList( 10 );208 181 sx += ", friend"; 209 182 sout | sx; // hellohello, friend
Note: See TracChangeset
for help on using the changeset viewer.