icu_testdata 
icu_testdata is a unit testing crate for ICU4X.
The crate exposes data providers 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 crate exposes three kinds of providers, corresponding to the three types of constructors in ICU:
- [
unstable], [unstable_no_fallback] - [
any], [any_no_fallback] - [
buffer], [buffer_no_fallback] (bufferCargo feature)
Examples
use locale;
use HelloWorldFormatter;
// Unstable constructor
try_new_unstable.unwrap;
// AnyProvider constructor
try_new_with_any_provider.unwrap;
// BufferProvider constructor (`icu` with `serde` feature, `icu_testdata` with `buffer` feature)
try_new_with_buffer_provider.unwrap;
// Without fallback the locale match needs to be exact
try_new_unstable.is_err;
try_new_unstable.unwrap;
More Information
For more information on development, authorship, contributing etc. please visit ICU4X home page.