Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename --coverage-report to --expected-coverage-report #5301

Merged
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
2 changes: 1 addition & 1 deletion Source/DafnyDriver/Commands/DeadCodeCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ static class DeadCodeCommand {
new Option[] {
GenerateTestsCommand.LoopUnroll,
GenerateTestsCommand.SequenceLengthLimit,
GenerateTestsCommand.CoverageReport,
GenerateTestsCommand.ExpectedCoverageReport,
GenerateTestsCommand.ForcePrune,
GenerateTestsCommand.PrintBpl,
BoogieOptionBag.SolverLog,
Expand Down
8 changes: 4 additions & 4 deletions Source/DafnyDriver/Commands/GenerateTestsCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public static IEnumerable<Option> Options {
BoogieOptionBag.SolverResourceLimit,
BoogieOptionBag.VerificationTimeLimit,
PrintBpl,
CoverageReport,
ExpectedCoverageReport,
CommonOptionBag.NoTimeStampForCoverageReport,
ForcePrune,
}.Concat(DafnyCommands.ConsoleOutputOptions.Except(new[] { CommonOptionBag.AllowWarnings }).ToList()).
Expand Down Expand Up @@ -133,7 +133,7 @@ internal static void PostProcess(DafnyOptions dafnyOptions, TestGenerationOption
"Print the Boogie code used during test generation.") {
ArgumentHelpName = "filename"
};
public static readonly Option<string> CoverageReport = new("--coverage-report",
public static readonly Option<string> ExpectedCoverageReport = new(new[] { "--expected-coverage-report", "--coverage-report" },
"Emit expected test coverage report to a given directory.") {
ArgumentHelpName = "directory"
};
Expand All @@ -149,7 +149,7 @@ static GenerateTestsCommand() {
DafnyOptions.RegisterLegacyBinding(PrintBpl, (options, value) => {
options.TestGenOptions.PrintBpl = value;
});
DafnyOptions.RegisterLegacyBinding(CoverageReport, (options, value) => {
DafnyOptions.RegisterLegacyBinding(ExpectedCoverageReport, (options, value) => {
options.TestGenOptions.CoverageReport = value;
});
DafnyOptions.RegisterLegacyBinding(ForcePrune, (options, value) => {
Expand All @@ -160,7 +160,7 @@ static GenerateTestsCommand() {
LoopUnroll,
SequenceLengthLimit,
PrintBpl,
CoverageReport,
ExpectedCoverageReport,
ForcePrune
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// RUN: %diff "%S/ProofDependencies.dfy_verification.html.expect" "%t/coverage_verification_actual.html"
// Expected test coverage:
// RUN: rm -rf "%t"/coverage_testing
// RUN: %baredafny generate-tests Block --no-timestamp-for-coverage-report --coverage-report "%t/coverage_testing" %s
// RUN: %baredafny generate-tests Block --no-timestamp-for-coverage-report --expected-coverage-report "%t/coverage_testing" %s
// RUN: %sed 's/<h1 hidden.*//' "%t"/coverage_testing/ProofDependencies.dfy_tests_expected.html > "%t"/coverage_testing_actual.html
// RUN: %diff "%S/ProofDependencies.dfy_tests_expected.html.expect" "%t/coverage_testing_actual.html"
// Combined coverage:
Expand Down
1 change: 1 addition & 0 deletions docs/dev/news/5301.fix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Rename the `dafny generate-tests` option `--coverage-report` to `--expected-coverage-report`