1 // Copyright (C) 2016 and later: Unicode, Inc. and others. 2 // License & terms of use: http://www.unicode.org/copyright.html 3 /******************************************************************** 4 * COPYRIGHT: 5 * Copyright (c) 1997-2014, International Business Machines Corporation and 6 * others. All Rights Reserved. 7 ********************************************************************/ 8 9 10 #ifndef _INTLTESTDECIMALFORMATAPI 11 #define _INTLTESTDECIMALFORMATAPI 12 13 #include "unicode/utypes.h" 14 15 #if !UCONFIG_NO_FORMATTING 16 17 #include "unicode/unistr.h" 18 #include "intltest.h" 19 20 21 class IntlTestDecimalFormatAPI: public IntlTest { 22 void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL ); 23 24 public: 25 /** 26 * Tests basic functionality of various API functions for DecimalFormat 27 **/ 28 void testAPI(/*char *par*/); 29 void testRounding(/*char *par*/); 30 void testRoundingInc(/*char *par*/); 31 void TestCurrencyPluralInfo(); 32 void TestScale(); 33 void TestFixedDecimal(); 34 void TestBadFastpath(); 35 void TestRequiredDecimalPoint(); 36 private: 37 /*Helper functions */ 38 void verify(const UnicodeString& message, const UnicodeString& got, double expected); 39 void verifyString(const UnicodeString& message, const UnicodeString& got, UnicodeString& expected); 40 }; 41 42 #endif /* #if !UCONFIG_NO_FORMATTING */ 43 44 #endif 45