LEFT | RIGHT |
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 * File CNUMTST.C | 10 * File CNUMTST.C |
(...skipping 3063 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3074 UNumberFormat *theFormatter = unum_open(UNUM_CURRENCY, NULL, 0, "en_US", NUL
L, &status); | 3074 UNumberFormat *theFormatter = unum_open(UNUM_CURRENCY, NULL, 0, "en_US", NUL
L, &status); |
3075 status = U_ZERO_ERROR; | 3075 status = U_ZERO_ERROR; |
3076 unum_setAttribute(theFormatter, UNUM_LENIENT_PARSE, 1); | 3076 unum_setAttribute(theFormatter, UNUM_LENIENT_PARSE, 1); |
3077 int32_t pos = 1; | 3077 int32_t pos = 1; |
3078 unum_parseDoubleCurrency(theFormatter, input, -1, &pos, currency, &status); | 3078 unum_parseDoubleCurrency(theFormatter, input, -1, &pos, currency, &status); |
3079 assertEquals("should fail gracefully", "U_PARSE_ERROR", u_errorName(status))
; | 3079 assertEquals("should fail gracefully", "U_PARSE_ERROR", u_errorName(status))
; |
3080 unum_close(theFormatter); | 3080 unum_close(theFormatter); |
3081 } | 3081 } |
3082 | 3082 |
3083 #endif /* #if !UCONFIG_NO_FORMATTING */ | 3083 #endif /* #if !UCONFIG_NO_FORMATTING */ |
LEFT | RIGHT |