ICU-21900 MeasureUnit update; just marks mg-ofGlucose-perDeciliter as stable

This commit is contained in:
Peter Edberg 2022-02-07 23:57:16 -08:00 committed by Peter Edberg
parent 2f8749a026
commit 205144e391
4 changed files with 17 additions and 13 deletions

View file

@ -989,23 +989,21 @@ class U_I18N_API MeasureUnit: public UObject {
*/
static MeasureUnit getKarat();
#ifndef U_HIDE_DRAFT_API
/**
* Returns by pointer, unit of concentr: milligram-ofglucose-per-deciliter.
* Caller owns returned value and must free it.
* Also see {@link #getMilligramOfglucosePerDeciliter()}.
* @param status ICU error code.
* @draft ICU 69
* @stable ICU 69
*/
static MeasureUnit *createMilligramOfglucosePerDeciliter(UErrorCode &status);
/**
* Returns by value, unit of concentr: milligram-ofglucose-per-deciliter.
* Also see {@link #createMilligramOfglucosePerDeciliter()}.
* @draft ICU 69
* @stable ICU 69
*/
static MeasureUnit getMilligramOfglucosePerDeciliter();
#endif /* U_HIDE_DRAFT_API */
/**
* Returns by pointer, unit of concentr: milligram-per-deciliter.

View file

@ -2683,7 +2683,7 @@ void MeasureFormatTest::TestCompatible69() {
assertSuccess("", status);
}
void MeasureFormatTest::TestCompatible70() {
void MeasureFormatTest::TestCompatible70() { // TestCompatible71 would be identical
UErrorCode status = U_ZERO_ERROR;
LocalPointer<MeasureUnit> measureUnit;
MeasureUnit measureUnitValue;
@ -3064,6 +3064,9 @@ void MeasureFormatTest::TestCompatible70() {
assertSuccess("", status);
}
// TestCompatible71 would be identical to TestCompatible70,
// no need to add it
void MeasureFormatTest::TestBasic() {
UErrorCode status = U_ZERO_ERROR;
MeasureUnit *ptr1 = MeasureUnit::createArcMinute(status);

View file

@ -1007,7 +1007,7 @@ public class MeasureUnit implements Serializable {
/**
* Constant for unit of concentr: milligram-ofglucose-per-deciliter
* @draft ICU 69
* @stable ICU 69
*/
public static final MeasureUnit MILLIGRAM_OFGLUCOSE_PER_DECILITER = MeasureUnit.internalGetInstance("concentr", "milligram-ofglucose-per-deciliter");

View file

@ -85,7 +85,7 @@ public class MeasureUnitTest extends TestFmwk {
}
}
private static final String[] DRAFT_VERSIONS = {"68", "69"};
private static final String[] DRAFT_VERSIONS = {"70", "71"};
private static final HashSet<String> DRAFT_VERSION_SET = new HashSet<>();
@ -322,12 +322,12 @@ public class MeasureUnitTest extends TestFmwk {
// various generateXXX calls go here, see
// docs/processes/release/tasks/updating-measure-unit.md
// use this test to run each of the ollowing in succession
//generateConstants("70"); // for MeasureUnit.java, update generated MeasureUnit constants
//generateBackwardCompatibilityTest("70"); // for MeasureUnitTest.java, create TestCompatible70
//generateCXXHConstants("70"); // for measunit.h, update generated createXXX methods
//generateConstants("71"); // for MeasureUnit.java, update generated MeasureUnit constants
//generateBackwardCompatibilityTest("71"); // for MeasureUnitTest.java, create TestCompatible70
//generateCXXHConstants("71"); // for measunit.h, update generated createXXX methods
//generateCXXConstants(); // for measunit.cpp, update generated code
//generateCXXBackwardCompatibilityTest("70"); // for measfmttest.cpp, create TestCompatible70
//updateJAVAVersions("70"); // for MeasureUnitTest.java, JAVA_VERSIONS
//generateCXXBackwardCompatibilityTest("71"); // for measfmttest.cpp, create TestCompatible70
//updateJAVAVersions("71"); // for MeasureUnitTest.java, JAVA_VERSIONS
}
@Test
@ -2084,7 +2084,7 @@ public class MeasureUnitTest extends TestFmwk {
}
@Test
public void TestCompatible70() {
public void TestCompatible70() { // TestCompatible71 would be identical
MeasureUnit[] units = {
MeasureUnit.G_FORCE,
MeasureUnit.METER_PER_SECOND_SQUARED,
@ -2277,6 +2277,9 @@ public class MeasureUnitTest extends TestFmwk {
assertEquals("", 187, units.length);
}
// TestCompatible71 would be identical to TestCompatible70,
// no need to add it
@Test
public void TestExamplesInDocs() {
MeasureFormat fmtFr = MeasureFormat.getInstance(