Open
Description
Looks like the mod tests
sections in src/{encode,decode}_impl.rs
both test the high-level interface, which requires std
that means that a test without the std
feature will fail:
0 dkg@hos:…/libzbase32$ cargo --offline test --all-targets --no-default-features
Compiling libzbase32 v2.0.1 (…/libzbase32)
error[E0432]: unresolved import `super::decode`
--> src/decode_impl.rs:264:9
|
264 | use super::decode;
| ^^^^^^^^^^^^^ no `decode` in `decode_impl`
error[E0432]: unresolved import `super::encode`
--> src/encode_impl.rs:253:9
|
253 | use super::encode;
| ^^^^^^^^^^^^^ no `encode` in `encode_impl`
error[E0433]: failed to resolve: use of undeclared type `Vec`
--> src/decode_impl.rs:268:26
|
268 | let mut buffer = Vec::new();
| ^^^ use of undeclared type `Vec`
error[E0433]: failed to resolve: use of undeclared type `String`
--> src/encode_impl.rs:257:26
|
257 | let mut buffer = String::new();
| ^^^^^^ use of undeclared type `String`
Some errors have detailed explanations: E0432, E0433.
For more information about an error, try `rustc --explain E0432`.
error: could not compile `libzbase32` due to 4 previous errors
101 dkg@host:…/libzbase32$
If i decorate the two mod tests
sections with #[cfg(feature = "std")]
then i get a handful of warnings about unused items in src/test_data.rs
-- and no tests run at all ☹
Seems like the right thing to do is to add tests for the low level api.
Metadata
Metadata
Assignees
Labels
No labels