Changeset e891349 for tests/collections
- Timestamp:
- Jan 17, 2024, 2:16:04 PM (11 months ago)
- Branches:
- master
- Children:
- 5bf685f
- Parents:
- 06280ad
- Location:
- tests/collections
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/collections/.expect/string-api-coverage.txt
r06280ad re891349 20 20 hello 21 21 world 22 1234567 23 hello 24 Q 25 123 26 hell 27 1234567 28 hello 29 123 30 hell 22 31 5 23 32 helloworld … … 29 38 hello, friend 30 39 bye, friend 40 ohello 41 ohell 42 ohell 43 omydarling 44 omy 45 omy 31 46 hellohellohellohello 32 47 hellohellohello -
tests/collections/string-api-coverage.cfa
r06280ad re891349 90 90 } 91 91 assertWellFormedHandleList( 10 ); 92 // 93 // Assignments 94 // 95 { 96 string b = "xxx"; 97 98 b = "1234567"; 99 sout | b; // 1234567 100 101 b = "xxx"; 102 b = s; 103 sout | b; // hello 104 105 b = "xxx"; 106 b = 'Q'; 107 sout | b; // Q 108 109 b = "xxx"; 110 assign( b, "1234567", 3 ); 111 sout | b; // 123 112 113 b = "xxx"; 114 assign( b, s, 4 ); 115 sout | b; // hell 116 117 b = "xxx"; 118 strcpy(b, "1234567"); 119 sout | b; // 1234567 120 121 b = "xxx"; 122 strcpy(b, s); 123 sout | b; // hello 124 125 b = "xxx"; 126 strncpy( b, "1234567", 3 ); 127 sout | b; // 123 128 129 b = "xxx"; 130 strncpy( b, s, 4 ); 131 sout | b; // hell 132 } 133 assertWellFormedHandleList( 10 ); 134 135 92 136 93 137 sout | size(s); // 5 … … 125 169 sx = "bye, " + "friend"; 126 170 sout | sx; // bye, friend 171 172 sx = "o"; 173 strcat( sx, s ); 174 sout | sx; // ohello 175 176 sx = "o"; 177 append( sx, s, 4 ); 178 sout | sx; // ohell 179 180 sx = "o"; 181 strncat( sx, s, 4 ); 182 sout | sx; // ohell 183 184 sx = "o"; 185 strcat( sx, "mydarling" ); 186 sout | sx; // omydarling 187 188 sx = "o"; 189 append( sx, "mydarling", 2 ); 190 sout | sx; // omy 191 192 sx = "o"; 193 strncat( sx, "mydarling", 2 ); 194 sout | sx; // omy 127 195 128 196 //
Note: See TracChangeset
for help on using the changeset viewer.