aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2022-05-25 09:16:02 +0000
committerGitHub <noreply@github.com>2022-05-25 09:16:02 +0000
commit986e8e75f0f13d30bafa70fec0517f279501619f (patch)
tree840b6966a457be93a59a9b266a897476d118dd48 /gcc
parentbf6d540b1043bb944450dfe9da4c91124cdf31d3 (diff)
parent25ff27b9752aa6172cc3e87970b9fac4e4d06f19 (diff)
downloadgcc-986e8e75f0f13d30bafa70fec0517f279501619f.zip
gcc-986e8e75f0f13d30bafa70fec0517f279501619f.tar.gz
gcc-986e8e75f0f13d30bafa70fec0517f279501619f.tar.bz2
Merge #1276
1276: Wrapup testing code within CHECKING_P guards r=philberty a=philberty I seem to be having build issues locally with missing ASSERT macros but works when they are wrapped in CHECKING_P guards. Co-authored-by: Philip Herron <philip.herron@embecosm.com>
Diffstat (limited to 'gcc')
-rw-r--r--gcc/rust/util/rust-optional-test.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/rust/util/rust-optional-test.cc b/gcc/rust/util/rust-optional-test.cc
index 9045ac3..9d5b4ba 100644
--- a/gcc/rust/util/rust-optional-test.cc
+++ b/gcc/rust/util/rust-optional-test.cc
@@ -21,6 +21,8 @@
#include "config.h"
#include "selftest.h"
+#if CHECKING_P
+
static void
rust_optional_create ()
{
@@ -93,12 +95,17 @@ rust_optional_reference ()
ASSERT_EQ (opt->at (2), "gcc");
}
+#endif /* #if CHECKING_P */
+
void
rust_optional_test ()
{
+#if CHECKING_P
rust_optional_create ();
rust_optional_operators ();
rust_optional_take ();
rust_optional_map ();
rust_optional_reference ();
+
+#endif /* #if CHECKING_P */
}