INNER CODE UNIT · Rust

test_from_str_named_chain

n42blockchain/N42-rs · crates/chainspec/src/lib.rs:95

    fn test_from_str_named_chain() {
        let result = Chain::from_str("mainnet");
        let expected = Chain::mainnet();

        assert!(result.is_ok());
        assert_eq!(result.unwrap(), expected);
    }

    #[test]
    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");

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…