blob: 2b53f8bc0249b4c7e1a8e7abe3ecfd8cde831686 [file] [log] [blame]
// © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
/*
*******************************************************************************
* Copyright (C) 2014-2016, International Business Machines Corporation and *
* others. All Rights Reserved. *
*******************************************************************************
*
* File MEASFMTTEST.CPP
*
*******************************************************************************
*/
#include <stdio.h>
#include <stdlib.h>
#include "intltest.h"
#if !UCONFIG_NO_FORMATTING
#include "unicode/decimfmt.h"
#include "unicode/measfmt.h"
#include "unicode/measure.h"
#include "unicode/measunit.h"
#include "unicode/strenum.h"
#include "unicode/tmunit.h"
#include "unicode/plurrule.h"
#include "unicode/ustring.h"
#include "charstr.h"
#include "cstr.h"
#include "unicode/reldatefmt.h"
#include "unicode/rbnf.h"
struct ExpectedResult {
const Measure *measures;
int32_t count;
const char *expected;
};
class MeasureFormatTest : public IntlTest {
public:
MeasureFormatTest() {
}
void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par=0);
private:
void TestBasic();
void TestCompatible53();
void TestCompatible54();
void TestCompatible55();
void TestCompatible56();
void TestCompatible57();
void TestCompatible58();
void TestCompatible59();
void TestCompatible63();
void TestCompatible64();
void TestCompatible65();
void TestGetAvailable();
void TestExamplesInDocs();
void TestFormatPeriodEn();
void Test10219FractionalPlurals();
void TestGreek();
void TestFormatSingleArg();
void TestFormatMeasuresZeroArg();
void TestSimplePer();
void TestNumeratorPlurals();
void TestMultiples();
void TestManyLocaleDurations();
void TestGram();
void TestCurrencies();
void TestDisplayNames();
void TestFieldPosition();
void TestFieldPositionMultiple();
void TestBadArg();
void TestEquality();
void TestGroupingSeparator();
void TestDoubleZero();
void TestUnitPerUnitResolution();
void TestIndividualPluralFallback();
void Test20332_PersonUnits();
void TestNumericTime();
void TestNumericTimeSomeSpecialFormats();
void verifyFormat(
const char *description,
const MeasureFormat &fmt,
const Measure *measures,
int32_t measureCount,
const char *expected);
void verifyFormatWithPrefix(
const char *description,
const MeasureFormat &fmt,
const UnicodeString &prefix,
const Measure *measures,
int32_t measureCount,
const char *expected);
void verifyFormat(
const char *description,
const MeasureFormat &fmt,
const ExpectedResult *expectedResults,
int32_t count);
void helperTestSimplePer(
const Locale &locale,
UMeasureFormatWidth width,
double value,
const MeasureUnit &unit,
const MeasureUnit &perUnit,
const char *expected);
void helperTestSimplePer(
const Locale &locale,
UMeasureFormatWidth width,
double value,
const MeasureUnit &unit,
const MeasureUnit &perUnit,
const char *expected,
int32_t field,
int32_t expected_start,
int32_t expected_end);
void helperTestMultiples(
const Locale &locale,
UMeasureFormatWidth width,
const char *expected);
void helperTestManyLocaleDurations(
const char *localeID,
UMeasureFormatWidth width,
const Measure *measures,
int32_t measureCount,
const char *expected);
void helperTestDisplayName(
const MeasureUnit *unit,
const char *localeID,
UMeasureFormatWidth width,
const char *expected);
void verifyFieldPosition(
const char *description,
const MeasureFormat &fmt,
const UnicodeString &prefix,
const Measure *measures,
int32_t measureCount,
NumberFormat::EAlignmentFields field,
int32_t start,
int32_t end);
};
void MeasureFormatTest::runIndexedTest(
int32_t index, UBool exec, const char *&name, char *) {
if (exec) {
logln("TestSuite MeasureFormatTest: ");
}
TESTCASE_AUTO_BEGIN;
TESTCASE_AUTO(TestBasic);
TESTCASE_AUTO(TestCompatible53);
TESTCASE_AUTO(TestCompatible54);
TESTCASE_AUTO(TestCompatible55);
TESTCASE_AUTO(TestCompatible56);
TESTCASE_AUTO(TestCompatible57);
TESTCASE_AUTO(TestCompatible58);
TESTCASE_AUTO(TestCompatible59);
TESTCASE_AUTO(TestCompatible63);
TESTCASE_AUTO(TestCompatible64);
TESTCASE_AUTO(TestCompatible65);
TESTCASE_AUTO(TestGetAvailable);
TESTCASE_AUTO(TestExamplesInDocs);
TESTCASE_AUTO(TestFormatPeriodEn);
TESTCASE_AUTO(Test10219FractionalPlurals);
TESTCASE_AUTO(TestGreek);
TESTCASE_AUTO(TestFormatSingleArg);
TESTCASE_AUTO(TestFormatMeasuresZeroArg);
TESTCASE_AUTO(TestSimplePer);
TESTCASE_AUTO(TestNumeratorPlurals);
TESTCASE_AUTO(TestMultiples);
TESTCASE_AUTO(TestManyLocaleDurations);
TESTCASE_AUTO(TestGram);
TESTCASE_AUTO(TestCurrencies);
TESTCASE_AUTO(TestDisplayNames);
TESTCASE_AUTO(TestFieldPosition);
TESTCASE_AUTO(TestFieldPositionMultiple);
TESTCASE_AUTO(TestBadArg);
TESTCASE_AUTO(TestEquality);
TESTCASE_AUTO(TestGroupingSeparator);
TESTCASE_AUTO(TestDoubleZero);
TESTCASE_AUTO(TestUnitPerUnitResolution);
TESTCASE_AUTO(TestIndividualPluralFallback);
TESTCASE_AUTO(Test20332_PersonUnits);
TESTCASE_AUTO(TestNumericTime);
TESTCASE_AUTO(TestNumericTimeSomeSpecialFormats);
TESTCASE_AUTO_END;
}
void MeasureFormatTest::TestCompatible53() {
UErrorCode status = U_ZERO_ERROR;
LocalPointer<MeasureUnit> measureUnit;
measureUnit.adoptInstead(MeasureUnit::createGForce(status));
measureUnit.adoptInstead(MeasureUnit::createArcMinute(status));
measureUnit.adoptInstead(MeasureUnit::createArcSecond(status));
measureUnit.adoptInstead(MeasureUnit::createDegree(status));
measureUnit.adoptInstead(MeasureUnit::createAcre(status));
measureUnit.adoptInstead(MeasureUnit::createHectare(status));
measureUnit.adoptInstead(MeasureUnit::createSquareFoot(status));
measureUnit.adoptInstead(MeasureUnit::createSquareKilometer(status));
measureUnit.adoptInstead(MeasureUnit::createSquareMeter(status));
measureUnit.adoptInstead(MeasureUnit::createSquareMile(status));
measureUnit.adoptInstead(MeasureUnit::createDay(status));
measureUnit.adoptInstead(MeasureUnit::createHour(status));
measureUnit.adoptInstead(MeasureUnit::createMillisecond(status));
measureUnit.adoptInstead(MeasureUnit::createMinute(status));
measureUnit.adoptInstead(MeasureUnit::createMonth(status));
measureUnit.adoptInstead(MeasureUnit::createSecond(status));
measureUnit.adoptInstead(MeasureUnit::createWeek(status));
measureUnit.adoptInstead(MeasureUnit::createYear(status));
measureUnit.adoptInstead(MeasureUnit::createCentimeter(status));
measureUnit.adoptInstead(MeasureUnit::createFoot(status));
measureUnit.adoptInstead(MeasureUnit::createInch(status));
measureUnit.adoptInstead(MeasureUnit::createKilometer(status));
measureUnit.adoptInstead(MeasureUnit::createLightYear(status));
measureUnit.adoptInstead(MeasureUnit::createMeter(status));
measureUnit.adoptInstead(MeasureUnit::createMile(status));
measureUnit.adoptInstead(MeasureUnit::createMillimeter(status));
measureUnit.adoptInstead(MeasureUnit::createPicometer(status));
measureUnit.adoptInstead(MeasureUnit::createYard(status));
measureUnit.adoptInstead(MeasureUnit::createGram(status));
measureUnit.adoptInstead(MeasureUnit::createKilogram(status));
measureUnit.adoptInstead(MeasureUnit::createOunce(status));
measureUnit.adoptInstead(MeasureUnit::createPound(status));
measureUnit.adoptInstead(MeasureUnit::createHorsepower(status));
measureUnit.adoptInstead(MeasureUnit::createKilowatt(status));
measureUnit.adoptInstead(MeasureUnit::createWatt(status));
measureUnit.adoptInstead(MeasureUnit::createHectopascal(status));
measureUnit.adoptInstead(MeasureUnit::createInchHg(status));
measureUnit.adoptInstead(MeasureUnit::createMillibar(status));
measureUnit.adoptInstead(MeasureUnit::createKilometerPerHour(status));
measureUnit.adoptInstead(MeasureUnit::createMeterPerSecond(status));
measureUnit.adoptInstead(MeasureUnit::createMilePerHour(status));
measureUnit.adoptInstead(MeasureUnit::createCelsius(status));
measureUnit.adoptInstead(MeasureUnit::createFahrenheit(status));
measureUnit.adoptInstead(MeasureUnit::createCubicKilometer(status));
measureUnit.adoptInstead(MeasureUnit::createCubicMile(status));
measureUnit.adoptInstead(MeasureUnit::createLiter(status));
assertSuccess("", status);
}
void MeasureFormatTest::TestCompatible54() {
UErrorCode status = U_ZERO_ERROR;
LocalPointer<MeasureUnit> measureUnit;
measureUnit.adoptInstead(MeasureUnit::createGForce(status));
measureUnit.adoptInstead(MeasureUnit::createMeterPerSecondSquared(status));
measureUnit.adoptInstead(MeasureUnit::createArcMinute(status));
measureUnit.adoptInstead(MeasureUnit::createArcSecond(status));
measureUnit.adoptInstead(MeasureUnit::createDegree(status));
measureUnit.adoptInstead(MeasureUnit::createRadian(status));
measureUnit.adoptInstead(MeasureUnit::createAcre(status));
measureUnit.adoptInstead(MeasureUnit::createHectare(status));
measureUnit.adoptInstead(MeasureUnit::createSquareCentimeter(status));
measureUnit.adoptInstead(MeasureUnit::createSquareFoot(status));
measureUnit.adoptInstead(MeasureUnit::createSquareInch(status));
measureUnit.adoptInstead(MeasureUnit::createSquareKilometer(status));
measureUnit.adoptInstead(MeasureUnit::createSquareMeter(status));
measureUnit.adoptInstead(MeasureUnit::createSquareMile(status));
measureUnit.adoptInstead(MeasureUnit::createSquareYard(status));
measureUnit.adoptInstead(MeasureUnit::createLiterPerKilometer(status));
measureUnit.adoptInstead(MeasureUnit::createMilePerGallon(status));
measureUnit.adoptInstead(MeasureUnit::createBit(status));
measureUnit.adoptInstead(MeasureUnit::createByte(status));
measureUnit.adoptInstead(MeasureUnit::createGigabit(status));
measureUnit.adoptInstead(MeasureUnit::createGigabyte(status));
measureUnit.adoptInstead(MeasureUnit::createKilobit(status));
measureUnit.adoptInstead(MeasureUnit::createKilobyte(status));
measureUnit.adoptInstead(MeasureUnit::createMegabit(status));
measureUnit.adoptInstead(MeasureUnit::createMegabyte(status));
measureUnit.adoptInstead(MeasureUnit::createTerabit(status));
measureUnit.adoptInstead(MeasureUnit::createTerabyte(status));
measureUnit.adoptInstead(MeasureUnit::createDay(status));
measureUnit.adoptInstead(MeasureUnit::createHour(status));
measureUnit.adoptInstead(MeasureUnit::createMicrosecond(status));
measureUnit.adoptInstead(MeasureUnit::createMillisecond(status));
measureUnit.adoptInstead(MeasureUnit::createMinute(status));
measureUnit.adoptInstead(MeasureUnit::createMonth(status));
measureUnit.adoptInstead(MeasureUnit::createNanosecond(status));
measureUnit.adoptInstead(MeasureUnit::createSecond(status));
measureUnit.adoptInstead(MeasureUnit::createWeek(status));
measureUnit.adoptInstead(MeasureUnit::createYear(status));
measureUnit.adoptInstead(MeasureUnit::createAmpere(status));
measureUnit.adoptInstead(MeasureUnit::createMilliampere(status));
measureUnit.adoptInstead(MeasureUnit::createOhm(status));
measureUnit.adoptInstead(MeasureUnit::createVolt(status));
measureUnit.adoptInstead(MeasureUnit::createCalorie(status));
measureUnit.adoptInstead(MeasureUnit::createFoodcalorie(status));
measureUnit.adoptInstead(MeasureUnit::createJoule(status));
measureUnit.adoptInstead(MeasureUnit::createKilocalorie(status));
measureUnit.adoptInstead(MeasureUnit::createKilojoule(status));
measureUnit.adoptInstead(MeasureUnit::createKilowattHour(status));
measureUnit.adoptInstead(MeasureUnit::createGigahertz(status));
measureUnit.adoptInstead(MeasureUnit::createHertz(status));
measureUnit.adoptInstead(MeasureUnit::createKilohertz(status));
measureUnit.adoptInstead(MeasureUnit::createMegahertz(status));
measureUnit.adoptInstead(MeasureUnit::createAstronomicalUnit(status));
measureUnit.adoptInstead(MeasureUnit::createCentimeter(status));
measureUnit.adoptInstead(MeasureUnit::createDecimeter(status));
measureUnit.adoptInstead(MeasureUnit::createFathom(status));
measureUnit.adoptInstead(MeasureUnit::createFoot(status));
measureUnit.adoptInstead(MeasureUnit::createFurlong(status));
measureUnit.adoptInstead(MeasureUnit::createInch(status));
measureUnit.adoptInstead(MeasureUnit::createKilometer(status));
measureUnit.adoptInstead(MeasureUnit::createLightYear(status));
measureUnit.adoptInstead(MeasureUnit::createMeter(status));
measureUnit.adoptInstead(MeasureUnit::createMicrometer(status));
measureUnit.adoptInstead(MeasureUnit::createMile(status));
measureUnit.adoptInstead(MeasureUnit::createMillimeter(status));
measureUnit.adoptInstead(MeasureUnit::createNanometer(status));
measureUnit.adoptInstead(MeasureUnit::createNauticalMile(status));
measureUnit.adoptInstead(MeasureUnit::createParsec(status));
measureUnit.adoptInstead(MeasureUnit::createPicometer(status));
measureUnit.adoptInstead(MeasureUnit::createYard(status));
measureUnit.adoptInstead(MeasureUnit::createLux(status));
measureUnit.adoptInstead(MeasureUnit::createCarat(status));
measureUnit.adoptInstead(MeasureUnit::createGram(status));
measureUnit.adoptInstead(MeasureUnit::createKilogram(status));
measureUnit.adoptInstead(MeasureUnit::createMetricTon(status));
measureUnit.adoptInstead(MeasureUnit::createMicrogram(status));
measureUnit.adoptInstead(MeasureUnit::createMilligram(status));
measureUnit.adoptInstead(MeasureUnit::createOunce(status));
measureUnit.adoptInstead(MeasureUnit::createOunceTroy(status));
measureUnit.adoptInstead(MeasureUnit::createPound(status));
measureUnit.adoptInstead(MeasureUnit::createStone(status));
measureUnit.adoptInstead(MeasureUnit::createTon(status));
measureUnit.adoptInstead(MeasureUnit::createGigawatt(status));
measureUnit.adoptInstead(MeasureUnit::createHorsepower(status));
measureUnit.adoptInstead(MeasureUnit::createKilowatt(status));
measureUnit.adoptInstead(MeasureUnit::createMegawatt(status));
measureUnit.adoptInstead(MeasureUnit::createMilliwatt(status));
measureUnit.adoptInstead(MeasureUnit::createWatt(status));
measureUnit.adoptInstead(MeasureUnit::createHectopascal(status));
measureUnit.adoptInstead(MeasureUnit::createInchHg(status));
measureUnit.adoptInstead(MeasureUnit::createMillibar(status));
measureUnit.adoptInstead(MeasureUnit::createMillimeterOfMercury(status));
measureUnit.adoptInstead(MeasureUnit::createPoundPerSquareInch(status));
measureUnit.adoptInstead(MeasureUnit::createKarat(status));
measureUnit.adoptInstead(MeasureUnit::createKilometerPerHour(status));
measureUnit.adoptInstead(MeasureUnit::createMeterPerSecond(status));
measureUnit.adoptInstead(MeasureUnit::createMilePerHour(status));
measureUnit.adoptInstead(MeasureUnit::createCelsius(status));
measureUnit.adoptInstead(MeasureUnit::createFahrenheit(status));
measureUnit.adoptInstead(MeasureUnit::createKelvin(status));
measureUnit.adoptInstead(MeasureUnit::createAcreFoot(status));
measureUnit.adoptInstead(MeasureUnit::createBushel(status));
measureUnit.adoptInstead(MeasureUnit::createCentiliter(status));
measureUnit.adoptInstead(MeasureUnit::createCubicCentimeter(status));
measureUnit.adoptInstead(MeasureUnit::createCubicFoot(status));
measureUnit.adoptInstead(MeasureUnit::createCubicInch(status));
measureUnit.adoptInstead(MeasureUnit::createCubicKilometer(status));
measureUnit.adoptInstead(MeasureUnit::createCubicMeter(status));
measureUnit.adoptInstead(MeasureUnit::createCubicMile(status));
measureUnit.adoptInstead(MeasureUnit::createCubicYard(status));
measureUnit.adoptInstead(MeasureUnit::createCup(status));
measureUnit.adoptInstead(MeasureUnit::createDeciliter(status));
measureUnit.adoptInstead(MeasureUnit::createFluidOunce(status));
measureUnit.adoptInstead(MeasureUnit::createGallon(status));
measureUnit.adoptInstead(MeasureUnit::createHectoliter(status));
measureUnit.adoptInstead(MeasureUnit::createLiter(status));
measureUnit.adoptInstead(MeasureUnit::createMegaliter(status));
measureUnit.adoptInstead(MeasureUnit::createMilliliter(status));
measureUnit.adoptInstead(MeasureUnit::createPint(status));
measureUnit.adoptInstead(MeasureUnit::createQuart(status));
measureUnit.adoptInstead(MeasureUnit::createTablespoon(status));
measureUnit.adoptInstead(MeasureUnit::createTeaspoon(status));
assertSuccess("", status);
}
void MeasureFormatTest::TestCompatible55() {
UErrorCode status = U_ZERO_ERROR;
LocalPointer<MeasureUnit> measureUnit;
measureUnit.adoptInstead(MeasureUnit::createGForce(status));
measureUnit.adoptInstead(MeasureUnit::createMeterPerSecondSquared(status));
measureUnit.adoptInstead(MeasureUnit::createArcMinute(status));
measureUnit.adoptInstead(MeasureUnit::createArcSecond(status));
measureUnit.adoptInstead(MeasureUnit::createDegree(status));
measureUnit.adoptInstead(MeasureUnit::createRadian(status));
measureUnit.adoptInstead(MeasureUnit::createAcre(status));
measureUnit.adoptInstead(MeasureUnit::createHectare(status));
measureUnit.adoptInstead(MeasureUnit::createSquareCentimeter(status));
measureUnit.adoptInstead(MeasureUnit::createSquareFoot(status));
measureUnit.adoptInstead(MeasureUnit::createSquareInch(status));
measureUnit.adoptInstead(MeasureUnit::createSquareKilometer(status));
measureUnit.adoptInstead(MeasureUnit::createSquareMeter(status));
measureUnit.adoptInstead(MeasureUnit::createSquareMile(status));
measureUnit.adoptInstead(MeasureUnit::createSquareYard(status));
measureUnit.adoptInstead(MeasureUnit::createLiterPerKilometer(status));
measureUnit.adoptInstead(MeasureUnit::createMilePerGallon(status));
measureUnit.adoptInstead(MeasureUnit::createBit(status));
measureUnit.adoptInstead(MeasureUnit::createByte(status));
measureUnit.adoptInstead(MeasureUnit::createGigabit(status));
measureUnit.adoptInstead(MeasureUnit::createGigabyte(status));
measureUnit.adoptInstead(MeasureUnit::createKilobit(status));
measureUnit.adoptInstead(MeasureUnit::createKilobyte(status));
measureUnit.adoptInstead(MeasureUnit::createMegabit(status));
measureUnit.adoptInstead(MeasureUnit::createMegabyte(status));
measureUnit.adoptInstead(MeasureUnit::createTerabit(status));
measureUnit.adoptInstead(MeasureUnit::createTerabyte(status));
measureUnit.adoptInstead(MeasureUnit::createDay(status));
measureUnit.adoptInstead(MeasureUnit::createHour(status));
measureUnit.adoptInstead(MeasureUnit::createMicrosecond(status));
measureUnit.adoptInstead(MeasureUnit::createMillisecond(status));
measureUnit.adoptInstead(MeasureUnit::createMinute(status));
measureUnit.adoptInstead(MeasureUnit::createMonth(status));
measureUnit.adoptInstead(MeasureUnit::createNanosecond(status));
measureUnit.adoptInstead(MeasureUnit::createSecond(status));
measureUnit.adoptInstead(MeasureUnit::createWeek(status));
measureUnit.adoptInstead(MeasureUnit::createYear(status));
measureUnit.adoptInstead(MeasureUnit::createAmpere(status));
measureUnit.adoptInstead(MeasureUnit::createMilliampere(status));
measureUnit.adoptInstead(MeasureUnit::createOhm(status));
measureUnit.adoptInstead(MeasureUnit::createVolt(status));
measureUnit.adoptInstead(MeasureUnit::createCalorie(status));
measureUnit.adoptInstead(MeasureUnit::createFoodcalorie(status));
measureUnit.adoptInstead(MeasureUnit::createJoule(status));
measureUnit.adoptInstead(MeasureUnit::createKilocalorie(status));
measureUnit.adoptInstead(MeasureUnit::createKilojoule(status));
measureUnit.adoptInstead(MeasureUnit::createKilowattHour(status));
measureUnit.adoptInstead(MeasureUnit::createGigahertz(status));
measureUnit.adoptInstead(MeasureUnit::createHertz(status));
measureUnit.adoptInstead(MeasureUnit::createKilohertz(status));
measureUnit.adoptInstead(MeasureUnit::createMegahertz(status));
measureUnit.adoptInstead(MeasureUnit::createAstronomicalUnit(status));
measureUnit.adoptInstead(MeasureUnit::createCentimeter(status));
measureUnit.adoptInstead(MeasureUnit::createDecimeter(status));
measureUnit.adoptInstead(MeasureUnit::createFathom(status));
measureUnit.adoptInstead(MeasureUnit::createFoot(status));
measureUnit.adoptInstead(MeasureUnit::createFurlong(status));
measureUnit.adoptInstead(MeasureUnit::createInch(status));
measureUnit.adoptInstead(MeasureUnit::createKilometer(status));
measureUnit.adoptInstead(MeasureUnit::createLightYear(status));
measureUnit.adoptInstead(MeasureUnit::createMeter(status));
measureUnit.adoptInstead(MeasureUnit::createMicrometer(status));
measureUnit.adoptInstead(MeasureUnit::createMile(status));
measureUnit.adoptInstead(MeasureUnit::createMillimeter(status));
measureUnit.adoptInstead(MeasureUnit::createNanometer(status));
measureUnit.adoptInstead(MeasureUnit::createNauticalMile(status));
measureUnit.adoptInstead(MeasureUnit::createParsec(status));
measureUnit.adoptInstead(MeasureUnit::createPicometer(status));
measureUnit.adoptInstead(MeasureUnit::createYard(status));
measureUnit.adoptInstead(MeasureUnit::createLux(status));
measureUnit.adoptInstead(MeasureUnit::createCarat(status));
measureUnit.adoptInstead(MeasureUnit::createGram(status));
measureUnit.adoptInstead(MeasureUnit::createKilogram(status));
measureUnit.adoptInstead(MeasureUnit::createMetricTon(status));
measureUnit.adoptInstead(MeasureUnit::createMicrogram(status));
measureUnit.adoptInstead(MeasureUnit::createMilligram(status));
measureUnit.adoptInstead(MeasureUnit::createOunce(status));
measureUnit.adoptInstead(MeasureUnit::createOunceTroy(status));
measureUnit.adoptInstead(MeasureUnit::createPound(status));
measureUnit.adoptInstead(MeasureUnit::createStone(status));
measureUnit.adoptInstead(MeasureUnit::createTon(status));
measureUnit.adoptInstead(MeasureUnit::createGigawatt(status));
measureUnit.adoptInstead(MeasureUnit::createHorsepower(status));
measureUnit.adoptInstead(MeasureUnit::createKilowatt(status));
measureUnit.adoptInstead(MeasureUnit::createMegawatt(status));
measureUnit.adoptInstead(MeasureUnit::createMilliwatt(status));
measureUnit.adoptInstead(MeasureUnit::createWatt(status));
measureUnit.adoptInstead(MeasureUnit::createHectopascal(status));
measureUnit.adoptInstead(MeasureUnit::createInchHg(status));
measureUnit.adoptInstead(MeasureUnit::createMillibar(status));
measureUnit.adoptInstead(MeasureUnit::createMillimeterOfMercury(status));
measureUnit.adoptInstead(MeasureUnit::createPoundPerSquareInch(status));
measureUnit.adoptInstead(MeasureUnit::createKarat(status));
measureUnit.adoptInstead(MeasureUnit::createKilometerPerHour(status));
measureUnit.adoptInstead(MeasureUnit::createMeterPerSecond(status));
measureUnit.adoptInstead(MeasureUnit::createMilePerHour(status));
measureUnit.adoptInstead(MeasureUnit::createCelsius(status));
measureUnit.adoptInstead(MeasureUnit::createFahrenheit(status));
measureUnit.adoptInstead(MeasureUnit::createGenericTemperature(status));
measureUnit.adoptInstead(MeasureUnit::createKelvin(status));
measureUnit.adoptInstead(MeasureUnit::createAcreFoot(status));
measureUnit.adoptInstead(MeasureUnit::createBushel(status));
measureUnit.adoptInstead(MeasureUnit::createCentiliter(status));
measureUnit.adoptInstead(MeasureUnit::createCubicCentimeter(status));
measureUnit.adoptInstead(MeasureUnit::createCubicFoot(status));
measureUnit.adoptInstead(MeasureUnit::createCubicInch(status));
measureUnit.adoptInstead(MeasureUnit::createCubicKilometer(status));
measureUnit.adoptInstead(MeasureUnit::createCubicMeter(status));
measureUnit.adoptInstead(MeasureUnit::createCubicMile(status));
measureUnit.adoptInstead(MeasureUnit::createCubicYard(status));
measureUnit.adoptInstead(MeasureUnit::createCup(status));
measureUnit.adoptInstead(MeasureUnit::createDeciliter(status));
measureUnit.adoptInstead(MeasureUnit::createFluidOunce(status));
measureUnit.adoptInstead(MeasureUnit::createGallon(status));
measureUnit.adoptInstead(MeasureUnit::createHectoliter(status));
measureUnit.adoptInstead(MeasureUnit::createLiter(status));
measureUnit.adoptInstead(MeasureUnit::createMegaliter(status));
measureUnit.adoptInstead(MeasureUnit::createMilliliter(status));
measureUnit.adoptInstead(MeasureUnit::createPint(status));
measureUnit.adoptInstead(MeasureUnit::createQuart(status));
measureUnit.adoptInstead(MeasureUnit::createTablespoon(status));
measureUnit.adoptInstead(MeasureUnit::createTeaspoon(status));
assertSuccess("", status);
}
void MeasureFormatTest::TestCompatible56() {
UErrorCode status = U_ZERO_ERROR;
LocalPointer<MeasureUnit> measureUnit;
measureUnit.adoptInstead(MeasureUnit::createGForce(status));
measureUnit.adoptInstead(MeasureUnit::createMeterPerSecondSquared(status));
measureUnit.adoptInstead(MeasureUnit::createArcMinute(status));
measureUnit.adoptInstead(MeasureUnit::createArcSecond(status));
measureUnit.adoptInstead(MeasureUnit::createDegree(status));
measureUnit.adoptInstead(MeasureUnit::createRadian(status));
measureUnit.adoptInstead(MeasureUnit::createRevolutionAngle(status));
measureUnit.adoptInstead(MeasureUnit::createAcre(status));
measureUnit.adoptInstead(MeasureUnit::createHectare(status));
measureUnit.adoptInstead(MeasureUnit::createSquareCentimeter(status));
measureUnit.adoptInstead(MeasureUnit::createSquareFoot(status));
measureUnit.adoptInstead(MeasureUnit::createSquareInch(status));
measureUnit.adoptInstead(MeasureUnit::createSquareKilometer(status));
measureUnit.adoptInstead(MeasureUnit::createSquareMeter(status));
measureUnit.adoptInstead(MeasureUnit::createSquareMile(status));
measureUnit.adoptInstead(MeasureUnit::createSquareYard(status));
measureUnit.adoptInstead(MeasureUnit::createLiterPer100Kilometers(status));
measureUnit.adoptInstead(MeasureUnit::createLiterPerKilometer(status));
measureUnit.adoptInstead(MeasureUnit::createMilePerGallon(status));
measureUnit.adoptInstead(MeasureUnit::createBit(status));
measureUnit.adoptInstead(MeasureUnit::createByte(status));
measureUnit.adoptInstead(MeasureUnit::createGigabit(status));
measureUnit.adoptInstead(MeasureUnit::createGigabyte(status));
measureUnit.adoptInstead(MeasureUnit::createKilobit(status));
measureUnit.adoptInstead(MeasureUnit::createKilobyte(status));
measureUnit.adoptInstead(MeasureUnit::createMegabit(status));
measureUnit.adoptInstead(MeasureUnit::createMegabyte(status));
measureUnit.adoptInstead(MeasureUnit::createTerabit(status));
measureUnit.adoptInstead(MeasureUnit::createTerabyte(status));
measureUnit.adoptInstead(MeasureUnit::createCentury(status));
measureUnit.adoptInstead(MeasureUnit::createDay(status));
measureUnit.adoptInstead(MeasureUnit::createHour(status));
measureUnit.adoptInstead(MeasureUnit::createMicrosecond(status));
measureUnit.adoptInstead(MeasureUnit::createMillisecond(status));
measureUnit.adoptInstead(MeasureUnit::createMinute(status));
measureUnit.adoptInstead(MeasureUnit::createMonth(status));
measureUnit.adoptInstead(MeasureUnit::createNanosecond(status));
measureUnit.adoptInstead(MeasureUnit::createSecond(status));
measureUnit.adoptInstead(MeasureUnit::createWeek(status));
measureUnit.adoptInstead(MeasureUnit::createYear(status));
measureUnit.adoptInstead(MeasureUnit::createAmpere(status));
measureUnit.adoptInstead(MeasureUnit::createMilliampere(status));
measureUnit.adoptInstead(MeasureUnit::createOhm(status));
measureUnit.adoptInstead(MeasureUnit::createVolt(status));
measureUnit.adoptInstead(MeasureUnit::createCalorie(status));
measureUnit.adoptInstead(MeasureUnit::createFoodcalorie(status));
measureUnit.adoptInstead(MeasureUnit::createJoule(status));
measureUnit.adoptInstead(MeasureUnit::createKilocalorie(status));
measureUnit.adoptInstead(MeasureUnit::createKilojoule(status));
measureUnit.adoptInstead(MeasureUnit::createKilowattHour(status));
measureUnit.adoptInstead(MeasureUnit::createGigahertz(status));
measureUnit.adoptInstead(MeasureUnit::createHertz(status));
measureUnit.adoptInstead(MeasureUnit::createKilohertz(status));
measureUnit.adoptInstead(MeasureUnit::createMegahertz(status));
measureUnit.adoptInstead(MeasureUnit::createAstronomicalUnit(status));
measureUnit.adoptInstead(MeasureUnit::createCentimeter(status));
measureUnit.adoptInstead(MeasureUnit::createDecimeter(status));
measureUnit.adoptInstead(MeasureUnit::createFathom(status));
measureUnit.adoptInstead(MeasureUnit::createFoot(status));
measureUnit.adoptInstead(MeasureUnit::createFurlong(status));
measureUnit.adoptInstead(MeasureUnit::createInch(status));
measureUnit.adoptInstead(MeasureUnit::createKilometer(status));
measureUnit.adoptInstead(MeasureUnit::createLightYear(status));
measureUnit.adoptInstead(MeasureUnit::createMeter(status));
measureUnit.adoptInstead(MeasureUnit::createMicrometer(status));
measureUnit.adoptInstead(MeasureUnit::createMile(status));
measureUnit.adoptInstead(MeasureUnit::createMileScandinavian(status));
measureUnit.adoptInstead(MeasureUnit::createMillimeter(status));
measureUnit.adoptInstead(MeasureUnit::createNanometer(status));
measureUnit.adoptInstead(MeasureUnit::createNauticalMile(status));
measureUnit.adoptInstead(MeasureUnit::createParsec(status));
measureUnit.adoptInstead(MeasureUnit::createPicometer(status));
measureUnit.adoptInstead(MeasureUnit::createYard(status));
measureUnit.adoptInstead(MeasureUnit::createLux(status));
measureUnit.adoptInstead(MeasureUnit::createCarat(status));
measureUnit.adoptInstead(MeasureUnit::createGram(status));
measureUnit.adoptInstead(MeasureUnit::createKilogram(status));
measureUnit.adoptInstead(MeasureUnit::createMetricTon(status));
measureUnit.adoptInstead(MeasureUnit::createMicrogram(status));
measureUnit.adoptInstead(MeasureUnit::createMilligram(status));
measureUnit.adoptInstead(MeasureUnit::createOunce(status));
measureUnit.adoptInstead(MeasureUnit::createOunceTroy(status));
measureUnit.adoptInstead(MeasureUnit::createPound(status));
measureUnit.adoptInstead(MeasureUnit::createStone(status));
measureUnit.adoptInstead(MeasureUnit::createTon(status));
measureUnit.adoptInstead(MeasureUnit::createGigawatt(status));
measureUnit.adoptInstead(MeasureUnit::createHorsepower(status));
measureUnit.adoptInstead(MeasureUnit::createKilowatt(status));
measureUnit.adoptInstead(MeasureUnit::createMegawatt(status));
measureUnit.adoptInstead(MeasureUnit::createMilliwatt(status));
measureUnit.adoptInstead(MeasureUnit::createWatt(status));
measureUnit.adoptInstead(MeasureUnit::createHectopascal(status));
measureUnit.adoptInstead(MeasureUnit::createInchHg(status));
measureUnit.adoptInstead(MeasureUnit::createMillibar(status));
measureUnit.adoptInstead(MeasureUnit::createMillimeterOfMercury(status));
measureUnit.adoptInstead(MeasureUnit::createPoundPerSquareInch(status));
measureUnit.adoptInstead(MeasureUnit::createKarat(status));
measureUnit.adoptInstead(MeasureUnit::createKilometerPerHour(status));
measureUnit.adoptInstead(MeasureUnit::createKnot(status));
measureUnit.adoptInstead(MeasureUnit::createMeterPerSecond(status));
measureUnit.adoptInstead(MeasureUnit::createMilePerHour(status));
measureUnit.adoptInstead(MeasureUnit::createCelsius(status));
measureUnit.adoptInstead(MeasureUnit::createFahrenheit(status));
measureUnit.adoptInstead(MeasureUnit::createGenericTemperature(status));
measureUnit.adoptInstead(MeasureUnit::createKelvin(status));
measureUnit.adoptInstead(MeasureUnit::createAcreFoot(status));
measureUnit.adoptInstead(MeasureUnit::createBushel(status));
measureUnit.adoptInstead(MeasureUnit::createCentiliter(status));
measureUnit.adoptInstead(MeasureUnit::createCubicCentimeter(status));
measureUnit.adoptInstead(MeasureUnit::createCubicFoot(status));
measureUnit.adoptInstead(MeasureUnit::createCubicInch(status));
measureUnit.adoptInstead(MeasureUnit::createCubicKilometer(status));
measureUnit.adoptInstead(MeasureUnit::createCubicMeter(status));
measureUnit.adoptInstead(MeasureUnit::createCubicMile(status));
measureUnit.adoptInstead(MeasureUnit::createCubicYard(status));
measureUnit.adoptInstead(MeasureUnit::createCup(status));
measureUnit.adoptInstead(MeasureUnit::createCupMetric(status));
measureUnit.adoptInstead(MeasureUnit::createDeciliter(status));
measureUnit.adoptInstead(MeasureUnit::createFluidOunce(status));
measureUnit.adoptInstead(MeasureUnit::createGallon(status));
measureUnit.adoptInstead(MeasureUnit::createHectoliter(status));
measureUnit.adoptInstead(MeasureUnit::createLiter(status));
measureUnit.adoptInstead(MeasureUnit::createMegaliter(status));
measureUnit.adoptInstead(MeasureUnit::createMilliliter(status));
measureUnit.adoptInstead(MeasureUnit::createPint(status));
measureUnit.adoptInstead(MeasureUnit::createPintMetric(status));
measureUnit.adoptInstead(MeasureUnit::createQuart(status));
measureUnit.adoptInstead(MeasureUnit::createTablespoon(status));
measureUnit.adoptInstead(MeasureUnit::createTeaspoon(status));
assertSuccess("", status);
}
void MeasureFormatTest::TestCompatible57() {
UErrorCode status = U_ZERO_ERROR;
LocalPointer<MeasureUnit> measureUnit;
measureUnit.adoptInstead(MeasureUnit::createGForce(status));
measureUnit.adoptInstead(MeasureUnit::createMeterPerSecondSquared(status));
measureUnit.adoptInstead(MeasureUnit::createArcMinute(status));
measureUnit.adoptInstead(MeasureUnit::createArcSecond(status));
measureUnit.adoptInstead(MeasureUnit::createDegree(status));
measureUnit.adoptInstead(MeasureUnit::createRadian(status));
measureUnit.adoptInstead(MeasureUnit::createRevolutionAngle(status));
measureUnit.adoptInstead(MeasureUnit::createAcre(status));
measureUnit.adoptInstead(MeasureUnit::createHectare(status));
measureUnit.adoptInstead(MeasureUnit::createSquareCentimeter(status));
measureUnit.adoptInstead(MeasureUnit::createSquareFoot(status));
measureUnit.adoptInstead(MeasureUnit::createSquareInch(status));
measureUnit.adoptInstead(MeasureUnit::createSquareKilometer(status));
measureUnit.adoptInstead(MeasureUnit::createSquareMeter(status));
measureUnit.adoptInstead(MeasureUnit::createSquareMile(status));
measureUnit.adoptInstead(MeasureUnit::createSquareYard(status));
measureUnit.adoptInstead(MeasureUnit::createKarat(status));
measureUnit.adoptInstead(MeasureUnit::createMilligramPerDeciliter(status));
measureUnit.adoptInstead(MeasureUnit::createMillimolePerLiter(status));
measureUnit.adoptInstead(MeasureUnit::createPartPerMillion(status));
measureUnit.adoptInstead(MeasureUnit::createLiterPer100Kilometers(status));
measureUnit.adoptInstead(MeasureUnit::createLiterPerKilometer(status));
measureUnit.adoptInstead(MeasureUnit::createMilePerGallon(status));
measureUnit.adoptInstead(MeasureUnit::createMilePerGallonImperial(status));
measureUnit.adoptInstead(MeasureUnit::createBit(status));
measureUnit.adoptInstead(MeasureUnit::createByte(status));
measureUnit.adoptInstead(MeasureUnit::createGigabit(status));
measureUnit.adoptInstead(MeasureUnit::createGigabyte(status));
measureUnit.adoptInstead(MeasureUnit::createKilobit(status));
measureUnit.adoptInstead(MeasureUnit::createKilobyte(status));
measureUnit.adoptInstead(MeasureUnit::createMegabit(status));
measureUnit.adoptInstead(MeasureUnit::createMegabyte(status));
measureUnit.adoptInstead(MeasureUnit::createTerabit(status));
measureUnit.adoptInstead(MeasureUnit::createTerabyte(status));
measureUnit.adoptInstead(MeasureUnit::createCentury(status));
measureUnit.adoptInstead(MeasureUnit::createDay(status));
measureUnit.adoptInstead(MeasureUnit::createHour(status));
measureUnit.adoptInstead(MeasureUnit::createMicrosecond(status));
measureUnit.adoptInstead(MeasureUnit::createMillisecond(status));
measureUnit.adoptInstead(MeasureUnit::createMinute(status));
measureUnit.adoptInstead(MeasureUnit::createMonth(status));
measureUnit.adoptInstead(MeasureUnit::createNanosecond(status));
measureUnit.adoptInstead(MeasureUnit::createSecond(status));
measureUnit.adoptInstead(MeasureUnit::createWeek(status));
measureUnit.adoptInstead(MeasureUnit::createYear(status));
measureUnit.adoptInstead(MeasureUnit::createAmpere(status));
measureUnit.adoptInstead(MeasureUnit::createMilliampere(status));
measureUnit.adoptInstead(MeasureUnit::createOhm(status));
measureUnit.adoptInstead(MeasureUnit::createVolt(status));
measureUnit.adoptInstead(MeasureUnit::createCalorie(status));
measureUnit.adoptInstead(MeasureUnit::createFoodcalorie(status));
measureUnit.adoptInstead(MeasureUnit::createJoule(status));
measureUnit.adoptInstead(MeasureUnit::createKilocalorie(status));
measureUnit.adoptInstead(MeasureUnit::createKilojoule(status));
measureUnit.adoptInstead(MeasureUnit::createKilowattHour(status));
measureUnit.adoptInstead(MeasureUnit::createGigahertz(status));
measureUnit.adoptInstead(MeasureUnit::createHertz(status));
measureUnit.adoptInstead(MeasureUnit::createKilohertz(status));
measureUnit.adoptInstead(MeasureUnit::createMegahertz(status));
measureUnit.adoptInstead(MeasureUnit::createAstronomicalUnit(status));
measureUnit.adoptInstead(MeasureUnit::createCentimeter(status));
measureUnit.adoptInstead(MeasureUnit::createDecimeter(status));
measureUnit.adoptInstead(MeasureUnit::createFathom(status));
measureUnit.adoptInstead(MeasureUnit::createFoot(status));
measureUnit.adoptInstead(MeasureUnit::createFurlong(status));
measureUnit.adoptInstead(MeasureUnit::createInch(status));
measureUnit.adoptInstead(MeasureUnit::createKilometer(status));
measureUnit.adoptInstead(MeasureUnit::createLightYear(status));
measureUnit.adoptInstead(MeasureUnit::createMeter(status));
measureUnit.adoptInstead(MeasureUnit::createMicrometer(status));
measureUnit.adoptInstead(MeasureUnit::createMile(status));
measureUnit.adoptInstead(MeasureUnit::createMileScandinavian(status));
measureUnit.adoptInstead(MeasureUnit::createMillimeter(status));
measureUnit.adoptInstead(MeasureUnit::createNanometer(status));
measureUnit.adoptInstead(MeasureUnit::createNauticalMile(status));
measureUnit.adoptInstead(MeasureUnit::createParsec(status));
measureUnit.adoptInstead(MeasureUnit::createPicometer(status));
measureUnit.adoptInstead(MeasureUnit::createYard(status));
measureUnit.adoptInstead(MeasureUnit::createLux(status));
measureUnit.adoptInstead(MeasureUnit::createCarat(status));
measureUnit.adoptInstead(MeasureUnit::createGram(status));
measureUnit.adoptInstead(MeasureUnit::createKilogram(status));
measureUnit.adoptInstead(MeasureUnit::createMetricTon(status));
measureUnit.adoptInstead(MeasureUnit::createMicrogram(status));
measureUnit.adoptInstead(MeasureUnit::createMilligram(status));
measureUnit.adoptInstead(MeasureUnit::createOunce(status));
measureUnit.adoptInstead(MeasureUnit::createOunceTroy(status));
measureUnit.adoptInstead(MeasureUnit::createPound(status));
measureUnit.adoptInstead(MeasureUnit::createStone(status));
measureUnit.adoptInstead(MeasureUnit::createTon(status));
measureUnit.adoptInstead(MeasureUnit::createGigawatt(status));
measureUnit.adoptInstead(MeasureUnit::createHorsepower(status));
measureUnit.adoptInstead(MeasureUnit::createKilowatt(status));
measureUnit.adoptInstead(MeasureUnit::createMegawatt(status));
measureUnit.adoptInstead(MeasureUnit::createMilliwatt(status));
measureUnit.adoptInstead(MeasureUnit::createWatt(status));
measureUnit.adoptInstead(MeasureUnit::createHectopascal(status));
measureUnit.adoptInstead(MeasureUnit::createInchHg(status));
measureUnit.adoptInstead(MeasureUnit::createMillibar(status));
measureUnit.adoptInstead(MeasureUnit::createMillimeterOfMercury(status));
measureUnit.adoptInstead(MeasureUnit::createPoundPerSquareInch(status));
measureUnit.adoptInstead(MeasureUnit::createKilometerPerHour(status));
measureUnit.adoptInstead(MeasureUnit::createKnot(status));
measureUnit.adoptInstead(MeasureUnit::createMeterPerSecond(status));
measureUnit.adoptInstead(MeasureUnit::createMilePerHour(status));
measureUnit.adoptInstead(MeasureUnit::createCelsius(status));
measureUnit.adoptInstead(MeasureUnit::createFahrenheit(status));
measureUnit.adoptInstead(MeasureUnit::createGenericTemperature(status));
measureUnit.adoptInstead(MeasureUnit::createKelvin(status));
measureUnit.adoptInstead(MeasureUnit::createAcreFoot(status));
measureUnit.adoptInstead(MeasureUnit::createBushel(status));
measureUnit.adoptInstead(MeasureUnit::createCentiliter(status));
measureUnit.adoptInstead(MeasureUnit::createCubicCentimeter(status));
measureUnit.adoptInstead(MeasureUnit::createCubicFoot(status));
measureUnit.adoptInstead(MeasureUnit::createCubicInch(status));
measureUnit.adoptInstead(MeasureUnit::createCubicKilometer(status));
measureUnit.adoptInstead(MeasureUnit::createCubicMeter(status));
measureUnit.adoptInstead(MeasureUnit::createCubicMile(status));
measureUnit.adoptInstead(MeasureUnit::createCubicYard(status));
measureUnit.adoptInstead(MeasureUnit::createCup(status));
measureUnit.adoptInstead(MeasureUnit::createCupMetric(status));
measureUnit.adoptInstead(MeasureUnit::createDeciliter(status));
measureUnit.adoptInstead(MeasureUnit::createFluidOunce(status));
measureUnit.adoptInstead(MeasureUnit::createGallon(status));
measureUnit.adoptInstead(MeasureUnit::createGallonImperial(status));
measureUnit.adoptInstead(MeasureUnit::createHectoliter(status));
measureUnit.adoptInstead(MeasureUnit::createLiter(status));
measureUnit.adoptInstead(MeasureUnit::createMegaliter(status));
measureUnit.adoptInstead(MeasureUnit::createMilliliter(status));
measureUnit.adoptInstead(MeasureUnit::createPint(status));
measureUnit.adoptInstead(MeasureUnit::createPintMetric(status));
measureUnit.adoptInstead(MeasureUnit::createQuart(status));
measureUnit.adoptInstead(MeasureUnit::createTablespoon(status));
measureUnit.adoptInstead(MeasureUnit::createTeaspoon(status));
assertSuccess("", status);
}
void MeasureFormatTest::TestCompatible58() {
UErrorCode status = U_ZERO_ERROR;
LocalPointer<MeasureUnit> measureUnit;
measureUnit.adoptInstead(MeasureUnit::createGForce(status));
measureUnit.adoptInstead(MeasureUnit::createMeterPerSecondSquared(status));
measureUnit.adoptInstead(MeasureUnit::createArcMinute(status));
measureUnit.adoptInstead(MeasureUnit::createArcSecond(status));
measureUnit.adoptInstead(MeasureUnit::createDegree(status));
measureUnit.adoptInstead(MeasureUnit::createRadian(status));
measureUnit.adoptInstead(MeasureUnit::createRevolutionAngle(status));
measureUnit.adoptInstead(MeasureUnit::createAcre(status));
measureUnit.adoptInstead(MeasureUnit::createHectare(status));
measureUnit.adoptInstead(MeasureUnit::createSquareCentimeter(status));
measureUnit.adoptInstead(MeasureUnit::createSquareFoot(status));
measureUnit.adoptInstead(MeasureUnit::createSquareInch(status));
measureUnit.adoptInstead(MeasureUnit::createSquareKilometer(status));
measureUnit.adoptInstead(MeasureUnit::createSquareMeter(status));
measureUnit.adoptInstead(MeasureUnit::createSquareMile(status));
measureUnit.adoptInstead(MeasureUnit::createSquareYard(status));
measureUnit.adoptInstead(MeasureUnit::createKarat(status));
measureUnit.adoptInstead(MeasureUnit::createMilligramPerDeciliter(status));
measureUnit.adoptInstead(MeasureUnit::createMillimolePerLiter(status));
measureUnit.adoptInstead(MeasureUnit::createPartPerMillion(status));
measureUnit.adoptInstead(MeasureUnit::createLiterPer100Kilometers(status));
measureUnit.adoptInstead(MeasureUnit::createLiterPerKilometer(status));
measureUnit.adoptInstead(MeasureUnit::createMilePerGallon(status));
measureUnit.adoptInstead(MeasureUnit::createMilePerGallonImperial(status));
// measureUnit.adoptInstead(MeasureUnit::createEast(status));
// measureUnit.adoptInstead(MeasureUnit::createNorth(status));
// measureUnit.adoptInstead(MeasureUnit::createSouth(status));
// measureUnit.adoptInstead(MeasureUnit::createWest(status));
measureUnit.adoptInstead(MeasureUnit::createBit(status));
measureUnit.adoptInstead(MeasureUnit::createByte(status));
measureUnit.adoptInstead(MeasureUnit::createGigabit(status));
measureUnit.adoptInstead(MeasureUnit::createGigabyte(status));
measureUnit.adoptInstead(MeasureUnit::createKilobit(status));
measureUnit.adoptInstead(MeasureUnit::createKilobyte(status));
measureUnit.adoptInstead(MeasureUnit::createMegabit(status));
measureUnit.adoptInstead(MeasureUnit::createMegabyte(status));
measureUnit.adoptInstead(MeasureUnit::createTerabit(status));
measureUnit.adoptInstead(MeasureUnit::createTerabyte(status));
measureUnit.adoptInstead(MeasureUnit::createCentury(status));
measureUnit.adoptInstead(MeasureUnit::createDay(status));
measureUnit.adoptInstead(MeasureUnit::createHour(status));
measureUnit.adoptInstead(MeasureUnit::createMicrosecond(status));
measureUnit.adoptInstead(MeasureUnit::createMillisecond(status));
measureUnit.adoptInstead(MeasureUnit::createMinute(status));
measureUnit.adoptInstead(MeasureUnit::createMonth(status));
measureUnit.adoptInstead(MeasureUnit::createNanosecond(status));
measureUnit.adoptInstead(MeasureUnit::createSecond(status));
measureUnit.adoptInstead(MeasureUnit::createWeek(status));
measureUnit.adoptInstead(MeasureUnit::createYear(status));
measureUnit.adoptInstead(MeasureUnit::createAmpere(status));
measureUnit.adoptInstead(MeasureUnit::createMilliampere(status));
measureUnit.adoptInstead(MeasureUnit::createOhm(status));
measureUnit.adoptInstead(MeasureUnit::createVolt(status));
measureUnit.adoptInstead(MeasureUnit::createCalorie(status));
measureUnit.adoptInstead(MeasureUnit::createFoodcalorie(status));
measureUnit.adoptInstead(MeasureUnit::createJoule(status));
measureUnit.adoptInstead(MeasureUnit::createKilocalorie(status));
measureUnit.adoptInstead(MeasureUnit::createKilojoule(status));
measureUnit.adoptInstead(MeasureUnit::createKilowattHour(status));
measureUnit.adoptInstead(MeasureUnit::createGigahertz(status));
measureUnit.adoptInstead(MeasureUnit::createHertz(status));
measureUnit.adoptInstead(MeasureUnit::createKilohertz(status));
measureUnit.adoptInstead(MeasureUnit::createMegahertz(status));
measureUnit.adoptInstead(MeasureUnit::createAstronomicalUnit(status));
measureUnit.adoptInstead(MeasureUnit::createCentimeter(status));
measureUnit.adoptInstead(MeasureUnit::createDecimeter(status));
measureUnit.adoptInstead(MeasureUnit::createFathom(status));
measureUnit.adoptInstead(MeasureUnit::createFoot(status));
measureUnit.adoptInstead(MeasureUnit::createFurlong(status));
measureUnit.adoptInstead(MeasureUnit::createInch(status));
measureUnit.adoptInstead(MeasureUnit::createKilometer(status));
measureUnit.adoptInstead(MeasureUnit::createLightYear(status));
measureUnit.adoptInstead(MeasureUnit::createMeter(status));
measureUnit.adoptInstead(MeasureUnit::createMicrometer(status));
measureUnit.adoptInstead(MeasureUnit::createMile(status));
measureUnit.adoptInstead(MeasureUnit::createMileScandinavian(status));
measureUnit.adoptInstead(MeasureUnit::createMillimeter(status));
measureUnit.adoptInstead(MeasureUnit::createNanometer(status));
measureUnit.adoptInstead(MeasureUnit::createNauticalMile(status));
measureUnit.adoptInstead(MeasureUnit::createParsec(status));
measureUnit.adoptInstead(MeasureUnit::createPicometer(status));
measureUnit.adoptInstead(MeasureUnit::createYard(status));
measureUnit.adoptInstead(MeasureUnit::createLux(status));
measureUnit.adoptInstead(MeasureUnit::createCarat(status));
measureUnit.adoptInstead(MeasureUnit::createGram(status));
measureUnit.adoptInstead(MeasureUnit::createKilogram(status));
measureUnit.adoptInstead(MeasureUnit::createMetricTon(status));
measureUnit.adoptInstead(MeasureUnit::createMicrogram(status));
measureUnit.adoptInstead(MeasureUnit::createMilligram(status));
measureUnit.adoptInstead(MeasureUnit::createOunce(status));
measureUnit.adoptInstead(MeasureUnit::createOunceTroy(status));
measureUnit.adoptInstead(MeasureUnit::createPound(status));
measureUnit.adoptInstead(MeasureUnit::createStone(status));
measureUnit.adoptInstead(MeasureUnit::createTon(status));
measureUnit.adoptInstead(MeasureUnit::createGigawatt(status));
measureUnit.adoptInstead(MeasureUnit::createHorsepower(status));
measureUnit.adoptInstead(MeasureUnit::createKilowatt(status));
measureUnit.adoptInstead(MeasureUnit::createMegawatt(status));
measureUnit.adoptInstead(MeasureUnit::createMilliwatt(status));
measureUnit.adoptInstead(MeasureUnit::createWatt(status));
measureUnit.adoptInstead(MeasureUnit::createHectopascal(status));
measureUnit.adoptInstead(MeasureUnit::createInchHg(status));
measureUnit.adoptInstead(MeasureUnit::createMillibar(status));
measureUnit.adoptInstead(MeasureUnit::createMillimeterOfMercury(status));
measureUnit.adoptInstead(MeasureUnit::createPoundPerSquareInch(status));
measureUnit.adoptInstead(MeasureUnit::createKilometerPerHour(status));
measureUnit.adoptInstead(MeasureUnit::createKnot(status));
measureUnit.adoptInstead(MeasureUnit::createMeterPerSecond(status));
measureUnit.adoptInstead(MeasureUnit::createMilePerHour(status));
measureUnit.adoptInstead(MeasureUnit::createCelsius(status));
measureUnit.adoptInstead(MeasureUnit::createFahrenheit(status));
measureUnit.adoptInstead(MeasureUnit::createGenericTemperature(status));
measureUnit.adoptInstead(MeasureUnit::createKelvin(status));
measureUnit.adoptInstead(MeasureUnit::createAcreFoot(status));
measureUnit.adoptInstead(MeasureUnit::createBushel(status));
measureUnit.adoptInstead(MeasureUnit::createCentiliter(status));
measureUnit.adoptInstead(MeasureUnit::createCubicCentimeter(status));
measureUnit.adoptInstead(MeasureUnit::createCubicFoot(status));
measureUnit.adoptInstead(MeasureUnit::createCubicInch(status));
measureUnit.adoptInstead(MeasureUnit::createCubicKilometer(status));
measureUnit.adoptInstead(MeasureUnit::createCubicMeter(status));
measureUnit.adoptInstead(MeasureUnit::createCubicMile(status));
measureUnit.adoptInstead(MeasureUnit::createCubicYard(status));
measureUnit.adoptInstead(MeasureUnit::createCup(status));
measureUnit.adoptInstead(MeasureUnit::createCupMetric(status));
measureUnit.adoptInstead(MeasureUnit::createDeciliter(status));
measureUnit.adoptInstead(MeasureUnit::createFluidOunce(status));
measureUnit.adoptInstead(MeasureUnit::createGallon(status));
measureUnit.adoptInstead(MeasureUnit::createGallonImperial(status));
measureUnit.adoptInstead(MeasureUnit::createHectoliter(status));
measureUnit.adoptInstead(MeasureUnit::createLiter(status));
measureUnit.adoptInstead(MeasureUnit::createMegaliter(status));
measureUnit.adoptInstead(MeasureUnit::createMilliliter(status));
measureUnit.adoptInstead(MeasureUnit::createPint(status));
measureUnit.adoptInstead(MeasureUnit::createPintMetric(status));
measureUnit.adoptInstead(MeasureUnit::createQuart(status));
measureUnit.adoptInstead(MeasureUnit::createTablespoon(status));
measureUnit.adoptInstead(MeasureUnit::createTeaspoon(status));
assertSuccess("", status);
}
void MeasureFormatTest::TestCompatible59() {
UErrorCode status = U_ZERO_ERROR;
LocalPointer<MeasureUnit> measureUnit;
measureUnit.adoptInstead(MeasureUnit::createGForce(status));
measureUnit.adoptInstead(MeasureUnit::createMeterPerSecondSquared(status));
measureUnit.adoptInstead(MeasureUnit::createArcMinute(status));
measureUnit.adoptInstead(MeasureUnit::createArcSecond(status));
measureUnit.adoptInstead(MeasureUnit::createDegree(status));
measureUnit.adoptInstead(MeasureUnit::createRadian(status));
measureUnit.adoptInstead(MeasureUnit::createRevolutionAngle(status));
measureUnit.adoptInstead(MeasureUnit::createAcre(status));
measureUnit.adoptInstead(MeasureUnit::createHectare(status));
measureUnit.adoptInstead(MeasureUnit::createSquareCentimeter(status));
measureUnit.adoptInstead(MeasureUnit::createSquareFoot(status));
measureUnit.adoptInstead(MeasureUnit::createSquareInch(status));
measureUnit.adoptInstead(MeasureUnit::createSquareKilometer(status));
measureUnit.adoptInstead(MeasureUnit::createSquareMeter(status));
measureUnit.adoptInstead(MeasureUnit::createSquareMile(status));
measureUnit.adoptInstead(MeasureUnit::createSquareYard(status));
measureUnit.adoptInstead(MeasureUnit::createKarat(status));
measureUnit.adoptInstead(MeasureUnit::createMilligramPerDeciliter(status));
measureUnit.adoptInstead(MeasureUnit::createMillimolePerLiter(status));
measureUnit.adoptInstead(MeasureUnit::createPartPerMillion(status));
measureUnit.adoptInstead(MeasureUnit::createLiterPer100Kilometers(status));
measureUnit.adoptInstead(MeasureUnit::createLiterPerKilometer(status));
measureUnit.adoptInstead(MeasureUnit::createMilePerGallon(status));
measureUnit.adoptInstead(MeasureUnit::createMilePerGallonImperial(status));
measureUnit.adoptInstead(MeasureUnit::createBit(status));
measureUnit.adoptInstead(MeasureUnit::createByte(status));
measureUnit.adoptInstead(MeasureUnit::createGigabit(status));
measureUnit.adoptInstead(MeasureUnit::createGigabyte(status));
measureUnit.adoptInstead(MeasureUnit::createKilobit(status));
measureUnit.adoptInstead(MeasureUnit::createKilobyte(status));
measureUnit.adoptInstead(MeasureUnit::createMegabit(status));
measureUnit.adoptInstead(MeasureUnit::createMegabyte(status));
measureUnit.adoptInstead(MeasureUnit::createTerabit(status));
measureUnit.adoptInstead(MeasureUnit::createTerabyte(status));
measureUnit.adoptInstead(MeasureUnit::createCentury(status));
measureUnit.adoptInstead(MeasureUnit::createDay(status));
measureUnit.adoptInstead(MeasureUnit::createHour(status));
measureUnit.adoptInstead(MeasureUnit::createMicrosecond(status));
measureUnit.adoptInstead(MeasureUnit::createMillisecond(status));
measureUnit.adoptInstead(MeasureUnit::createMinute(status));
measureUnit.adoptInstead(MeasureUnit::createMonth(status));
measureUnit.adoptInstead(MeasureUnit::createNanosecond(status));
measureUnit.adoptInstead(MeasureUnit::createSecond(status));
measureUnit.adoptInstead(MeasureUnit::createWeek(status));
measureUnit.adoptInstead(MeasureUnit::createYear(status));
measureUnit.adoptInstead(MeasureUnit::createAmpere(status));
measureUnit.adoptInstead(MeasureUnit::createMilliampere(status));
measureUnit.adoptInstead(MeasureUnit::createOhm(status));
measureUnit.adoptInstead(MeasureUnit::createVolt(status));
measureUnit.adoptInstead(MeasureUnit::createCalorie(status));
measureUnit.adoptInstead(MeasureUnit::createFoodcalorie(status));
measureUnit.adoptInstead(MeasureUnit::createJoule(status));
measureUnit.adoptInstead(MeasureUnit::createKilocalorie(status));
measureUnit.adoptInstead(MeasureUnit::createKilojoule(status));
measureUnit.adoptInstead(MeasureUnit::createKilowattHour(status));
measureUnit.adoptInstead(MeasureUnit::createGigahertz(status));
measureUnit.adoptInstead(MeasureUnit::createHertz(status));
measureUnit.adoptInstead(MeasureUnit::createKilohertz(status));
measureUnit.adoptInstead(MeasureUnit::createMegahertz(status));
measureUnit.adoptInstead(MeasureUnit::createAstronomicalUnit(status));
measureUnit.adoptInstead(MeasureUnit::createCentimeter(status));
measureUnit.adoptInstead(MeasureUnit::createDecimeter(status));
measureUnit.adoptInstead(MeasureUnit::createFathom(status));
measureUnit.adoptInstead(MeasureUnit::createFoot(status));
measureUnit.adoptInstead(MeasureUnit::createFurlong(status));
measureUnit.adoptInstead(MeasureUnit::createInch(status));
measureUnit.adoptInstead(MeasureUnit::createKilometer(status));
measureUnit.adoptInstead(MeasureUnit::createLightYear(status));
measureUnit.adoptInstead(MeasureUnit::createMeter(status));
measureUnit.adoptInstead(MeasureUnit::createMicrometer(status));
measureUnit.adoptInstead(MeasureUnit::createMile(status));
measureUnit.adoptInstead(MeasureUnit::createMileScandinavian(status));
measureUnit.adoptInstead(MeasureUnit::createMillimeter(status));
measureUnit.adoptInstead(MeasureUnit::createNanometer(status));
measureUnit.adoptInstead(MeasureUnit::createNauticalMile(status));
measureUnit.adoptInstead(MeasureUnit::createParsec(status));
measureUnit.adoptInstead(MeasureUnit::createPicometer(status));
measureUnit.adoptInstead(MeasureUnit::createPoint(status));
measureUnit.adoptInstead(MeasureUnit::createYard(status));
measureUnit.adoptInstead(MeasureUnit::createLux(status));
measureUnit.adoptInstead(MeasureUnit::createCarat(status));
measureUnit.adoptInstead(MeasureUnit::createGram(status));
measureUnit.adoptInstead(MeasureUnit::createKilogram(status));
measureUnit.adoptInstead(MeasureUnit::createMetricTon(status));
measureUnit.adoptInstead(MeasureUnit::createMicrogram(status));
measureUnit.adoptInstead(MeasureUnit::createMilligram(status));
measureUnit.adoptInstead(MeasureUnit::createOunce(status));
measureUnit.adoptInstead(MeasureUnit::createOunceTroy(status));
measureUnit.adoptInstead(MeasureUnit::createPound(status));
measureUnit.adoptInstead(MeasureUnit::createStone(status));
measureUnit.adoptInstead(MeasureUnit::createTon(status));
measureUnit.adoptInstead(MeasureUnit::createGigawatt(status));
measureUnit.adoptInstead(MeasureUnit::createHorsepower(status));
measureUnit.adoptInstead(MeasureUnit::createKilowatt(status));
measureUnit.adoptInstead(MeasureUnit::createMegawatt(status));
measureUnit.adoptInstead(MeasureUnit::createMilliwatt(status));
measureUnit.adoptInstead(MeasureUnit::createWatt(status));
measureUnit.adoptInstead(MeasureUnit::createHectopascal(status));
measureUnit.adoptInstead(MeasureUnit::createInchHg(status));
measureUnit.adoptInstead(MeasureUnit::createMillibar(status));
measureUnit.adoptInstead(MeasureUnit::createMillimeterOfMercury(status));
measureUnit.adoptInstead(MeasureUnit::createPoundPerSquareInch(status));
measureUnit.adoptInstead(MeasureUnit::createKilometerPerHour(status));
measureUnit.adoptInstead(MeasureUnit::createKnot(status));
measureUnit.adoptInstead(MeasureUnit::createMeterPerSecond(status));
measureUnit.adoptInstead(MeasureUnit::createMilePerHour(status));
measureUnit.adoptInstead(MeasureUnit::createCelsius(status));
measureUnit.adoptInstead(MeasureUnit::createFahrenheit(status));
measureUnit.adoptInstead(MeasureUnit::createGenericTemperature(status));
measureUnit.adoptInstead(MeasureUnit::createKelvin(status));
measureUnit.adoptInstead(MeasureUnit::createAcreFoot(status));
measureUnit.adoptInstead(MeasureUnit::createBushel(status));
measureUnit.adoptInstead(MeasureUnit::createCentiliter(status));
measureUnit.adoptInstead(MeasureUnit::createCubicCentimeter(status));
measureUnit.adoptInstead(MeasureUnit::createCubicFoot(status));
measureUnit.adoptInstead(MeasureUnit::createCubicInch(status));
measureUnit.adoptInstead(MeasureUnit::createCubicKilometer(status));
measureUnit.adoptInstead(MeasureUnit::createCubicMeter(status));
measureUnit.adoptInstead(MeasureUnit::createCubicMile(status));
measureUnit.adoptInstead(MeasureUnit::createCubicYard(status));
measureUnit.adoptInstead(MeasureUnit::createCup(status));
measureUnit.adoptInstead(MeasureUnit::createCupMetric(status));
measureUnit.adoptInstead(MeasureUnit::createDeciliter(status));
measureUnit.adoptInstead(MeasureUnit::createFluidOunce(status));
measureUnit.adoptInstead(MeasureUnit::createGallon(status));
measureUnit.adoptInstead(MeasureUnit::createGallonImperial(status));
measureUnit.adoptInstead(MeasureUnit::createHectoliter(status));
measureUnit.adoptInstead(MeasureUnit::createLiter(status));
measureUnit.adoptInstead(MeasureUnit::createMegaliter(status));
measureUnit.adoptInstead(MeasureUnit::createMilliliter(status));
measureUnit.adoptInstead(MeasureUnit::createPint(status));
measureUnit.adoptInstead(MeasureUnit::createPintMetric(status));
measureUnit.adoptInstead(MeasureUnit::createQuart(status));
measureUnit.adoptInstead(MeasureUnit::createTablespoon(status));
measureUnit.adoptInstead(MeasureUnit::createTeaspoon(status));
assertSuccess("", status);
}
// Note that TestCompatible60(), TestCompatible61(), TestCompatible62()
// would be the same as TestCompatible59(), no need to add them.
void MeasureFormatTest::TestCompatible63() {
UErrorCode status = U_ZERO_ERROR;
LocalPointer<MeasureUnit> measureUnit;
measureUnit.adoptInstead(MeasureUnit::createGForce(status));
measureUnit.adoptInstead(MeasureUnit::createMeterPerSecondSquared(status));
measureUnit.adoptInstead(MeasureUnit::createArcMinute(status));
measureUnit.adoptInstead(MeasureUnit::createArcSecond(status));
measureUnit.adoptInstead(MeasureUnit::createDegree(status));
measureUnit.adoptInstead(MeasureUnit::createRadian(status));
measureUnit.adoptInstead(MeasureUnit::createRevolutionAngle(status));
measureUnit.adoptInstead(MeasureUnit::createAcre(status));
measureUnit.adoptInstead(MeasureUnit::createHectare(status));
measureUnit.adoptInstead(MeasureUnit::createSquareCentimeter(status));
measureUnit.adoptInstead(MeasureUnit::createSquareFoot(status));
measureUnit.adoptInstead(MeasureUnit::createSquareInch(status));
measureUnit.adoptInstead(MeasureUnit::createSquareKilometer(status));
measureUnit.adoptInstead(MeasureUnit::createSquareMeter(status));
measureUnit.adoptInstead(MeasureUnit::createSquareMile(status));
measureUnit.adoptInstead(MeasureUnit::createSquareYard(status));
measureUnit.adoptInstead(MeasureUnit::createKarat(status));
measureUnit.adoptInstead(MeasureUnit::createMilligramPerDeciliter(status));
measureUnit.adoptInstead(MeasureUnit::createMillimolePerLiter(status));
measureUnit.adoptInstead(MeasureUnit::createPartPerMillion(status));
measureUnit.adoptInstead(MeasureUnit::createPercent(status));
measureUnit.adoptInstead(MeasureUnit::createPermille(status));
measureUnit.adoptInstead(MeasureUnit::createLiterPer100Kilometers(status));
measureUnit.adoptInstead(MeasureUnit::createLiterPerKilometer(status));
measureUnit.adoptInstead(MeasureUnit::createMilePerGallon(status));
measureUnit.adoptInstead(MeasureUnit::createMilePerGallonImperial(status));
measureUnit.adoptInstead(MeasureUnit::createBit(status));
measureUnit.adoptInstead(MeasureUnit::createByte(status));
measureUnit.adoptInstead(MeasureUnit::createGigabit(status));
measureUnit.adoptInstead(MeasureUnit::createGigabyte(status));
measureUnit.adoptInstead(MeasureUnit::createKilobit(status));
measureUnit.adoptInstead(MeasureUnit::createKilobyte(status));
measureUnit.adoptInstead(MeasureUnit::createMegabit(status));
measureUnit.adoptInstead(MeasureUnit::createMegabyte(status));
measureUnit.adoptInstead(MeasureUnit::createPetabyte(status));
measureUnit.adoptInstead(MeasureUnit::createTerabit(status));
measureUnit.adoptInstead(MeasureUnit::createTerabyte(status));
measureUnit.adoptInstead(MeasureUnit::createCentury(status));
measureUnit.adoptInstead(MeasureUnit::createDay(status));
measureUnit.adoptInstead(MeasureUnit::createHour(status));
measureUnit.adoptInstead(MeasureUnit::createMicrosecond(status));
measureUnit.adoptInstead(MeasureUnit::createMillisecond(status));
measureUnit.adoptInstead(MeasureUnit::createMinute(status));
measureUnit.adoptInstead(MeasureUnit::createMonth(status));
measureUnit.adoptInstead(MeasureUnit::createNanosecond(status));
measureUnit.adoptInstead(MeasureUnit::createSecond(status));
measureUnit.adoptInstead(MeasureUnit::createWeek(status));
measureUnit.adoptInstead(MeasureUnit::createYear(status));
measureUnit.adoptInstead(MeasureUnit::createAmpere(status));
measureUnit.adoptInstead(MeasureUnit::createMilliampere(status));
measureUnit.adoptInstead(MeasureUnit::createOhm(status));
measureUnit.adoptInstead(MeasureUnit::createVolt(status));
measureUnit.adoptInstead(MeasureUnit::createCalorie(status));
measureUnit.adoptInstead(MeasureUnit::createFoodcalorie(status));
measureUnit.adoptInstead(MeasureUnit::createJoule(status));
measureUnit.adoptInstead(MeasureUnit::createKilocalorie(status));
measureUnit.adoptInstead(MeasureUnit::createKilojoule(status));
measureUnit.adoptInstead(MeasureUnit::createKilowattHour(status));
measureUnit.adoptInstead(MeasureUnit::createGigahertz(status));
measureUnit.adoptInstead(MeasureUnit::createHertz(status));
measureUnit.adoptInstead(MeasureUnit::createKilohertz(status));
measureUnit.adoptInstead(MeasureUnit::createMegahertz(status));
measureUnit.adoptInstead(MeasureUnit::createAstronomicalUnit(status));
measureUnit.adoptInstead(MeasureUnit::createCentimeter(status));
measureUnit.adoptInstead(MeasureUnit::createDecimeter(status));
measureUnit.adoptInstead(MeasureUnit::createFathom(status));
measureUnit.adoptInstead(MeasureUnit::createFoot(status));
measureUnit.adoptInstead(MeasureUnit::createFurlong(status));
measureUnit.adoptInstead(MeasureUnit::createInch(status));
measureUnit.adoptInstead(MeasureUnit::createKilometer(status));
measureUnit.adoptInstead(MeasureUnit::createLightYear(status));
measureUnit.adoptInstead(MeasureUnit::createMeter(status));
measureUnit.adoptInstead(MeasureUnit::createMicrometer(status));
measureUnit.adoptInstead(MeasureUnit::createMile(status));
measureUnit.adoptInstead(MeasureUnit::createMileScandinavian(status));
measureUnit.adoptInstead(MeasureUnit::createMillimeter(status));
measureUnit.adoptInstead(MeasureUnit::createNanometer(status));
measureUnit.adoptInstead(MeasureUnit::createNauticalMile(status));
measureUnit.adoptInstead(MeasureUnit::createParsec(status));
measureUnit.adoptInstead(MeasureUnit::createPicometer(status));
measureUnit.adoptInstead(MeasureUnit::createPoint(status));
measureUnit.adoptInstead(MeasureUnit::createYard(status));
measureUnit.adoptInstead(MeasureUnit::createLux(status));
measureUnit.adoptInstead(MeasureUnit::createCarat(status));
measureUnit.adoptInstead(MeasureUnit::createGram(status));
measureUnit.adoptInstead(MeasureUnit::createKilogram(status));
measureUnit.adoptInstead(MeasureUnit::createMetricTon(status));
measureUnit.adoptInstead(MeasureUnit::createMicrogram(status));
measureUnit.adoptInstead(MeasureUnit::createMilligram(status));
measureUnit.adoptInstead(MeasureUnit::createOunce(status));
measureUnit.adoptInstead(MeasureUnit::createOunceTroy(status));
measureUnit.adoptInstead(MeasureUnit::createPound(status));
measureUnit.adoptInstead(MeasureUnit::createStone(status));
measureUnit.adoptInstead(MeasureUnit::createTon(status));
measureUnit.adoptInstead(MeasureUnit::createGigawatt(status));
measureUnit.adoptInstead(MeasureUnit::createHorsepower(status));
measureUnit.adoptInstead(MeasureUnit::createKilowatt(status));
measureUnit.adoptInstead(MeasureUnit::createMegawatt(status));
measureUnit.adoptInstead(MeasureUnit::createMilliwatt(status));
measureUnit.adoptInstead(MeasureUnit::createWatt(status));
measureUnit.adoptInstead(MeasureUnit::createAtmosphere(status));
measureUnit.adoptInstead(MeasureUnit::createHectopascal(status));
measureUnit.adoptInstead(MeasureUnit::createInchHg(status));
measureUnit.adoptInstead(MeasureUnit::createMillibar(status));
measureUnit.adoptInstead(MeasureUnit::createMillimeterOfMercury(status));
measureUnit.adoptInstead(MeasureUnit::createPoundPerSquareInch(status));
measureUnit.adoptInstead(MeasureUnit::createKilometerPerHour(status));
measureUnit.adoptInstead(MeasureUnit::createKnot(status));
measureUnit.adoptInstead(MeasureUnit::createMeterPerSecond(status));
measureUnit.adoptInstead(MeasureUnit::createMilePerHour(status));
measureUnit.adoptInstead(MeasureUnit::createCelsius(status));
measureUnit.adoptInstead(MeasureUnit::createFahrenheit(status));
measureUnit.adoptInstead(MeasureUnit::createGenericTemperature(status));
measureUnit.adoptInstead(MeasureUnit::createKelvin(status));
measureUnit.adoptInstead(MeasureUnit::createAcreFoot(status));
measureUnit.adoptInstead(MeasureUnit::createBushel(status));
measureUnit.adoptInstead(MeasureUnit::createCentiliter(status));
measureUnit.adoptInstead(MeasureUnit::createCubicCentimeter(status));
measureUnit.adoptInstead(MeasureUnit::createCubicFoot(status));
measureUnit.adoptInstead(MeasureUnit::createCubicInch(status));
measureUnit.adoptInstead(MeasureUnit::createCubicKilometer(status));
measureUnit.adoptInstead(MeasureUnit::createCubicMeter(status));
measureUnit.adoptInstead(MeasureUnit::createCubicMile(status));
measureUnit.adoptInstead(MeasureUnit::createCubicYard(status));
measureUnit.adoptInstead(MeasureUnit::createCup(status));
measureUnit.adoptInstead(MeasureUnit::createCupMetric(status));
measureUnit.adoptInstead(MeasureUnit::createDeciliter(status));
measureUnit.adoptInstead(MeasureUnit::createFluidOunce(status));
measureUnit.adoptInstead(MeasureUnit::createGallon(status));
measureUnit.adoptInstead(MeasureUnit::createGallonImperial(status));
measureUnit.adoptInstead(MeasureUnit::createHectoliter(status));
measureUnit.adoptInstead(MeasureUnit::createLiter(status));
measureUnit.adoptInstead(MeasureUnit::createMegaliter(status));
measureUnit.adoptInstead(MeasureUnit::createMilliliter(status));
measureUnit.adoptInstead(MeasureUnit::createPint(status));
measureUnit.adoptInstead(MeasureUnit::createPintMetric(status));
measureUnit.adoptInstead(MeasureUnit::createQuart(status));
measureUnit.adoptInstead(MeasureUnit::createTablespoon(status));
measureUnit.adoptInstead(MeasureUnit::createTeaspoon(status));
assertSuccess("", status);
}
void MeasureFormatTest::TestCompatible64() {
UErrorCode status = U_ZERO_ERROR;
LocalPointer<MeasureUnit> measureUnit;
MeasureUnit measureUnitValue;
measureUnit.adoptInstead(MeasureUnit::createGForce(status));
measureUnitValue = MeasureUnit::getGForce();
measureUnit.adoptInstead(MeasureUnit::createMeterPerSecondSquared(status));
measureUnitValue = MeasureUnit::getMeterPerSecondSquared();
measureUnit.adoptInstead(MeasureUnit::createArcMinute(status));
measureUnitValue = MeasureUnit::getArcMinute();
measureUnit.adoptInstead(MeasureUnit::createArcSecond(status));
measureUnitValue = MeasureUnit::getArcSecond();
measureUnit.adoptInstead(MeasureUnit::createDegree(status));
measureUnitValue = MeasureUnit::getDegree();
measureUnit.adoptInstead(MeasureUnit::createRadian(status));
measureUnitValue = MeasureUnit::getRadian();
measureUnit.adoptInstead(MeasureUnit::createRevolutionAngle(status));
measureUnitValue = MeasureUnit::getRevolutionAngle();
measureUnit.adoptInstead(MeasureUnit::createAcre(status));
measureUnitValue = MeasureUnit::getAcre();
measureUnit.adoptInstead(MeasureUnit::createDunam(status));
measureUnitValue = MeasureUnit::getDunam();
measureUnit.adoptInstead(MeasureUnit::createHectare(status));
measureUnitValue = MeasureUnit::getHectare();
measureUnit.adoptInstead(MeasureUnit::createSquareCentimeter(status));
measureUnitValue = MeasureUnit::getSquareCentimeter();
measureUnit.adoptInstead(MeasureUnit::createSquareFoot(status));
measureUnitValue = MeasureUnit::getSquareFoot();
measureUnit.adoptInstead(MeasureUnit::createSquareInch(status));
measureUnitValue = MeasureUnit::getSquareInch();
measureUnit.adoptInstead(MeasureUnit::createSquareKilometer(status));
measureUnitValue = MeasureUnit::getSquareKilometer();
measureUnit.adoptInstead(MeasureUnit::createSquareMeter(status));
measureUnitValue = MeasureUnit::getSquareMeter();
measureUnit.adoptInstead(MeasureUnit::createSquareMile(status));
measureUnitValue = MeasureUnit::getSquareMile();
measureUnit.adoptInstead(MeasureUnit::createSquareYard(status));
measureUnitValue = MeasureUnit::getSquareYard();
measureUnit.adoptInstead(MeasureUnit::createKarat(status));
measureUnitValue = MeasureUnit::getKarat();
measureUnit.adoptInstead(MeasureUnit::createMilligramPerDeciliter(status));
measureUnitValue = MeasureUnit::getMilligramPerDeciliter();
measureUnit.adoptInstead(MeasureUnit::createMillimolePerLiter(status));
measureUnitValue = MeasureUnit::getMillimolePerLiter();
measureUnit.adoptInstead(MeasureUnit::createMole(status));
measureUnitValue = MeasureUnit::getMole();
measureUnit.adoptInstead(MeasureUnit::createPartPerMillion(status));
measureUnitValue = MeasureUnit::getPartPerMillion();
measureUnit.adoptInstead(MeasureUnit::createPercent(status));
measureUnitValue = MeasureUnit::getPercent();
measureUnit.adoptInstead(MeasureUnit::createPermille(status));
measureUnitValue = MeasureUnit::getPermille();
measureUnit.adoptInstead(MeasureUnit::createPermyriad(status));
measureUnitValue = MeasureUnit::getPermyriad();
measureUnit.adoptInstead(MeasureUnit::createLiterPer100Kilometers(status));
measureUnitValue = MeasureUnit::getLiterPer100Kilometers();
measureUnit.adoptInstead(MeasureUnit::createLiterPerKilometer(status));
measureUnitValue = MeasureUnit::getLiterPerKilometer();
measureUnit.adoptInstead(MeasureUnit::createMilePerGallon(status));
measureUnitValue = MeasureUnit::getMilePerGallon();
measureUnit.adoptInstead(MeasureUnit::createMilePerGallonImperial(status));
measureUnitValue = MeasureUnit::getMilePerGallonImperial();
measureUnit.adoptInstead(MeasureUnit::createBit(status));
measureUnitValue = MeasureUnit::getBit();
measureUnit.adoptInstead(MeasureUnit::createByte(status));
measureUnitValue = MeasureUnit::getByte();
measureUnit.adoptInstead(MeasureUnit::createGigabit(status));
measureUnitValue = MeasureUnit::getGigabit();
measureUnit.adoptInstead(MeasureUnit::createGigabyte(status));
measureUnitValue = MeasureUnit::getGigabyte();
measureUnit.adoptInstead(MeasureUnit::createKilobit(status));
measureUnitValue = MeasureUnit::getKilobit();
measureUnit.adoptInstead(MeasureUnit::createKilobyte(status));
measureUnitValue = MeasureUnit::getKilobyte();
measureUnit.adoptInstead(MeasureUnit::createMegabit(status));
measureUnitValue = MeasureUnit::getMegabit();
measureUnit.adoptInstead(MeasureUnit::createMegabyte(status));
measureUnitValue = MeasureUnit::getMegabyte();
measureUnit.adoptInstead(MeasureUnit::createPetabyte(status));
measureUnitValue = MeasureUnit::getPetabyte();
measureUnit.adoptInstead(MeasureUnit::createTerabit(status));
measureUnitValue = MeasureUnit::getTerabit();
measureUnit.adoptInstead(MeasureUnit::createTerabyte(status));
measureUnitValue = MeasureUnit::getTerabyte();
measureUnit.adoptInstead(MeasureUnit::createCentury(status));
measureUnitValue = MeasureUnit::getCentury();
measureUnit.adoptInstead(MeasureUnit::createDay(status));
measureUnitValue = MeasureUnit::getDay();
measureUnit.adoptInstead(MeasureUnit::createDayPerson(status));
measureUnitValue = MeasureUnit::getDayPerson();
measureUnit.adoptInstead(MeasureUnit::createHour(status));
measureUnitValue = MeasureUnit::getHour();
measureUnit.adoptInstead(MeasureUnit::createMicrosecond(status));
measureUnitValue = MeasureUnit::getMicrosecond();
measureUnit.adoptInstead(MeasureUnit::createMillisecond(status));
measureUnitValue = MeasureUnit::getMillisecond();
measureUnit.adoptInstead(MeasureUnit::createMinute(status));
measureUnitValue = MeasureUnit::getMinute();
measureUnit.adoptInstead(MeasureUnit::createMonth(status));
measureUnitValue = MeasureUnit::getMonth();
measureUnit.adoptInstead(MeasureUnit::createMonthPerson(status));
measureUnitValue = MeasureUnit::getMonthPerson();
measureUnit.adoptInstead(MeasureUnit::createNanosecond(status));
measureUnitValue = MeasureUnit::getNanosecond();
measureUnit.adoptInstead(MeasureUnit::createSecond(status));
measureUnitValue = MeasureUnit::getSecond();
measureUnit.adoptInstead(MeasureUnit::createWeek(status));
measureUnitValue = MeasureUnit::getWeek();
measureUnit.adoptInstead(MeasureUnit::createWeekPerson(status));
measureUnitValue = MeasureUnit::getWeekPerson();
measureUnit.adoptInstead(MeasureUnit::createYear(status));
measureUnitValue = MeasureUnit::getYear();
measureUnit.adoptInstead(MeasureUnit::createYearPerson(status));
measureUnitValue = MeasureUnit::getYearPerson();
measureUnit.adoptInstead(MeasureUnit::createAmpere(status));
measureUnitValue = MeasureUnit::getAmpere();
measureUnit.adoptInstead(MeasureUnit::createMilliampere(status));
measureUnitValue = MeasureUnit::getMilliampere();
measureUnit.adoptInstead(MeasureUnit::createOhm(status));
measureUnitValue = MeasureUnit::getOhm();
measureUnit.adoptInstead(MeasureUnit::createVolt(status));
measureUnitValue = MeasureUnit::getVolt();
measureUnit.adoptInstead(MeasureUnit::createBritishThermalUnit(status));
measureUnitValue = MeasureUnit::getBritishThermalUnit();
measureUnit.adoptInstead(MeasureUnit::createCalorie(status));
measureUnitValue = MeasureUnit::getCalorie();
measureUnit.adoptInstead(MeasureUnit::createElectronvolt(status));
measureUnitValue = MeasureUnit::getElectronvolt();
measureUnit.adoptInstead(MeasureUnit::createFoodcalorie(status));
measureUnitValue = MeasureUnit::getFoodcalorie();
measureUnit.adoptInstead(MeasureUnit::createJoule(status));
measureUnitValue = MeasureUnit::getJoule();
measureUnit.adoptInstead(MeasureUnit::createKilocalorie(status));
measureUnitValue = MeasureUnit::getKilocalorie();
measureUnit.adoptInstead(MeasureUnit::createKilojoule(status));
measureUnitValue = MeasureUnit::getKilojoule();
measureUnit.adoptInstead(MeasureUnit::createKilowattHour(status));
measureUnitValue = MeasureUnit::getKilowattHour();
measureUnit.adoptInstead(MeasureUnit::createNewton(status));
measureUnitValue = MeasureUnit::getNewton();
measureUnit.adoptInstead(MeasureUnit::createPoundForce(status));
measureUnitValue = MeasureUnit::getPoundForce();
measureUnit.adoptInstead(MeasureUnit::createGigahertz(status));
measureUnitValue = MeasureUnit::getGigahertz();
measureUnit.adoptInstead(MeasureUnit::createHertz(status));
measureUnitValue = MeasureUnit::getHertz();
measureUnit.adoptInstead(MeasureUnit::createKilohertz(status));
measureUnitValue = MeasureUnit::getKilohertz();
measureUnit.adoptInstead(MeasureUnit::createMegahertz(status));
measureUnitValue = MeasureUnit::getMegahertz();
measureUnit.adoptInstead(MeasureUnit::createAstronomicalUnit(status));
measureUnitValue = MeasureUnit::getAstronomicalUnit();
measureUnit.adoptInstead(MeasureUnit::createCentimeter(status));
measureUnitValue = MeasureUnit::getCentimeter();
measureUnit.adoptInstead(MeasureUnit::createDecimeter(status));
measureUnitValue = MeasureUnit::getDecimeter();
measureUnit.adoptInstead(MeasureUnit::createFathom(status));
measureUnitValue = MeasureUnit::getFathom();
measureUnit.adoptInstead(MeasureUnit::createFoot(status));
measureUnitValue = MeasureUnit::getFoot();
measureUnit.adoptInstead(MeasureUnit::createFurlong(status));
measureUnitValue = MeasureUnit::getFurlong();
measureUnit.adoptInstead(MeasureUnit::createInch(status));
measureUnitValue = MeasureUnit::getInch();
measureUnit.adoptInstead(MeasureUnit::createKilometer(status));
measureUnitValue = MeasureUnit::getKilometer();
measureUnit.adoptInstead(MeasureUnit::createLightYear(status));
measureUnitValue = MeasureUnit::getLightYear();
measureUnit.adoptInstead(MeasureUnit::createMeter(status));
measureUnitValue = MeasureUnit::getMeter();
measureUnit.adoptInstead(MeasureUnit::createMicrometer(status));
measureUnitValue = MeasureUnit::getMicrometer();
measureUnit.adoptInstead(MeasureUnit::createMile(status));
measureUnitValue = MeasureUnit::getMile();
measureUnit.adoptInstead(MeasureUnit::createMileScandinavian(status));
measureUnitValue = MeasureUnit::getMileScandinavian();
measureUnit.adoptInstead(MeasureUnit::createMillimeter(status));
measureUnitValue = MeasureUnit::getMillimeter();
measureUnit.adoptInstead(MeasureUnit::createNanometer(status));
measureUnitValue = MeasureUnit::getNanometer();
measureUnit.adoptInstead(MeasureUnit::createNauticalMile(status));
measureUnitValue = MeasureUnit::getNauticalMile();
measureUnit.adoptInstead(MeasureUnit::createParsec(status));
measureUnitValue = MeasureUnit::getParsec();
measureUnit.adoptInstead(MeasureUnit::createPicometer(status));
measureUnitValue = MeasureUnit::getPicometer();
measureUnit.adoptInstead(MeasureUnit::createPoint(status));
measureUnitValue = MeasureUnit::getPoint();
measureUnit.adoptInstead(MeasureUnit::createSolarRadius(status));
measureUnitValue = MeasureUnit::getSolarRadius();
measureUnit.adoptInstead(MeasureUnit::createYard(status));
measureUnitValue = MeasureUnit::getYard();
measureUnit.adoptInstead(MeasureUnit::createLux(status));
measureUnitValue = MeasureUnit::getLux();
measureUnit.adoptInstead(MeasureUnit::createSolarLuminosity(status));
measureUnitValue = MeasureUnit::getSolarLuminosity();
measureUnit.adoptInstead(MeasureUnit::createCarat(status));
measureUnitValue = MeasureUnit::getCarat();
measureUnit.adoptInstead(MeasureUnit::createDalton(status));
measureUnitValue = MeasureUnit::getDalton();
measureUnit.adoptInstead(MeasureUnit::createEarthMass(status));
measureUnitValue = MeasureUnit::getEarthMass();
measureUnit.adoptInstead(MeasureUnit::createGram(status));
measureUnitValue = MeasureUnit::getGram();
measureUnit.adoptInstead(MeasureUnit::createKilogram(status));
measureUnitValue = MeasureUnit::getKilogram();
measureUnit.adoptInstead(MeasureUnit::createMetricTon(status));
measureUnitValue = MeasureUnit::getMetricTon();
measureUnit.adoptInstead(MeasureUnit::createMicrogram(status));
measureUnitValue = MeasureUnit::getMicrogram();
measureUnit.adoptInstead(MeasureUnit::createMilligram(status));
measureUnitValue = MeasureUnit::getMilligram();
measureUnit.adoptInstead(MeasureUnit::createOunce(status));
measureUnitValue = MeasureUnit::getOunce();
measureUnit.adoptInstead(MeasureUnit::createOunceTroy(status));
measureUnitValue = MeasureUnit::getOunceTroy();
measureUnit.adoptInstead(MeasureUnit::createPound(status));
measureUnitValue = MeasureUnit::getPound();
measureUnit.adoptInstead(MeasureUnit::createSolarMass(status));
measureUnitValue = MeasureUnit::getSolarMass();
measureUnit.adoptInstead(MeasureUnit::createStone(status));
measureUnitValue = MeasureUnit::getStone();
measureUnit.adoptInstead(MeasureUnit::createTon(status));
measureUnitValue = MeasureUnit::getTon();
measureUnit.adoptInstead(MeasureUnit::createGigawatt(status));
measureUnitValue = MeasureUnit::getGigawatt();
measureUnit.adoptInstead(MeasureUnit::createHorsepower(status));
measureUnitValue = MeasureUnit::getHorsepower();
measureUnit.adoptInstead(MeasureUnit::createKilowatt(status));
measureUnitValue = MeasureUnit::getKilowatt();
measureUnit.adoptInstead(MeasureUnit::createMegawatt(status));
measureUnitValue = MeasureUnit::getMegawatt();
measureUnit.adoptInstead(MeasureUnit::createMilliwatt(status));
measureUnitValue = MeasureUnit::getMilliwatt();
measureUnit.adoptInstead(MeasureUnit::createWatt(status));
measureUnitValue = MeasureUnit::getWatt();
measureUnit.adoptInstead(MeasureUnit::createAtmosphere(status));
measureUnitValue = MeasureUnit::getAtmosphere();
measureUnit.adoptInstead(MeasureUnit::createHectopascal(status));
measureUnitValue = MeasureUnit::getHectopascal();
measureUnit.adoptInstead(MeasureUnit::createInchHg(status));
measureUnitValue = MeasureUnit::getInchHg();
measureUnit.adoptInstead(MeasureUnit::createKilopascal(status));
measureUnitValue = MeasureUnit::getKilopascal();
measureUnit.adoptInstead(MeasureUnit::createMegapascal(status));
measureUnitValue = MeasureUnit::getMegapascal();
measureUnit.adoptInstead(MeasureUnit::createMillibar(status));
measureUnitValue = MeasureUnit::getMillibar();
measureUnit.adoptInstead(MeasureUnit::createMillimeterOfMercury(status));
measureUnitValue = MeasureUnit::getMillimeterOfMercury();
measureUnit.adoptInstead(MeasureUnit::createPoundPerSquareInch(status));
measureUnitValue = MeasureUnit::getPoundPerSquareInch();
measureUnit.adoptInstead(MeasureUnit::createKilometerPerHour(status));
measureUnitValue = MeasureUnit::getKilometerPerHour();
measureUnit.adoptInstead(MeasureUnit::createKnot(status));
measureUnitValue = MeasureUnit::getKnot();
measureUnit.adoptInstead(MeasureUnit::createMeterPerSecond(status));
measureUnitValue = MeasureUnit::getMeterPerSecond();
measureUnit.adoptInstead(MeasureUnit::createMilePerHour(status));
measureUnitValue = MeasureUnit::getMilePerHour();
measureUnit.adoptInstead(MeasureUnit::createCelsius(status));
measureUnitValue = MeasureUnit::getCelsius();
measureUnit.adoptInstead(MeasureUnit::createFahrenheit(status));
measureUnitValue = MeasureUnit::getFahrenheit();
measureUnit.adoptInstead(MeasureUnit::createGenericTemperature(status));
measureUnitValue = MeasureUnit::getGenericTemperature();
measureUnit.adoptInstead(MeasureUnit::createKelvin(status));
measureUnitValue = MeasureUnit::getKelvin();
measureUnit.adoptInstead(MeasureUnit::createNewtonMeter(status));
measureUnitValue = MeasureUnit::getNewtonMeter();
measureUnit.adoptInstead(MeasureUnit::createPoundFoot(status));
measureUnitValue = MeasureUnit::getPoundFoot();
measureUnit.adoptInstead(MeasureUnit::createAcreFoot(status));
measureUnitValue = MeasureUnit::getAcreFoot();
measureUnit.adoptInstead(MeasureUnit::createBarrel(status));
measureUnitValue = MeasureUnit::getBarrel();
measureUnit.adoptInstead(MeasureUnit::createBushel(status));
measureUnitValue = MeasureUnit::getBushel();
measureUnit.adoptInstead(MeasureUnit::createCentiliter(status));
measureUnitValue = MeasureUnit::getCentiliter();
measureUnit.adoptInstead(MeasureUnit::createCubicCentimeter(status));
measureUnitValue = MeasureUnit::getCubicCentimeter();
measureUnit.adoptInstead(MeasureUnit::createCubicFoot(status));
measureUnitValue = MeasureUnit::getCubicFoot();
measureUnit.adoptInstead(MeasureUnit::createCubicInch(status));
measureUnitValue = MeasureUnit::getCubicInch();
measureUnit.adoptInstead(MeasureUnit::createCubicKilometer(status));
measureUnitValue = MeasureUnit::getCubicKilometer();
measureUnit.adoptInstead(MeasureUnit::createCubicMeter(status));
measureUnitValue = MeasureUnit::getCubicMeter();
measureUnit.adoptInstead(MeasureUnit::createCubicMile(status));
measureUnitValue = MeasureUnit::getCubicMile();
measureUnit.adoptInstead(MeasureUnit::createCubicYard(status));
measureUnitValue = MeasureUnit::getCubicYard();
measureUnit.adoptInstead(MeasureUnit::createCup(status));
measureUnitValue = MeasureUnit::getCup();
measureUnit.adoptInstead(MeasureUnit::createCupMetric(status));
measureUnitValue = MeasureUnit::getCupMetric();
measureUnit.adoptInstead(MeasureUnit::createDeciliter(status));
measureUnitValue = MeasureUnit::getDeciliter();
measureUnit.adoptInstead(MeasureUnit::createFluidOunce(status));
measureUnitValue = MeasureUnit::getFluidOunce();
measureUnit.adoptInstead(MeasureUnit::createFluidOunceImperial(status));
measureUnitValue = MeasureUnit::getFluidOunceImperial();
measureUnit.adoptInstead(MeasureUnit::createGallon(status));
measureUnitValue = MeasureUnit::getGallon();
measureUnit.adoptInstead(MeasureUnit::createGallonImperial(status));
measureUnitValue = MeasureUnit::getGallonImperial();
measureUnit.adoptInstead(MeasureUnit::createHectoliter(status));
measureUnitValue = MeasureUnit::getHectoliter();
measureUnit.adoptInstead(MeasureUnit::createLiter(status));
measureUnitValue = MeasureUnit::getLiter();
measureUnit.adoptInstead(MeasureUnit::createMegaliter(status));
measureUnitValue = MeasureUnit::getMegaliter();
measureUnit.adoptInstead(MeasureUnit::createMilliliter(status));
measureUnitValue = MeasureUnit::getMilliliter();
measureUnit.adoptInstead(MeasureUnit::createPint(status));
measureUnitValue = MeasureUnit::getPint();
measureUnit.adoptInstead(MeasureUnit::createPintMetric(status));
measureUnitValue = MeasureUnit::getPintMetric();
measureUnit.adoptInstead(MeasureUnit::createQuart(status));
measureUnitValue = MeasureUnit::getQuart();
measureUnit.adoptInstead(MeasureUnit::createTablespoon(status));
measureUnitValue = MeasureUnit::getTablespoon();
measureUnit.adoptInstead(MeasureUnit::createTeaspoon(status));
measureUnitValue = MeasureUnit::getTeaspoon();
assertSuccess("", status);
}
void MeasureFormatTest::TestCompatible65() {
UErrorCode status = U_ZERO_ERROR;
LocalPointer<MeasureUnit> measureUnit;
MeasureUnit measureUnitValue;
measureUnit.adoptInstead(MeasureUnit::createGForce(status));
measureUnitValue = MeasureUnit::getGForce();
measureUnit.adoptInstead(MeasureUnit::createMeterPerSecondSquared(status));
measureUnitValue = MeasureUnit::getMeterPerSecondSquared();
measureUnit.adoptInstead(MeasureUnit::createArcMinute(status));
measureUnitValue = MeasureUnit::getArcMinute();
measureUnit.adoptInstead(MeasureUnit::createArcSecond(status));
measureUnitValue = MeasureUnit::getArcSecond();
measureUnit.adoptInstead(MeasureUnit::createDegree(status));
measureUnitValue = MeasureUnit::getDegree();
measureUnit.adoptInstead(MeasureUnit::createRadian(status));
measureUnitValue = MeasureUnit::getRadian();
measureUnit.adoptInstead(MeasureUnit::createRevolutionAngle(status));
measureUnitValue = MeasureUnit::getRevolutionAngle();
measureUnit.adoptInstead(MeasureUnit::createAcre(status));
measureUnitValue = MeasureUnit::getAcre();
measureUnit.adoptInstead(MeasureUnit::createDunam(status));
measureUnitValue = MeasureUnit::getDunam();
measureUnit.adoptInstead(MeasureUnit::createHectare(status));
measureUnitValue = MeasureUnit::getHectare();
measureUnit.adoptInstead(MeasureUnit::createSquareCentimeter(status));
measureUnitValue = MeasureUnit::getSquareCentimeter();
measureUnit.adoptInstead(MeasureUnit::createSquareFoot(status));
measureUnitValue = MeasureUnit::getSquareFoot();
measureUnit.adoptInstead(MeasureUnit::createSquareInch(status));
measureUnitValue = MeasureUnit::getSquareInch();
measureUnit.adoptInstead(MeasureUnit::createSquareKilometer(status));
measureUnitValue = MeasureUnit::getSquareKilometer();
measureUnit.adoptInstead(MeasureUnit::createSquareMeter(status));
measureUnitValue = MeasureUnit::getSquareMeter();
measureUnit.adoptInstead(MeasureUnit::createSquareMile(status));
measureUnitValue = MeasureUnit::getSquareMile();
measureUnit.adoptInstead(MeasureUnit::createSquareYard(status));
measureUnitValue = MeasureUnit::getSquareYard();
measureUnit.adoptInstead(MeasureUnit::createKarat(status));
measureUnitValue = MeasureUnit::getKarat();
measureUnit.adoptInstead(MeasureUnit::createMilligramPerDeciliter(status));
measureUnitValue = MeasureUnit::getMilligramPerDeciliter();
measureUnit.adoptInstead(MeasureUnit::createMillimolePerLiter(status));
measureUnitValue = MeasureUnit::getMillimolePerLiter();
measureUnit.adoptInstead(MeasureUnit::createMole(status));
measureUnitValue = MeasureUnit::getMole();
measureUnit.adoptInstead(MeasureUnit::createPartPerMillion(status));
measureUnitValue = MeasureUnit::getPartPerMillion();
measureUnit.adoptInstead(MeasureUnit::createPercent(status));
measureUnitValue = MeasureUnit::getPercent();
measureUnit.adoptInstead(MeasureUnit::createPermille(status));
measureUnitValue = MeasureUnit::getPermille();
measureUnit.adoptInstead(MeasureUnit::createPermyriad(status));
measureUnitValue = MeasureUnit::getPermyriad();
measureUnit.adoptInstead(MeasureUnit::createLiterPer100Kilometers(status));
measureUnitValue = MeasureUnit::getLiterPer100Kilometers();
measureUnit.adoptInstead(MeasureUnit::createLiterPerKilometer(status));
measureUnitValue = MeasureUnit::getLiterPerKilometer();
measureUnit.adoptInstead(MeasureUnit::createMilePerGallon(status));
measureUnitValue = MeasureUnit::getMilePerGallon();
measureUnit.adoptInstead(MeasureUnit::createMilePerGallonImperial(status));
measureUnitValue = MeasureUnit::getMilePerGallonImperial();
measureUnit.adoptInstead(MeasureUnit::createBit(status));
measureUnitValue = MeasureUnit::getBit();
measureUnit.adoptInstead(MeasureUnit::createByte(status));
measureUnitValue = MeasureUnit::getByte();
measureUnit.adoptInstead(MeasureUnit::createGigabit(status));
measureUnitValue = MeasureUnit::getGigabit();
measureUnit.adoptInstead(MeasureUnit::createGigabyte(status));
measureUnitValue = MeasureUnit::getGigabyte();
measureUnit.adoptInstead(MeasureUnit::createKilobit(status));
measureUnitValue = MeasureUnit::getKilobit();
measureUnit.adoptInstead(MeasureUnit::createKilobyte(status));
measureUnitValue = MeasureUnit::getKilobyte();
measureUnit.adoptInstead(MeasureUnit::createMegabit(status));
measureUnitValue = MeasureUnit::getMegabit();
measureUnit.adoptInstead(MeasureUnit::createMegabyte(status));
measureUnitValue = MeasureUnit::getMegabyte();
measureUnit.adoptInstead(MeasureUnit::createPetabyte(status));
measureUnitValue = MeasureUnit::getPetabyte();
measureUnit.adoptInstead(MeasureUnit::createTerabit(status));
measureUnitValue = MeasureUnit::getTerabit();
measureUnit.adoptInstead(MeasureUnit::createTerabyte(status));
measureUnitValue = MeasureUnit::getTerabyte();
measureUnit.adoptInstead(MeasureUnit::createCentury(status));
measureUnitValue = MeasureUnit::getCentury();
measureUnit.adoptInstead(MeasureUnit::createDay(status));
measureUnitValue = MeasureUnit::getDay();
measureUnit.adoptInstead(MeasureUnit::createDayPerson(status));
measureUnitValue = MeasureUnit::getDayPerson();
measureUnit.adoptInstead(MeasureUnit::createDecade(status));
measureUnitValue = MeasureUnit::getDecade();
measureUnit.adoptInstead(MeasureUnit::createHour(status));
measureUnitValue = MeasureUnit::getHour();
measureUnit.adoptInstead(MeasureUnit::createMicrosecond(status));
measureUnitValue = MeasureUnit::getMicrosecond();
measureUnit.adoptInstead(MeasureUnit::createMillisecond(status));
measureUnitValue = MeasureUnit::getMillisecond();
measureUnit.adoptInstead(MeasureUnit::createMinute(status));
measureUnitValue = MeasureUnit::getMinute();
measureUnit.adoptInstead(MeasureUnit::createMonth(status));
measureUnitValue = MeasureUnit::getMonth();
measureUnit.adoptInstead(MeasureUnit::createMonthPerson(status));
measureUnitValue = MeasureUnit::getMonthPerson();
measureUnit.adoptInstead(MeasureUnit::createNanosecond(status));
measureUnitValue = MeasureUnit::getNanosecond();
measureUnit.adoptInstead(MeasureUnit::createSecond(status));
measureUnitValue = MeasureUnit::getSecond();
measureUnit.adoptInstead(MeasureUnit::createWeek(status));
measureUnitValue = MeasureUnit::getWeek();
measureUnit.adoptInstead(MeasureUnit::createWeekPerson(status));
measureUnitValue = MeasureUnit::getWeekPerson();
measureUnit.adoptInstead(MeasureUnit::createYear(status));
measureUnitValue = MeasureUnit::getYear();
measureUnit.adoptInstead(MeasureUnit::createYearPerson(status));
measureUnitValue = MeasureUnit::getYearPerson();
measureUnit.adoptInstead(MeasureUnit::createAmpere(status));
measureUnitValue = MeasureUnit::getAmpere();
measureUnit.adoptInstead(MeasureUnit::createMilliampere(status));
measureUnitValue = MeasureUnit::getMilliampere();
measureUnit.adoptInstead(MeasureUnit::createOhm(status));
measureUnitValue = MeasureUnit::getOhm();
measureUnit.adoptInstead(MeasureUnit::createVolt(status));
measureUnitValue = MeasureUnit::getVolt();
measureUnit.adoptInstead(MeasureUnit::createBritishThermalUnit(status));
measureUnitValue = MeasureUnit::getBritishThermalUnit();
measureUnit.adoptInstead(MeasureUnit::createCalorie(status));
measureUnitValue = MeasureUnit::getCalorie();
measureUnit.adoptInstead(MeasureUnit::createElectronvolt(status));
measureUnitValue = MeasureUnit::getElectronvolt();
measureUnit.adoptInstead(MeasureUnit::createFoodcalorie(status));
measureUnitValue = MeasureUnit::getFoodcalorie();
measureUnit.adoptInstead(MeasureUnit::createJoule(status));
measureUnitValue = MeasureUnit::getJoule();
measureUnit.adoptInstead(MeasureUnit::createKilocalorie(status));
measureUnitValue = MeasureUnit::getKilocalorie();
measureUnit.adoptInstead(MeasureUnit::createKilojoule(status));
measureUnitValue = MeasureUnit::getKilojoule();
measureUnit.adoptInstead(MeasureUnit::createKilowattHour(status));
measureUnitValue = MeasureUnit::getKilowattHour();
measureUnit.adoptInstead(MeasureUnit::createThermUs(status));
measureUnitValue = MeasureUnit::getThermUs();
measureUnit.adoptInstead(MeasureUnit::createNewton(status));
measureUnitValue = MeasureUnit::getNewton();
measureUnit.adoptInstead(MeasureUnit::createPoundForce(status));
measureUnitValue = MeasureUnit::getPoundForce();
measureUnit.adoptInstead(MeasureUnit::createGigahertz(status));
measureUnitValue = MeasureUnit::getGigahertz();
measureUnit.adoptInstead(MeasureUnit::createHertz(status));
measureUnitValue = MeasureUnit::getHertz();
measureUnit.adoptInstead(MeasureUnit::createKilohertz(status));
measureUnitValue = MeasureUnit::getKilohertz();
measureUnit.adoptInstead(MeasureUnit::createMegahertz(status));
measureUnitValue = MeasureUnit::getMegahertz();
measureUnit.adoptInstead(MeasureUnit::createDotPerCentimeter(status));
measureUnitValue = MeasureUnit::getDotPerCentimeter();
measureUnit.adoptInstead(MeasureUnit::createDotPerInch(status));
measureUnitValue = MeasureUnit::getDotPerInch();
measureUnit.adoptInstead(MeasureUnit::createEm(status));
measureUnitValue = MeasureUnit::getEm();
measureUnit.adoptInstead(MeasureUnit::createMegapixel(status));
measureUnitValue = MeasureUnit::getMegapixel();
measureUnit.adoptInstead(MeasureUnit::createPixel(status));
measureUnitValue = MeasureUnit::getPixel();
measureUnit.adoptInstead(MeasureUnit::createPixelPerCentimeter(status));
measureUnitValue = MeasureUnit::getPixelPerCentimeter();
measureUnit.adoptInstead(MeasureUnit::createPixelPerInch(status));
measureUnitValue = MeasureUnit::getPixelPerInch();
measureUnit.adoptInstead(MeasureUnit::createAstronomicalUnit(status));
measureUnitValue = MeasureUnit::getAstronomicalUnit();
measureUnit.adoptInstead(MeasureUnit::createCentimeter(status));
measureUnitValue = MeasureUnit::getCentimeter();
measureUnit.adoptInstead(MeasureUnit::createDecimeter(status));
measureUnitValue = MeasureUnit::getDecimeter();
measureUnit.adoptInstead(MeasureUnit::createFathom(status));
measureUnitValue = MeasureUnit::getFathom();
measureUnit.adoptInstead(MeasureUnit::createFoot(status));
measureUnitValue = MeasureUnit::getFoot();
measureUnit.adoptInstead(MeasureUnit::createFurlong(status));
measureUnitValue = MeasureUnit::getFurlong();
measureUnit.adoptInstead(MeasureUnit::createInch(status));
measureUnitValue = MeasureUnit::getInch();
measureUnit.adoptInstead(MeasureUnit::createKilometer(status));
measureUnitValue = MeasureUnit::getKilometer();
measureUnit.adoptInstead(MeasureUnit::createLightYear(status));
measureUnitValue = MeasureUnit::getLightYear();
measureUnit.adoptInstead(MeasureUnit::createMeter(status));
measureUnitValue = MeasureUnit::getMeter();
measureUnit.adoptInstead(MeasureUnit::createMicrometer(status));
measureUnitValue = MeasureUnit::getMicrometer();
measureUnit.adoptInstead(MeasureUnit::createMile(status));
measureUnitValue = MeasureUnit::getMile();
measureUnit.adoptInstead(MeasureUnit::createMileScandinavian(status));
measureUnitValue = MeasureUnit::getMileScandinavian();
measureUnit.adoptInstead(MeasureUnit::createMillimeter(status));
measureUnitValue = MeasureUnit::getMillimeter();
measureUnit.adoptInstead(MeasureUnit::createNanometer(status));
measureUnitValue = MeasureUnit::getNanometer();
measureUnit.adoptInstead(MeasureUnit::createNauticalMile(status));
measureUnitValue = MeasureUnit::getNauticalMile();
measureUnit.adoptInstead(MeasureUnit::createParsec(status));
measureUnitValue = MeasureUnit::getParsec();
measureUnit.adoptInstead(MeasureUnit::createPicometer(status));
measureUnitValue = MeasureUnit::getPicometer();
measureUnit.adoptInstead(MeasureUnit::createPoint(status));
measureUnitValue = MeasureUnit::getPoint();
measureUnit.adoptInstead(MeasureUnit::createSolarRadius(status));
measureUnitValue = MeasureUnit::getSolarRadius();
measureUnit.adoptInstead(MeasureUnit::createYard(status));
measureUnitValue = MeasureUnit::getYard();
measureUnit.adoptInstead(MeasureUnit::createLux(status));
measureUnitValue = MeasureUnit::getLux();
measureUnit.adoptInstead(MeasureUnit::createSolarLuminosity(status));
measureUnitValue = MeasureUnit::getSolarLuminosity();
measureUnit.adoptInstead(MeasureUnit::createCarat(status));
measureUnitValue = MeasureUnit::getCarat();
measureUnit.adoptInstead(MeasureUnit::createDalton(status));
measureUnitValue = MeasureUnit::getDalton();
measureUnit.adoptInstead(MeasureUnit::createEarthMass(status));
measureUnitValue = MeasureUnit::getEarthMass();
measureUnit.adoptInstead(MeasureUnit::createGram(status));
measureUnitValue = MeasureUnit::getGram();
measureUnit.adoptInstead(MeasureUnit::createKilogram(status));
measureUnitValue = MeasureUnit::getKilogram();
measureUnit.adoptInstead(MeasureUnit::createMetricTon(status));
measureUnitValue = MeasureUnit::getMetricTon();
measureUnit.adoptInstead(MeasureUnit::createMicrogram(status));
measureUnitValue = MeasureUnit::getMicrogram();
measureUnit.adoptInstead(MeasureUnit::createMilligram(status));
measureUnitValue = MeasureUnit::getMilligram();
measureUnit.adoptInstead(MeasureUnit::createOunce(status));
measureUnitValue = MeasureUnit::getOunce();
measureUnit.adoptInstead(MeasureUnit::createOunceTroy(status));
measureUnitValue = MeasureUnit::getOunceTroy();
measureUnit.adoptInstead(MeasureUnit::createPound(status));
measureUnitValue = MeasureUnit::getPound();
measureUnit.adoptInstead(MeasureUnit::createSolarMass(status));
measureUnitValue = MeasureUnit::getSolarMass();
measureUnit.adoptInstead(MeasureUnit::createStone(status));
measureUnitValue = MeasureUnit::getStone();
measureUnit.adoptInstead(MeasureUnit::createTon(status));
measureUnitValue = MeasureUnit::getTon();
measureUnit.adoptInstead(MeasureUnit::createGigawatt(status));
measureUnitValue = MeasureUnit::getGigawatt();
measureUnit.adoptInstead(MeasureUnit::createHorsepower(status));
measureUnitValue = MeasureUnit::getHorsepower();
measureUnit.adoptInstead(MeasureUnit::createKilowatt(status));
measureUnitValue = MeasureUnit::getKilowatt();
measureUnit.adoptInstead(MeasureUnit::createMegawatt(status));
measureUnitValue = MeasureUnit::getMegawatt();
measureUnit.adoptInstead(MeasureUnit::createMilliwatt(status));
measureUnitValue = MeasureUnit::getMilliwatt();
measureUnit.adoptInstead(MeasureUnit::createWatt(status));
measureUnitValue = MeasureUnit::getWatt();
measureUnit.adoptInstead(MeasureUnit::createAtmosphere(status));
measureUnitValue = MeasureUnit::getAtmosphere();
measureUnit.adoptInstead(MeasureUnit::createBar(status));
measureUnitValue = MeasureUnit::getBar();
measureUnit.adoptInstead(MeasureUnit::createHectopascal(status));
measureUnitValue = MeasureUnit::getHectopascal();
measureUnit.adoptInstead(MeasureUnit::createInchHg(status));
measureUnitValue = MeasureUnit::getInchHg();
measureUnit.adoptInstead(MeasureUnit::createKilopascal(status));
measureUnitValue = MeasureUnit::getKilopascal();
measureUnit.adoptInstead(MeasureUnit::createMegapascal(status));
measureUnitValue = MeasureUnit::getMegapascal();
measureUnit.adoptInstead(MeasureUnit::createMillibar(status));
measureUnitValue = MeasureUnit::getMillibar();
measureUnit.adoptInstead(MeasureUnit::createMillimeterOfMercury(status));
measureUnitValue = MeasureUnit::getMillimeterOfMercury();
measureUnit.adoptInstead(MeasureUnit::createPascal(status));
measureUnitValue = MeasureUnit::getPascal();
measureUnit.adoptInstead(MeasureUnit::createPoundPerSquareInch(status));
measureUnitValue = MeasureUnit::getPoundPerSquareInch();
measureUnit.adoptInstead(MeasureUnit::createKilometerPerHour(status));
measureUnitValue = MeasureUnit::getKilometerPerHour();
measureUnit.adoptInstead(MeasureUnit::createKnot(status));
measureUnitValue = MeasureUnit::getKnot();
measureUnit.adoptInstead(MeasureUnit::createMeterPerSecond(status));
measureUnitValue = MeasureUnit::getMeterPerSecond();
measureUnit.adoptInstead(MeasureUnit::createMilePerHour(status));
measureUnitValue = MeasureUnit::getMilePerHour();
measureUnit.adoptInstead(MeasureUnit::createCelsius(status));
measureUnitValue = MeasureUnit::getCelsius();
measureUnit.adoptInstead(MeasureUnit::createFahrenheit(status));
measureUnitValue = MeasureUnit::getFahrenheit();
measureUnit.adoptInstead(MeasureUnit::createGenericTemperature(status));
measureUnitValue = MeasureUnit::getGenericTemperature();
measureUnit.adoptInstead(MeasureUnit::createKelvin(status));
measureUnitValue = MeasureUnit::getKelvin();
measureUnit.adoptInstead(MeasureUnit::createNewtonMeter(status));
measureUnitValue = MeasureUnit::getNewtonMeter();
measureUnit.adoptInstead(MeasureUnit::createPoundFoot(status));
measureUnitValue = MeasureUnit::getPoundFoot();
measureUnit.adoptInstead(MeasureUnit::createAcreFoot(status));
measureUnitValue = MeasureUnit::getAcreFoot();
measureUnit.adoptInstead(MeasureUnit::createBarrel(status));
measureUnitValue = MeasureUnit::getBarrel();
measureUnit.adoptInstead(MeasureUnit::createBushel(status));
measureUnitValue = MeasureUnit::getBushel();
measureUnit.adoptInstead(MeasureUnit::createCentiliter(status));
measureUnitValue = MeasureUnit::getCentiliter();
measureUnit.adoptInstead(MeasureUnit::createCubicCentimeter(status));
measureUnitValue = MeasureUnit::getCubicCentimeter();
measureUnit.adoptInstead(MeasureUnit::createCubicFoot(status));
measureUnitValue = MeasureUnit::getCubicFoot();
measureUnit.adoptInstead(MeasureUnit::createCubicInch(status));
measureUnitValue = MeasureUnit::getCubicInch();
measureUnit.adoptInstead(MeasureUnit::createCubicKilometer(status));
measureUnitValue = MeasureUnit::getCubicKilometer();
measureUnit.adoptInstead(MeasureUnit::createCubicMeter(status));
measureUnitValue = MeasureUnit::getCubicMeter();
measureUnit.adoptInstead(MeasureUnit::createCubicMile(status));
measureUnitValue = MeasureUnit::getCubicMile();
measureUnit.adoptInstead(MeasureUnit::createCubicYard(status));
measureUnitValue = MeasureUnit::getCubicYard();
measureUnit.adoptInstead(MeasureUnit::createCup(status));
measureUnitValue = MeasureUnit::getCup();
measureUnit.adoptInstead(MeasureUnit::createCupMetric(status));
measureUnitValue = MeasureUnit::getCupMetric();
measureUnit.adoptInstead(MeasureUnit::createDeciliter(status));
measureUnitValue = MeasureUnit::getDeciliter();
measureUnit.adoptInstead(MeasureUnit::createFluidOunce(status));
measureUnitValue = MeasureUnit::getFluidOunce();
measureUnit.adoptInstead(MeasureUnit::createFluidOunceImperial(status));
measureUnitValue = MeasureUnit::getFluidOunceImperial();
measureUnit.adoptInstead(MeasureUnit::createGallon(status));
measureUnitValue = MeasureUnit::getGallon();
measureUnit.adoptInstead(MeasureUnit::createGallonImperial(status));
measureUnitValue = MeasureUnit::getGallonImperial();
measureUnit.adoptInstead(MeasureUnit::createHectoliter(status));
measureUnitValue = MeasureUnit::getHectoliter();
measureUnit.adoptInstead(MeasureUnit::createLiter(status));
measureUnitValue = MeasureUnit::getLiter();
measureUnit.adoptInstead(MeasureUnit::createMegaliter(status));
measureUnitValue = MeasureUnit::getMegaliter();
measureUnit.adoptInstead(MeasureUnit::createMilliliter(status));
measureUnitValue = MeasureUnit::getMilliliter();
measureUnit.adoptInstead(MeasureUnit::createPint(status));
measureUnitValue = MeasureUnit::getPint();
measureUnit.adoptInstead(MeasureUnit::createPintMetric(status));
measureUnitValue = MeasureUnit::getPintMetric();
measureUnit.adoptInstead(MeasureUnit::createQuart(status));
measureUnitValue = MeasureUnit::getQuart();
measureUnit.adoptInstead(MeasureUnit::createTablespoon(status));
measureUnitValue = MeasureUnit::getTablespoon();
measureUnit.adoptInstead(MeasureUnit::createTeaspoon(status));
measureUnitValue = MeasureUnit::getTeaspoon();
assertSuccess("", status);
}
void MeasureFormatTest::TestBasic() {
UErrorCode status = U_ZERO_ERROR;
MeasureUnit *ptr1 = MeasureUnit::createArcMinute(status);
MeasureUnit *ptr2 = MeasureUnit::createArcMinute(status);
if (!(*ptr1 == *ptr2)) {
errln("Expect == to work.");
}
if (*ptr1 != *ptr2) {
errln("Expect != to work.");
}
MeasureUnit *ptr3 = MeasureUnit::createMeter(status);
if (*ptr1 == *ptr3) {
errln("Expect == to work.");
}
if (!(*ptr1 != *ptr3)) {
errln("Expect != to work.");
}
MeasureUnit *ptr4 = ptr1->clone();
if (*ptr1 != *ptr4) {
errln("Expect clone to work.");
}
MeasureUnit stack;
stack = *ptr1;
if (*ptr1 != stack) {
errln("Expect assignment to work.");
}
delete ptr1;
delete ptr2;
delete ptr3;
delete ptr4;
}
void MeasureFormatTest::TestGetAvailable() {
MeasureUnit *units = NULL;
UErrorCode status = U_ZERO_ERROR;
int32_t totalCount = MeasureUnit::getAvailable(units, 0, status);
while (status == U_BUFFER_OVERFLOW_ERROR) {
status = U_ZERO_ERROR;
delete [] units;
units = new MeasureUnit[totalCount];
totalCount = MeasureUnit::getAvailable(units, totalCount, status);
}
if (U_FAILURE(status)) {
dataerrln("Failure creating format object - %s", u_errorName(status));
delete [] units;
return;
}
if (totalCount < 200) {
errln("Expect at least 200 measure units including currencies.");
}
delete [] units;
StringEnumeration *types = MeasureUnit::getAvailableTypes(status);
if (U_FAILURE(status)) {
dataerrln("Failure getting types - %s", u_errorName(status));
delete types;
return;
}
if (types->count(status) < 10) {
errln("Expect at least 10 distinct unit types.");
}
units = NULL;
int32_t unitCapacity = 0;
int32_t unitCountSum = 0;
for (
const char* type = types->next(NULL, status);
type != NULL;
type = types->next(NULL, status)) {
int32_t unitCount = MeasureUnit::getAvailable(type, units, unitCapacity, status);
while (status == U_BUFFER_OVERFLOW_ERROR) {
status = U_ZERO_ERROR;
delete [] units;
units = new MeasureUnit[unitCount];
unitCapacity = unitCount;
unitCount = MeasureUnit::getAvailable(type, units, unitCapacity, status);
}
if (U_FAILURE(status)) {
dataerrln("Failure getting units - %s", u_errorName(status));
delete [] units;
delete types;
return;
}
if (unitCount < 1) {
errln("Expect at least one unit count per type.");
}
unitCountSum += unitCount;
}
if (unitCountSum != totalCount) {
errln("Expected total unit count to equal sum of unit counts by type.");
}
delete [] units;
delete types;
}
void MeasureFormatTest::TestExamplesInDocs() {
UErrorCode status = U_ZERO_ERROR;
MeasureFormat fmtFr(Locale::getFrench(), UMEASFMT_WIDTH_SHORT, status);
MeasureFormat fmtFrFull(
Locale::getFrench(), UMEASFMT_WIDTH_WIDE, status);
MeasureFormat fmtFrNarrow(
Locale::getFrench(), UMEASFMT_WIDTH_NARROW, status);
MeasureFormat fmtEn(Locale::getUS(), UMEASFMT_WIDTH_WIDE, status);
if (!assertSuccess("Error creating formatters", status)) {
return;
}
Measure measureC((double)23, MeasureUnit::createCelsius(status), status);
Measure measureF((double)70, MeasureUnit::createFahrenheit(status), status);
Measure feetAndInches[] = {
Measure((double)70, MeasureUnit::createFoot(status), status),
Measure((double)5.3, MeasureUnit::createInch(status), status)};
Measure footAndInch[] = {
Measure((double)1, MeasureUnit::createFoot(status), status),
Measure((double)1, MeasureUnit::createInch(status), status)};
Measure inchAndFeet[] = {
Measure((double)1, MeasureUnit::createInch(status), status),
Measure((double)2, MeasureUnit::createFoot(status), status)};
if (!assertSuccess("Error creating measurements.", status)) {
return;
}
verifyFormat(
"Celsius",
fmtFr,
&measureC,
1,
"23\\u202F\\u00B0C");
verifyFormatWithPrefix(
"Celsius",
fmtFr,
"Prefix: ",
&measureC,
1,
"Prefix: 23\\u202F\\u00B0C");
verifyFormat(
"Fahrenheit",
fmtFr,
&measureF,
1,
"70\\u202F\\u00B0F");
verifyFormat(
"Feet and inches",
fmtFrFull,
feetAndInches,
UPRV_LENGTHOF(feetAndInches),
"70 pieds et 5,3\\u00A0pouces");
verifyFormatWithPrefix(
"Feet and inches",
fmtFrFull,
"Prefix: ",
feetAndInches,
UPRV_LENGTHOF(feetAndInches),
"Prefix: 70 pieds et 5,3\\u00A0pouces");
verifyFormat(
"Foot and inch",
fmtFrFull,
footAndInch,
UPRV_LENGTHOF(footAndInch),
"1\\u00A0pied et 1\\u00A0pouce");
verifyFormat(
"Foot and inch narrow",
fmtFrNarrow,
footAndInch,
UPRV_LENGTHOF(footAndInch),
"1\\u2032 1\\u2033");
verifyFormat(
"Inch and feet",
fmtEn,
inchAndFeet,
UPRV_LENGTHOF(inchAndFeet),
"1 inch, 2 feet");
}
void MeasureFormatTest::TestFormatPeriodEn() {
UErrorCode status = U_ZERO_ERROR;
Measure t_1y[] = {Measure((double)1, MeasureUnit::createYear(status), status)};
Measure t_5M[] = {Measure((double)5, MeasureUnit::createMonth(status), status)};
Measure t_4d[] = {Measure((double)4, MeasureUnit::createDay(status), status)};
Measure t_2h[] = {Measure((double)2, MeasureUnit::createHour(status), status)};
Measure t_19m[] = {Measure((double)19, MeasureUnit::createMinute(status), status)};
Measure t_1h_23_5s[] = {
Measure((double)1.0, MeasureUnit::createHour(status), status),
Measure((double)23.5, MeasureUnit::createSecond(status), status)
};
Measure t_1h_23_5m[] = {
Measure((double)1.0, MeasureUnit::createHour(status), status),
Measure((double)23.5, MeasureUnit::createMinute(status), status)
};
Measure t_1h_0m_23s[] = {
Measure(
(double)1.0,
TimeUnit::createInstance(
TimeUnit::UTIMEUNIT_HOUR, status),
status),
Measure(
(double)0.0,
TimeUnit::createInstance(
TimeUnit::UTIMEUNIT_MINUTE, status),
status),
Measure(
(double)23.0,
TimeUnit::createInstance(
TimeUnit::UTIMEUNIT_SECOND, status),
status)
};
Measure t_2y_5M_3w_4d[] = {
Measure(2.0, MeasureUnit::createYear(status), status),
Measure(5.0, MeasureUnit::createMonth(status), status),
Measure(3.0, MeasureUnit::createWeek(status), status),
Measure(4.0, MeasureUnit::createDay(status), status)
};
Measure t_1m_59_9996s[] = {
Measure(1.0, MeasureUnit::createMinute(status), status),
Measure(59.9996, MeasureUnit::createSecond(status), status)
};
Measure t_5h_17m[] = {
Measure(5.0, MeasureUnit::createHour(status), status),
Measure(17.0, MeasureUnit::createMinute(status), status)
};
Measure t_neg5h_17m[] = {
Measure(-5.0, MeasureUnit::createHour(status), status),
Measure(17.0, MeasureUnit::createMinute(status), status)
};
Measure t_19m_28s[] = {
Measure(19.0, MeasureUnit::createMinute(status), status),
Measure(28.0, MeasureUnit::createSecond(status), status)
};
Measure t_0h_0m_9s[] = {
Measure(0.0, MeasureUnit::createHour(status), status),