summaryrefslogtreecommitdiffstats
path: root/tests/ui/instrument-coverage
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-07 05:48:48 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-07 05:48:48 +0000
commitef24de24a82fe681581cc130f342363c47c0969a (patch)
tree0d494f7e1a38b95c92426f58fe6eaa877303a86c /tests/ui/instrument-coverage
parentReleasing progress-linux version 1.74.1+dfsg1-1~progress7.99u1. (diff)
downloadrustc-ef24de24a82fe681581cc130f342363c47c0969a.tar.xz
rustc-ef24de24a82fe681581cc130f342363c47c0969a.zip
Merging upstream version 1.75.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--tests/ui/instrument-coverage/bad-value.bad.stderr2
-rw-r--r--tests/ui/instrument-coverage/bad-value.blank.stderr2
-rw-r--r--tests/ui/instrument-coverage/bad-value.rs5
-rw-r--r--tests/ui/instrument-coverage/off-values.rs9
-rw-r--r--tests/ui/instrument-coverage/on-values.rs11
-rw-r--r--tests/ui/instrument-coverage/unstable.branch.stderr2
-rw-r--r--tests/ui/instrument-coverage/unstable.except-unused-functions.stderr2
-rw-r--r--tests/ui/instrument-coverage/unstable.except-unused-generics.stderr2
-rw-r--r--tests/ui/instrument-coverage/unstable.rs6
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() {}