INNER CODE UNIT · Rust
test_from_str_named_chain_error
n42blockchain/N42-rs · crates/chainspec/src/lib.rs:104
fn test_from_str_named_chain_error() {
let result = Chain::from_str("chain");
assert!(result.is_err());
}
#[test]
fn test_from_str_id_chain() {
let result = Chain::from_str("1234");
let expected = Chain::from(1234);
assert!(result.is_ok());
assert_eq!(result.unwrap(), expected);
}
#[test]
fn test_default() {
let default = Chain::default();