-
Notifications
You must be signed in to change notification settings - Fork 388
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CLDR-15923 Integrate UN Literacy Parser, update unit test
- Loading branch information
Showing
5 changed files
with
109 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 17 additions & 2 deletions
19
tools/cldr-code/src/test/java/org/unicode/cldr/tool/TestAddPopulationData.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,27 @@ | ||
package org.unicode.cldr.tool; | ||
|
||
import java.io.IOException; | ||
import static org.junit.jupiter.api.Assertions.assertFalse; | ||
|
||
import com.ibm.icu.util.Output; | ||
import java.io.IOException; | ||
import java.util.List; | ||
import org.junit.jupiter.api.Test; | ||
import org.unicode.cldr.util.Pair; | ||
|
||
public class TestAddPopulationData { | ||
@Test | ||
public void TestParseUnStats() throws IOException { | ||
AddPopulationData.loadUnLiteracy(); | ||
Output<Boolean> err = new Output<>(false); | ||
// this is already run once during static init. we run it again to capture err value | ||
List<Pair<String, Double>> unLiteracy = AddPopulationData.getUnLiteracy(err); | ||
assertFalse( | ||
err.value, | ||
"getUnLiteracy() returned errs - check err log for 'ERROR: CountryCodeConverter'"); | ||
assertFalse(unLiteracy.isEmpty(), "un literacy shouldn't be empty"); | ||
// optionally dump out values | ||
if (false) | ||
for (final Pair<String, Double> p : unLiteracy) { | ||
System.out.println(p.getFirst() + " - " + p.getSecond()); | ||
} | ||
} | ||
} |