Skip to main content

Crate forma_test

Crate forma_test 

Source
Expand description

Token-based test framework for forma_core.

Provides assert_ser_tokens, assert_de_tokens, and assert_tokens for verifying that Serialize/Deserialize impls produce and consume the expected token streams.

Re-exports§

pub use error::Error;
pub use token::Token;

Modules§

de
Token-based deserializer.
error
Error type for the test serializer/deserializer.
ser
Token-recording serializer.
token
The token type — one variant per data model type.

Functions§

assert_de_tokens
Assert that deserializing tokens produces a value equal to expected.
assert_de_tokens_error
Assert that deserialization from tokens fails with an error whose Display output contains expected_msg.
assert_ser_tokens
Assert that serializing value produces exactly expected tokens.
assert_tokens
Assert that value round-trips through serialization and deserialization via the given token stream.