test: 数值断言容忍 int 表示,类私有字段 for-in 用例补公有字段

This commit is contained in:
2026-08-14 06:14:38 +08:00
parent ace6bea2c4
commit 33db6dad9c
7 changed files with 28 additions and 16 deletions
@@ -87,8 +87,8 @@ fn reflect_apply_calls_function() {
&mut vm,
"function add(a, b) { return this.base + a + b; } var receiver = {base: 10}; var args = [1, 2]; Reflect.apply(add, receiver, args)",
)
.unwrap();
assert_eq!(result.as_double(), 13.0);
.unwrap();
assert_eq!(result.as_int(), 13, "this.base 10 + 1 + 2 = 13");
}
#[test]