telltale-vm 6.0.0

Bytecode VM for choreographic session type protocols
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
//! Unknown opcode rejection tests.

use wasm_bindgen_test::wasm_bindgen_test;

use telltale_vm::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");
}