Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion move-mutator/src/operators/unary.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ impl MutationOperator for Unary {
let start = source[start..]
.find(|c: char| !c.is_whitespace())
.map_or(start, |i| start + i);
let end = self.loc.span().end().to_usize();
let end = start + 1;
let cur_op = &source[start..end];

// For unary operator mutations, we only need to replace the operator with a space (to ensure the same file length).
Expand Down
10 changes: 5 additions & 5 deletions move-mutator/tests/move-assets/same_names/report.txt.spec-exp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"killed": 1,
"mutants_alive_diffs": [],
"mutants_killed_diff": [
"--- original\n+++ modified\n@@ -1,6 +1,6 @@\n module TestAccount::Negation_main {\n fun neg_log(x: bool): bool {\n- !x\n+ \n }\n\n spec neg_log {\n"
"--- original\n+++ modified\n@@ -1,6 +1,6 @@\n module TestAccount::Negation_main {\n fun neg_log(x: bool): bool {\n- !x\n+ x\n }\n\n spec neg_log {\n"
]
}
],
Expand All @@ -18,7 +18,7 @@
"killed": 1,
"mutants_alive_diffs": [],
"mutants_killed_diff": [
"--- original\n+++ modified\n@@ -1,6 +1,6 @@\n module TestAccount::Negation_m1 {\n fun neg_log(x: bool): bool {\n- !x\n+ \n }\n\n spec neg_log {\n"
"--- original\n+++ modified\n@@ -1,6 +1,6 @@\n module TestAccount::Negation_m1 {\n fun neg_log(x: bool): bool {\n- !x\n+ x\n }\n\n spec neg_log {\n"
]
}
],
Expand All @@ -29,7 +29,7 @@
"killed": 1,
"mutants_alive_diffs": [],
"mutants_killed_diff": [
"--- original\n+++ modified\n@@ -1,6 +1,6 @@\n module TestAccount::Negation_m1_1 {\n fun neg_log(x: bool): bool {\n- !x\n+ \n }\n\n spec neg_log {\n"
"--- original\n+++ modified\n@@ -1,6 +1,6 @@\n module TestAccount::Negation_m1_1 {\n fun neg_log(x: bool): bool {\n- !x\n+ x\n }\n\n spec neg_log {\n"
]
}
],
Expand All @@ -40,10 +40,10 @@
"killed": 1,
"mutants_alive_diffs": [],
"mutants_killed_diff": [
"--- original\n+++ modified\n@@ -1,6 +1,6 @@\n module TestAccount::Negation_m2 {\n fun neg_log(x: bool): bool {\n- !x\n+ \n }\n\n spec neg_log {\n"
"--- original\n+++ modified\n@@ -1,6 +1,6 @@\n module TestAccount::Negation_m2 {\n fun neg_log(x: bool): bool {\n- !x\n+ x\n }\n\n spec neg_log {\n"
]
}
]
},
"package_dir": "/Users/karlomardesic/Workspace/move-spec-testing/move-mutator/tests/move-assets/same_names"
}
}
22 changes: 21 additions & 1 deletion move-mutator/tests/move-assets/simple/report.txt.mutation-exp
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,17 @@
]
}
],
"sources/Negation.move": [
{
"module_func": "Negation::neg_log",
"tested": 1,
"killed": 1,
"mutants_alive_diffs": [],
"mutants_killed_diff": [
"--- original\n+++ modified\n@@ -1,6 +1,6 @@\n module TestAccount::Negation {\n fun neg_log(x: bool): bool {\n- !x\n+ x\n }\n\n #[test]\n"
]
}
],
"sources/Operators.move": [
{
"module_func": "Operators::div",
Expand Down Expand Up @@ -231,6 +242,15 @@
"--- original\n+++ modified\n@@ -219,7 +219,7 @@\n }\n\n fun logical_and(x: bool, y: bool): bool {\n- x && y\n+ x || y\n }\n\n #[test]\n"
]
},
{
"module_func": "Operators::logical_not",
"tested": 1,
"killed": 1,
"mutants_alive_diffs": [],
"mutants_killed_diff": [
"--- original\n+++ modified\n@@ -231,7 +231,7 @@\n }\n\n fun logical_not(x: bool): bool {\n- !x\n+ x\n }\n\n #[test]\n"
]
},
{
"module_func": "Operators::logical_or",
"tested": 2,
Expand Down Expand Up @@ -568,5 +588,5 @@
}
]
},
"package_dir": "/home/jos/Projects/move-mutation-tools/move-mutator/tests/move-assets/simple"
"package_dir": "/Users/jos/Projects/move-mutation-tools/move-mutator/tests/move-assets/simple"
}