MCPcopy Create free account
hub / github.com/ScriptedAlchemy/tracedecay / test_doctor_counters

Function test_doctor_counters

tests/agent_suite/agent_test.rs:5315–5339  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5313
5314#[test]
5315fn test_doctor_counters() {
5316 let mut dc = DoctorCounters::new();
5317 assert_eq!(dc.issues, 0);
5318 assert_eq!(dc.warnings, 0);
5319
5320 dc.pass("this is fine");
5321 assert_eq!(dc.issues, 0);
5322 assert_eq!(dc.warnings, 0);
5323
5324 dc.fail("something broke");
5325 assert_eq!(dc.issues, 1);
5326 assert_eq!(dc.warnings, 0);
5327
5328 dc.warn("be careful");
5329 assert_eq!(dc.issues, 1);
5330 assert_eq!(dc.warnings, 1);
5331
5332 dc.info("just info");
5333 assert_eq!(dc.issues, 1);
5334 assert_eq!(dc.warnings, 1);
5335
5336 dc.fail("another failure");
5337 assert_eq!(dc.issues, 2);
5338 assert_eq!(dc.warnings, 1);
5339}
5340
5341// ---------------------------------------------------------------------------
5342// 6. Helper function tests

Callers

nothing calls this directly

Calls 4

passMethod · 0.80
failMethod · 0.80
warnMethod · 0.80
infoMethod · 0.45

Tested by

no test coverage detected