unicode-org / icu4x

Solving i18n for client-side and resource-constrained environments.
https://icu4x.unicode.org
Other
1.37k stars 176 forks source link

Add better WASM test coverage #1102

Open sffc opened 3 years ago

sffc commented 3 years ago

The layout of the ICU4XPluralOperands struct changed in https://github.com/unicode-org/icu4x/pull/1100, and yet it was not necessary to make any changes to the tests. This suggests that the test coverage for this corner of the WASM API is weak. We should add more thorough tests.

Related: https://github.com/rust-diplomat/diplomat/issues/91

sffc commented 3 years ago

@Manishearth added test on the Diplomat side for this. https://github.com/rust-diplomat/diplomat/pull/95

Manishearth commented 3 years ago

If folks want to work on this, it essentially involves adding more tests like https://github.com/unicode-org/icu4x/blob/main/ffi/diplomat/wasm/test/fixed-decimal.mjs , perhaps one for plural rules that tries all kinds of plural options. We have some plural rules tests in the cpp folder you can start out with.