Changeset 1194 for pjproject/trunk/pjlib/src/pjlib-test/string.c
- Timestamp:
- Apr 15, 2007 9:58:48 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjlib/src/pjlib-test/string.c
r974 r1194 49 49 * - pj_utoa() 50 50 * - pj_strtoul() 51 * - pj_strtoul2() 51 52 * - pj_create_random_string() 52 53 * - ... and mode.. … … 359 360 return -280; 360 361 362 /* 363 * pj_strtoul2() 364 */ 365 s5 = pj_str("123456"); 366 367 pj_strtoul2(&s5, NULL, 10); /* Crash test */ 368 369 if (pj_strtoul2(&s5, &s4, 10) != 123456UL) 370 return -290; 371 if (s4.slen != 0) 372 return -291; 373 if (pj_strtoul2(&s5, &s4, 16) != 0x123456UL) 374 return -292; 375 376 s5 = pj_str("0123ABCD"); 377 if (pj_strtoul2(&s5, &s4, 10) != 123) 378 return -293; 379 if (s4.slen != 4) 380 return -294; 381 if (s4.ptr == NULL || *s4.ptr != 'A') 382 return -295; 383 if (pj_strtoul2(&s5, &s4, 16) != 0x123ABCDUL) 384 return -296; 385 if (s4.slen != 0) 386 return -297; 387 361 388 /* 362 389 * pj_create_random_string()
Note: See TracChangeset
for help on using the changeset viewer.