From 811e9e928addde6abef38e2b1b47baece0cc92d6 Mon Sep 17 00:00:00 2001 From: pjh456 <147148383@qq.com> Date: Sat, 26 Sep 2026 08:29:55 +0000 Subject: [PATCH] =?UTF-8?q?refactor:=20=E6=B8=85=E7=90=86=E5=8D=A0?= =?UTF-8?q?=E4=BD=8D=20opcode=20=E8=A1=A8=E9=A1=B9=E4=B8=8E=E6=9C=AA?= =?UTF-8?q?=E5=AE=9E=E8=A3=85=E5=85=9C=E5=BA=95=E8=87=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dispatch_unimplemented_opcode_tests.rs | 25 ------------------- 1 file changed, 25 deletions(-) delete mode 100644 crates/oxide_vm/tests/dispatch_unimplemented_opcode_tests.rs diff --git a/crates/oxide_vm/tests/dispatch_unimplemented_opcode_tests.rs b/crates/oxide_vm/tests/dispatch_unimplemented_opcode_tests.rs deleted file mode 100644 index c092dc4f..00000000 --- a/crates/oxide_vm/tests/dispatch_unimplemented_opcode_tests.rs +++ /dev/null @@ -1,25 +0,0 @@ -//! 未实装 profile 族 opcodes 的显式失败钉:run 遇 PROFILE_SHAPE 须返回 -//! 显式错误而非静默按数据指令消费(手工 CompiledModule 直达,不经编译器)。 - -use std::sync::Arc; - -use oxide_bytecode::module::CompiledModule; -use oxide_bytecode::opcode; -use oxide_vm::vm::Vm; - -#[test] -fn unimplemented_profile_opcode_fails_explicitly() { - let module = CompiledModule { - bytecode: Arc::from(vec![ - opcode::encode(opcode::OpCode::PROFILE_SHAPE, 0, 0, 0), - opcode::encode(opcode::OpCode::HALT, 0, 0, 0), - ]), - n_registers: 1, - ..CompiledModule::new() - }; - let mut vm = Vm::new(); - let err = vm - .run(&Arc::new(module)) - .expect_err("unimplemented opcode should fail explicitly"); - assert_eq!(err, "opcode PROFILE_SHAPE not yet implemented"); -}