Skip to content

Commit 3dd6989

Browse files
committed
Remove slow tests on 'well_tested' example tree
We now generate too many mutants on this tree and testing them all takes a while, 10s on a fast machine, which makes mutation testing on this tree also slow.
1 parent a5f275c commit 3dd6989

File tree

1 file changed

+0
-56
lines changed

1 file changed

+0
-56
lines changed

tests/main.rs

Lines changed: 0 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -315,62 +315,6 @@ fn proc_macro_tree_is_well_tested() {
315315
));
316316
}
317317

318-
#[test]
319-
fn well_tested_tree_finds_no_problems() {
320-
let tmp_src_dir = copy_of_testdata("well_tested");
321-
run()
322-
.arg("mutants")
323-
.args(["--no-times", "--caught", "--unviable", "--no-shuffle"])
324-
.current_dir(tmp_src_dir.path())
325-
.assert()
326-
.success()
327-
.stdout(predicate::function(|stdout: &str| {
328-
insta::assert_snapshot!(stdout);
329-
true
330-
}));
331-
assert!(tmp_src_dir
332-
.path()
333-
.join("mutants.out/outcomes.json")
334-
.exists());
335-
let outcomes_json =
336-
fs::read_to_string(tmp_src_dir.path().join("mutants.out/outcomes.json")).unwrap();
337-
let outcomes: serde_json::Value = outcomes_json.parse().unwrap();
338-
let caught = outcomes["caught"]
339-
.as_i64()
340-
.expect("outcomes['caught'] is an integer");
341-
assert!(caught > 40, "expected more outcomes caught than {caught}");
342-
assert_eq!(outcomes["unviable"], 0);
343-
assert_eq!(outcomes["missed"], 0);
344-
assert_eq!(outcomes["timeout"], 0);
345-
assert_eq!(outcomes["total_mutants"], outcomes["caught"]);
346-
check_text_list_output(tmp_src_dir.path(), "well_tested_tree_finds_no_problems");
347-
}
348-
349-
#[test]
350-
fn well_tested_tree_check_only() {
351-
let tmp_src_dir = copy_of_testdata("well_tested");
352-
run()
353-
.args(["mutants", "--check", "--no-shuffle", "--no-times"])
354-
.current_dir(tmp_src_dir.path())
355-
.assert()
356-
.success()
357-
.stdout(predicate::function(|stdout: &str| {
358-
insta::assert_snapshot!(stdout);
359-
true
360-
}));
361-
}
362-
363-
#[test]
364-
fn well_tested_tree_check_only_shuffled() {
365-
let tmp_src_dir = copy_of_testdata("well_tested");
366-
run()
367-
.args(["mutants", "--check", "--no-times", "--shuffle"])
368-
.current_dir(tmp_src_dir.path())
369-
.assert()
370-
.success();
371-
// Caution: No assertions about output here, we just check that it runs.
372-
}
373-
374318
#[test]
375319
fn integration_test_source_is_not_mutated() {
376320
let tmp_src_dir = copy_of_testdata("integration_tests");

0 commit comments

Comments
 (0)