MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / smoke_checks_every_case

Function smoke_checks_every_case

libatomic/examples/agent_sandbox_bench.rs:773–803  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

771
772 #[test]
773 fn smoke_checks_every_case() {
774 let dir = tempfile::tempdir().unwrap();
775 let output = dir.path().join("report.json");
776 run(Config {
777 output: output.clone(),
778 files_east: 2,
779 files_west: 2,
780 lines: 8,
781 edits: 1,
782 iterations: 1,
783 warmups: 0,
784 allow_debug: true,
785 keep_fixtures: false,
786 span: true,
787 })
788 .unwrap();
789 let report: serde_json::Value = serde_json::from_slice(&fs::read(output).unwrap()).unwrap();
790 let samples = report["samples"].as_array().unwrap();
791 assert_eq!(samples.len(), CASES.len());
792 for sample in samples {
793 assert!(sample["total_ns"].as_u64().unwrap() > 0);
794 assert!(sample["verified_files"].as_u64().unwrap() > 0);
795 }
796 let partial: Vec<_> = samples
797 .iter()
798 .filter(|s| s["case"].as_str().unwrap().contains("partial"))
799 .collect();
800 assert_eq!(partial.len(), 1);
801 assert_eq!(partial[0]["case"].as_str().unwrap(), "atomic_rpc_partial");
802 assert_eq!(partial[0]["verified_files"].as_u64().unwrap(), 2);
803 }
804}

Callers

nothing calls this directly

Calls 9

runFunction · 0.70
readFunction · 0.50
unwrapMethod · 0.45
pathMethod · 0.45
cloneMethod · 0.45
collectMethod · 0.45
iterMethod · 0.45
containsMethod · 0.45
as_strMethod · 0.45

Tested by

no test coverage detected