telltale-machine 17.0.0

Protocol machine for choreographic session type protocols
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
#![allow(missing_docs)]
//! Unknown opcode rejection tests.

use wasm_bindgen_test::wasm_bindgen_test;

use telltale_machine::instr::Instr;

#[wasm_bindgen_test(unsupported = test)]
fn test_unknown_opcode_rejected() {
    let json = r#"{"UnknownOpcode":{"foo":1}}"#;
    let decoded: Result<Instr, _> = serde_json::from_str(json);
    assert!(decoded.is_err(), "unknown opcode should be rejected");
}