icu_testdata
is a unit testing crate for [ICU4X
].
The crate exposes a data provider 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.
There are four modes of operation, enabled by features:
* static
(default) exposes [get_postcard_provider
].
* fs
exposes [get_json_provider
]
* baked
exposes [get_baked_provider
].
* metadata
exposes the [metadata
] module which contains information such as the CLDR Gitref
and the list of included locales.
However, clients should not generally choose a specific provider, but rather use [get_provider
].
This is currently an alias for [get_postcard_provider
], as it is fast and has few dependencies.
bash
$ cargo run --bin --features=bin icu4x-testdata-download-sources
bash
$ cargo run --bin --features=bin icu4x-testdata-datagen
```rust use std::borrow::Cow; use icuprovider::prelude::*; use iculocid::locale;
let dataprovider = icutestdata::get_provider();
let data: DataPayload
For more information on development, authorship, contributing etc. please visit ICU4X home page
.