feat: 添加基准测试基础设施

This commit is contained in:
爱特每羊队
2026-06-24 10:46:59 +08:00
parent 9d43314242
commit f602ae5f00
32 changed files with 1215 additions and 10 deletions
+5 -5
View File
@@ -38,12 +38,12 @@ fn run_file() {
}
#[test]
fn bench_not_implemented() {
fn bench_help() {
let output = Command::new("cargo")
.args(["run", "--", "bench"])
.args(["run", "--", "bench", "--help"])
.output()
.expect("failed to run oxide bench");
.expect("failed to run oxide bench --help");
let stderr = String::from_utf8_lossy(&output.stderr);
assert!(stderr.contains("not yet implemented"), "bench should print not-implemented message");
let stdout = String::from_utf8_lossy(&output.stdout);
assert!(stdout.contains("--iterations"), "bench --help should list --iterations flag");
}