icu_testdata 
icu_testdata is a unit testing package for ICU4X.
The package exposes a DataProvider with stable data useful for unit testing. The data is
based on a CLDR tag and a short list of locales that, together, cover a range of scenarios.
The list of locales and the current CLDR tag can be found in Cargo.toml.
The output data can be found in the data subdirectory. There, you will find:
jsonfor the ICU4X JSON test datacldrfor the source CLDR JSON
Pointing to custom test data
If you wish to run ICU4X tests with custom test data, you may do so by setting the "ICU4X_TESTDATA_DIR" environment variable:
Re-generating the data
From the top level directory of the icu4x metapackage, run:
The following commands are also available:
cargo make testdata-downloaddownloads fresh CLDR JSONcargo make testdata-build-jsonre-generates the ICU4X JSONcargo make testdata-build-blobre-generates the ICU4X blob filecargo make bincode-gen-testdatagenerates Bincode filesystem testdata
Examples
use Cow;
use *;
use langid;
let data_provider = get_provider;
let data: = data_provider
.load_payload
.unwrap
.take_payload
.unwrap;
let rule = "v = 0 and i % 10 = 2..4 and i % 100 != 12..14".parse
.expect;
assert_eq!;
More Information
For more information on development, authorship, contributing etc. please visit ICU4X home page.