diff options
Diffstat (limited to '')
9 files changed, 41 insertions, 0 deletions
diff --git a/tests/ui/instrument-coverage/bad-value.bad.stderr b/tests/ui/instrument-coverage/bad-value.bad.stderr new file mode 100644 index 000000000..b867d169d --- /dev/null +++ b/tests/ui/instrument-coverage/bad-value.bad.stderr @@ -0,0 +1,2 @@ +error: incorrect value `bad-value` for codegen option `instrument-coverage` - `all` (default), `branch`, `except-unused-generics`, `except-unused-functions`, or `off` was expected + diff --git a/tests/ui/instrument-coverage/bad-value.blank.stderr b/tests/ui/instrument-coverage/bad-value.blank.stderr new file mode 100644 index 000000000..e7122fb61 --- /dev/null +++ b/tests/ui/instrument-coverage/bad-value.blank.stderr @@ -0,0 +1,2 @@ +error: incorrect value `` for codegen option `instrument-coverage` - `all` (default), `branch`, `except-unused-generics`, `except-unused-functions`, or `off` was expected + diff --git a/tests/ui/instrument-coverage/bad-value.rs b/tests/ui/instrument-coverage/bad-value.rs new file mode 100644 index 000000000..1925c36aa --- /dev/null +++ b/tests/ui/instrument-coverage/bad-value.rs @@ -0,0 +1,5 @@ +// revisions: blank bad +// [blank] compile-flags: -Cinstrument-coverage= +// [bad] compile-flags: -Cinstrument-coverage=bad-value + +fn main() {} diff --git a/tests/ui/instrument-coverage/off-values.rs b/tests/ui/instrument-coverage/off-values.rs new file mode 100644 index 000000000..0f9a0c474 --- /dev/null +++ b/tests/ui/instrument-coverage/off-values.rs @@ -0,0 +1,9 @@ +// check-pass +// revisions: n no off false zero +// [n] compile-flags: -Cinstrument-coverage=n +// [no] compile-flags: -Cinstrument-coverage=no +// [off] compile-flags: -Cinstrument-coverage=off +// [false] compile-flags: -Cinstrument-coverage=false +// [zero] compile-flags: -Cinstrument-coverage=0 + +fn main() {} diff --git a/tests/ui/instrument-coverage/on-values.rs b/tests/ui/instrument-coverage/on-values.rs new file mode 100644 index 000000000..cc54c71c6 --- /dev/null +++ b/tests/ui/instrument-coverage/on-values.rs @@ -0,0 +1,11 @@ +// check-pass +// needs-profiler-support +// revisions: default y yes on true all +// [default] compile-flags: -Cinstrument-coverage +// [y] compile-flags: -Cinstrument-coverage=y +// [yes] compile-flags: -Cinstrument-coverage=yes +// [on] compile-flags: -Cinstrument-coverage=on +// [true] compile-flags: -Cinstrument-coverage=true +// [all] compile-flags: -Cinstrument-coverage=all + +fn main() {} diff --git a/tests/ui/instrument-coverage/unstable.branch.stderr b/tests/ui/instrument-coverage/unstable.branch.stderr new file mode 100644 index 000000000..acc633a2a --- /dev/null +++ b/tests/ui/instrument-coverage/unstable.branch.stderr @@ -0,0 +1,2 @@ +error: `-C instrument-coverage=branch` and `-C instrument-coverage=except-*` require `-Z unstable-options` + diff --git a/tests/ui/instrument-coverage/unstable.except-unused-functions.stderr b/tests/ui/instrument-coverage/unstable.except-unused-functions.stderr new file mode 100644 index 000000000..acc633a2a --- /dev/null +++ b/tests/ui/instrument-coverage/unstable.except-unused-functions.stderr @@ -0,0 +1,2 @@ +error: `-C instrument-coverage=branch` and `-C instrument-coverage=except-*` require `-Z unstable-options` + diff --git a/tests/ui/instrument-coverage/unstable.except-unused-generics.stderr b/tests/ui/instrument-coverage/unstable.except-unused-generics.stderr new file mode 100644 index 000000000..acc633a2a --- /dev/null +++ b/tests/ui/instrument-coverage/unstable.except-unused-generics.stderr @@ -0,0 +1,2 @@ +error: `-C instrument-coverage=branch` and `-C instrument-coverage=except-*` require `-Z unstable-options` + diff --git a/tests/ui/instrument-coverage/unstable.rs b/tests/ui/instrument-coverage/unstable.rs new file mode 100644 index 000000000..c16bcd0bf --- /dev/null +++ b/tests/ui/instrument-coverage/unstable.rs @@ -0,0 +1,6 @@ +// revisions: branch except-unused-functions except-unused-generics +// [branch] compile-flags: -Cinstrument-coverage=branch +// [except-unused-functions] compile-flags: -Cinstrument-coverage=except-unused-functions +// [except-unused-generics] compile-flags: -Cinstrument-coverage=except-unused-generics + +fn main() {} |