OLD | NEW |
1 // © 2016 and later: Unicode, Inc. and others. | 1 // © 2016 and later: Unicode, Inc. and others. |
2 // License & terms of use: http://www.unicode.org/copyright.html | 2 // License & terms of use: http://www.unicode.org/copyright.html |
3 /******************************************************************** | 3 /******************************************************************** |
4 * COPYRIGHT: | 4 * COPYRIGHT: |
5 * Copyright (c) 1997-2016, International Business Machines Corporation and | 5 * Copyright (c) 1997-2016, International Business Machines Corporation and |
6 * others. All Rights Reserved. | 6 * others. All Rights Reserved. |
7 ********************************************************************/ | 7 ********************************************************************/ |
8 | 8 |
9 | 9 |
10 /** | 10 /** |
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
275 | 275 |
276 | 276 |
277 | 277 |
278 enum { kMaxProps = 16 }; | 278 enum { kMaxProps = 16 }; |
279 | 279 |
280 virtual void setProperty(const char* propline); | 280 virtual void setProperty(const char* propline); |
281 virtual const char* getProperty(const char* prop); | 281 virtual const char* getProperty(const char* prop); |
282 | 282 |
283 /* JUnit-like assertions. Each returns TRUE if it succeeds. */ | 283 /* JUnit-like assertions. Each returns TRUE if it succeeds. */ |
284 UBool assertTrue(const char* message, UBool condition, UBool quiet=FALSE, UB
ool possibleDataError=FALSE, const char *file=NULL, int line=0); | 284 UBool assertTrue(const char* message, UBool condition, UBool quiet=FALSE, UB
ool possibleDataError=FALSE, const char *file=NULL, int line=0); |
285 UBool assertFalse(const char* message, UBool condition, UBool quiet=FALSE); | 285 UBool assertFalse(const char* message, UBool condition, UBool quiet=FALSE, U
Bool possibleDataError=FALSE); |
286 /** | 286 /** |
287 * @param possibleDataError - if TRUE, use dataerrln instead of errcheckln o
n failure | 287 * @param possibleDataError - if TRUE, use dataerrln instead of errcheckln o
n failure |
288 * @return TRUE on success, FALSE on failure. | 288 * @return TRUE on success, FALSE on failure. |
289 */ | 289 */ |
290 UBool assertSuccess(const char* message, UErrorCode ec, UBool possibleDataEr
ror=FALSE, const char *file=NULL, int line=0); | 290 UBool assertSuccess(const char* message, UErrorCode ec, UBool possibleDataEr
ror=FALSE, const char *file=NULL, int line=0); |
291 UBool assertEquals(const char* message, const UnicodeString& expected, | 291 UBool assertEquals(const char* message, const UnicodeString& expected, |
292 const UnicodeString& actual, UBool possibleDataError=FALS
E); | 292 const UnicodeString& actual, UBool possibleDataError=FALS
E); |
293 UBool assertEquals(const char* message, const char* expected, const char* ac
tual); | 293 UBool assertEquals(const char* message, const char* expected, const char* ac
tual); |
294 UBool assertEquals(const char* message, UBool expected, UBool actual); | 294 UBool assertEquals(const char* message, UBool expected, UBool actual); |
295 UBool assertEquals(const char* message, int32_t expected, int32_t actual); | 295 UBool assertEquals(const char* message, int32_t expected, int32_t actual); |
296 UBool assertEquals(const char* message, int64_t expected, int64_t actual); | 296 UBool assertEquals(const char* message, int64_t expected, int64_t actual); |
297 UBool assertEquals(const char* message, double expected, double actual); | 297 UBool assertEquals(const char* message, double expected, double actual); |
298 UBool assertEquals(const char* message, UErrorCode expected, UErrorCode actu
al); | 298 UBool assertEquals(const char* message, UErrorCode expected, UErrorCode actu
al); |
299 UBool assertEquals(const char* message, const UnicodeSet& expected, const Un
icodeSet& actual); | 299 UBool assertEquals(const char* message, const UnicodeSet& expected, const Un
icodeSet& actual); |
300 #if !UCONFIG_NO_FORMATTING | 300 #if !UCONFIG_NO_FORMATTING |
301 UBool assertEquals(const char* message, const Formattable& expected, | 301 UBool assertEquals(const char* message, const Formattable& expected, |
302 const Formattable& actual, UBool possibleDataError=FALSE)
; | 302 const Formattable& actual, UBool possibleDataError=FALSE)
; |
303 UBool assertEquals(const UnicodeString& message, const Formattable& expected
, | 303 UBool assertEquals(const UnicodeString& message, const Formattable& expected
, |
304 const Formattable& actual); | 304 const Formattable& actual); |
305 #endif | 305 #endif |
306 UBool assertTrue(const UnicodeString& message, UBool condition, UBool quiet=
FALSE); | 306 UBool assertTrue(const UnicodeString& message, UBool condition, UBool quiet=
FALSE, UBool possibleDataError=FALSE); |
307 UBool assertFalse(const UnicodeString& message, UBool condition, UBool quiet
=FALSE); | 307 UBool assertFalse(const UnicodeString& message, UBool condition, UBool quiet
=FALSE, UBool possibleDataError=FALSE); |
308 UBool assertSuccess(const UnicodeString& message, UErrorCode ec); | 308 UBool assertSuccess(const UnicodeString& message, UErrorCode ec); |
309 UBool assertEquals(const UnicodeString& message, const UnicodeString& expect
ed, | 309 UBool assertEquals(const UnicodeString& message, const UnicodeString& expect
ed, |
310 const UnicodeString& actual, UBool possibleDataError=FALS
E); | 310 const UnicodeString& actual, UBool possibleDataError=FALS
E); |
311 UBool assertEquals(const UnicodeString& message, const char* expected, const
char* actual); | 311 UBool assertEquals(const UnicodeString& message, const char* expected, const
char* actual); |
312 UBool assertEquals(const UnicodeString& message, UBool expected, UBool actua
l); | 312 UBool assertEquals(const UnicodeString& message, UBool expected, UBool actua
l); |
313 UBool assertEquals(const UnicodeString& message, int32_t expected, int32_t a
ctual); | 313 UBool assertEquals(const UnicodeString& message, int32_t expected, int32_t a
ctual); |
314 UBool assertEquals(const UnicodeString& message, int64_t expected, int64_t a
ctual); | 314 UBool assertEquals(const UnicodeString& message, int64_t expected, int64_t a
ctual); |
315 UBool assertEquals(const UnicodeString& message, double expected, double act
ual); | 315 UBool assertEquals(const UnicodeString& message, double expected, double act
ual); |
316 UBool assertEquals(const UnicodeString& message, UErrorCode expected, UError
Code actual); | 316 UBool assertEquals(const UnicodeString& message, UErrorCode expected, UError
Code actual); |
317 UBool assertEquals(const UnicodeString& message, const UnicodeSet& expected,
const UnicodeSet& actual); | 317 UBool assertEquals(const UnicodeString& message, const UnicodeSet& expected,
const UnicodeSet& actual); |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
403 * This is a variant of cintltst/ccolltst.c:CharsToUChars(). | 403 * This is a variant of cintltst/ccolltst.c:CharsToUChars(). |
404 * It converts a character string into a UnicodeString, with | 404 * It converts a character string into a UnicodeString, with |
405 * unescaping \u sequences. | 405 * unescaping \u sequences. |
406 */ | 406 */ |
407 extern UnicodeString CharsToUnicodeString(const char* chars); | 407 extern UnicodeString CharsToUnicodeString(const char* chars); |
408 | 408 |
409 /* alias for CharsToUnicodeString */ | 409 /* alias for CharsToUnicodeString */ |
410 extern UnicodeString ctou(const char* chars); | 410 extern UnicodeString ctou(const char* chars); |
411 | 411 |
412 #endif // _INTLTEST | 412 #endif // _INTLTEST |
OLD | NEW |