mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-07 14:31:31 +00:00
ICU-20795 BRS test without data task: Adds a status check after PluralRules
instance creation. Test causes segmentation fault later if instance creation fails.
This commit is contained in:
parent
5e3f472c67
commit
66b8b4c8ce
1 changed files with 7 additions and 0 deletions
|
@ -17,6 +17,12 @@
|
|||
#include "unicode/numfmt.h"
|
||||
#include "unicode/plurrule.h"
|
||||
|
||||
#define ASSERT_OK(status) UPRV_BLOCK_MACRO_BEGIN { \
|
||||
if(U_FAILURE(status)) { \
|
||||
errcheckln(status, #status " = %s @ %s:%d", u_errorName(status), __FILE__, __LINE__); \
|
||||
return; \
|
||||
} \
|
||||
} UPRV_BLOCK_MACRO_END
|
||||
|
||||
class QuantityFormatterTest : public IntlTest {
|
||||
public:
|
||||
|
@ -117,6 +123,7 @@ void QuantityFormatterTest::TestBasic() {
|
|||
NumberFormat::createInstance(Locale::getEnglish(), status));
|
||||
LocalPointer<PluralRules> plurrule(
|
||||
PluralRules::forLocale("en", status));
|
||||
ASSERT_OK(status);
|
||||
FieldPosition pos(FieldPosition::DONT_CARE);
|
||||
UnicodeString appendTo;
|
||||
assertEquals(
|
||||
|
|
Loading…
Add table
Reference in a new issue