mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-14 17:24:01 +00:00
ICU-13667 ICU 62rc BRS, update measurement unit constants
X-SVN-Rev: 41481
This commit is contained in:
parent
a5a8ec6c11
commit
8d17fb0e1b
5 changed files with 35 additions and 48 deletions
|
@ -41,21 +41,21 @@ static const int32_t gOffsets[] = {
|
|||
16,
|
||||
20,
|
||||
24,
|
||||
321,
|
||||
331,
|
||||
342,
|
||||
346,
|
||||
352,
|
||||
356,
|
||||
376,
|
||||
322,
|
||||
332,
|
||||
343,
|
||||
347,
|
||||
353,
|
||||
357,
|
||||
377,
|
||||
388,
|
||||
391,
|
||||
397,
|
||||
402,
|
||||
406,
|
||||
410,
|
||||
435
|
||||
378,
|
||||
389,
|
||||
392,
|
||||
398,
|
||||
403,
|
||||
407,
|
||||
411,
|
||||
436
|
||||
};
|
||||
|
||||
static const int32_t gIndexes[] = {
|
||||
|
@ -391,6 +391,7 @@ static const char * const gSubTypes[] = {
|
|||
"UZS",
|
||||
"VEB",
|
||||
"VEF",
|
||||
"VES",
|
||||
"VNC",
|
||||
"VND",
|
||||
"VUV",
|
||||
|
@ -547,14 +548,14 @@ static const char * const gSubTypes[] = {
|
|||
|
||||
// Must be sorted by first value and then second value.
|
||||
static int32_t unitPerUnitToSingleUnit[][4] = {
|
||||
{363, 333, 17, 0},
|
||||
{365, 339, 17, 2},
|
||||
{367, 333, 17, 3},
|
||||
{367, 424, 4, 2},
|
||||
{367, 425, 4, 3},
|
||||
{382, 422, 3, 1},
|
||||
{385, 11, 16, 4},
|
||||
{427, 363, 4, 1}
|
||||
{364, 334, 17, 0},
|
||||
{366, 340, 17, 2},
|
||||
{368, 334, 17, 3},
|
||||
{368, 425, 4, 2},
|
||||
{368, 426, 4, 3},
|
||||
{383, 423, 3, 1},
|
||||
{386, 11, 16, 4},
|
||||
{428, 364, 4, 1}
|
||||
};
|
||||
|
||||
// Shortcuts to the base unit in order to make the default constructor fast
|
||||
|
|
|
@ -400,14 +400,6 @@ class U_I18N_API MeasureUnit: public UObject {
|
|||
*/
|
||||
static MeasureUnit *createMilePerGallonImperial(UErrorCode &status);
|
||||
|
||||
/*
|
||||
* The following were draft ICU 58, but have been withdrawn:
|
||||
* static MeasureUnit *createEast(UErrorCode &status);
|
||||
* static MeasureUnit *createNorth(UErrorCode &status);
|
||||
* static MeasureUnit *createSouth(UErrorCode &status);
|
||||
* static MeasureUnit *createWest(UErrorCode &status);
|
||||
*/
|
||||
|
||||
/**
|
||||
* Returns unit of digital: bit.
|
||||
* Caller owns returned value and must free it.
|
||||
|
|
|
@ -1039,6 +1039,9 @@ void MeasureFormatTest::TestCompatible59() {
|
|||
assertSuccess("", status);
|
||||
}
|
||||
|
||||
// Note that TestCompatible60(), TestCompatible61(), TestCompatible62()
|
||||
// would be the same as TestCompatible59(), no need to add them.
|
||||
|
||||
void MeasureFormatTest::TestBasic() {
|
||||
UErrorCode status = U_ZERO_ERROR;
|
||||
MeasureUnit *ptr1 = MeasureUnit::createArcMinute(status);
|
||||
|
|
|
@ -517,14 +517,6 @@ public class MeasureUnit implements Serializable {
|
|||
*/
|
||||
public static final MeasureUnit MILE_PER_GALLON_IMPERIAL = MeasureUnit.internalGetInstance("consumption", "mile-per-gallon-imperial");
|
||||
|
||||
/*
|
||||
* at-draft ICU 58, withdrawn
|
||||
* public static final MeasureUnit EAST = MeasureUnit.internalGetInstance("coordinate", "east");
|
||||
* public static final MeasureUnit NORTH = MeasureUnit.internalGetInstance("coordinate", "north");
|
||||
* public static final MeasureUnit SOUTH = MeasureUnit.internalGetInstance("coordinate", "south");
|
||||
* public static final MeasureUnit WEST = MeasureUnit.internalGetInstance("coordinate", "west");
|
||||
*/
|
||||
|
||||
/**
|
||||
* Constant for unit of digital: bit
|
||||
* @stable ICU 54
|
||||
|
|
|
@ -83,7 +83,7 @@ public class MeasureUnitTest extends TestFmwk {
|
|||
}
|
||||
}
|
||||
|
||||
private static final String[] DRAFT_VERSIONS = {"57", "58", "59"};
|
||||
private static final String[] DRAFT_VERSIONS = {"60", "61", "62"};
|
||||
|
||||
private static final HashSet<String> DRAFT_VERSION_SET = new HashSet<String>();
|
||||
|
||||
|
@ -224,10 +224,6 @@ public class MeasureUnitTest extends TestFmwk {
|
|||
{"PART_PER_MILLION", "57"},
|
||||
{"MILE_PER_GALLON_IMPERIAL", "57"},
|
||||
{"GALLON_IMPERIAL", "57"},
|
||||
// {"EAST", "58"},
|
||||
// {"NORTH", "58"},
|
||||
// {"SOUTH", "58"},
|
||||
// {"WEST", "58"},
|
||||
{"POINT", "59"},
|
||||
};
|
||||
|
||||
|
@ -254,12 +250,12 @@ public class MeasureUnitTest extends TestFmwk {
|
|||
// various generateXXX calls go here, see
|
||||
// http://site.icu-project.org/design/formatting/measureformat/updating-measure-unit
|
||||
// use this test to run each of the ollowing in succession
|
||||
//generateConstants("59"); // for MeasureUnit.java, update generated MeasureUnit constants
|
||||
//generateBackwardCompatibilityTest("59"); // for MeasureUnitTest.java, create TestCompatible59
|
||||
//generateCXXHConstants("59"); // for measunit.h, update generated createXXX methods
|
||||
//generateConstants("62"); // for MeasureUnit.java, update generated MeasureUnit constants
|
||||
//generateBackwardCompatibilityTest("62"); // for MeasureUnitTest.java, create TestCompatible62
|
||||
//generateCXXHConstants("62"); // for measunit.h, update generated createXXX methods
|
||||
//generateCXXConstants(); // for measunit.cpp, update generated code
|
||||
//generateCXXBackwardCompatibilityTest("59"); // for measfmttest.cpp, create TestCompatible59
|
||||
//updateJAVAVersions("59"); // for MeasureUnitTest.java, JAVA_VERSIONS
|
||||
//generateCXXBackwardCompatibilityTest("62"); // for measfmttest.cpp, create TestCompatible62
|
||||
//updateJAVAVersions("62"); // for MeasureUnitTest.java, JAVA_VERSIONS
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -1136,6 +1132,9 @@ public class MeasureUnitTest extends TestFmwk {
|
|||
assertEquals("", 135, units.length);
|
||||
}
|
||||
|
||||
// Note that TestCompatible60(), TestCompatible61(), TestCompatible62()
|
||||
// would be the same as TestCompatible59(), no need to add them.
|
||||
|
||||
@Test
|
||||
public void TestExamplesInDocs() {
|
||||
MeasureFormat fmtFr = MeasureFormat.getInstance(
|
||||
|
|
Loading…
Add table
Reference in a new issue