style: 参数列表与调用折行对齐格式检查

This commit is contained in:
2026-09-29 12:12:10 +00:00
parent 6f66b8d454
commit 3aadf1c163
2 changed files with 2 additions and 9 deletions
+1 -4
View File
@@ -139,10 +139,7 @@ fn alloc_strategy_microbench() -> MicroResult {
/// 压力基准同一 harness),返回当前中位墙毫秒与基线墙毫秒(基线缺失时 /// 压力基准同一 harness),返回当前中位墙毫秒与基线墙毫秒(基线缺失时
/// 为 None)。 /// 为 None)。
fn run_wall_case( fn run_wall_case(
case: &str, case: &str, config: &BenchConfig, kernel: &Arc<KernelCore>, pool: &Arc<VmPool>,
config: &BenchConfig,
kernel: &Arc<KernelCore>,
pool: &Arc<VmPool>,
) -> Result<(f64, Option<f64>), String> { ) -> Result<(f64, Option<f64>), String> {
let path = format!("tests/stress/{case}.js"); let path = format!("tests/stress/{case}.js");
let js = std::fs::read_to_string(&path).map_err(|e| format!("读取 {path} 失败: {e}"))?; let js = std::fs::read_to_string(&path).map_err(|e| format!("读取 {path} 失败: {e}"))?;
@@ -87,11 +87,7 @@ fn boxed_number_out_of_range_index_absent() {
fn boxed_number_arraylike_push_writes_index_keeps_payload() { fn boxed_number_arraylike_push_writes_index_keeps_payload() {
// push 经 .call 在 Number 盒上落槽 0 并置 length,读回写入值,被包基元保持。 // push 经 .call 在 Number 盒上落槽 0 并置 length,读回写入值,被包基元保持。
let mut vm = Vm::new(); let mut vm = Vm::new();
let r = eval( let r = eval(&mut vm, "var o = Object(5); Array.prototype.push.call(o, 9); [o[0], Number(o), o.length]").unwrap();
&mut vm,
"var o = Object(5); Array.prototype.push.call(o, 9); [o[0], Number(o), o.length]",
)
.unwrap();
assert_eq!(elem(r, 0).as_int(), 9, "o[0] 应读回 push 写入值 9"); assert_eq!(elem(r, 0).as_int(), 9, "o[0] 应读回 push 写入值 9");
assert_eq!(elem(r, 1).as_int(), 5, "Number(o) 应保持被包值 5"); assert_eq!(elem(r, 1).as_int(), 5, "Number(o) 应保持被包值 5");
assert_eq!(elem(r, 2).as_int(), 1, "o.length 应为 1"); assert_eq!(elem(r, 2).as_int(), 1, "o.length 应为 1");