summaryrefslogtreecommitdiffstats
path: root/Tests/CompileFeatures/genex_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/CompileFeatures/genex_test.cpp')
-rw-r--r--Tests/CompileFeatures/genex_test.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/Tests/CompileFeatures/genex_test.cpp b/Tests/CompileFeatures/genex_test.cpp
index ca38883..4412569 100644
--- a/Tests/CompileFeatures/genex_test.cpp
+++ b/Tests/CompileFeatures/genex_test.cpp
@@ -1,6 +1,8 @@
#if !HAVE_OVERRIDE_CONTROL
+#if EXPECT_OVERRIDE_CONTROL
#error "Expect override control feature"
+#endif
#else
struct A
@@ -8,13 +10,24 @@ struct A
virtual int getA() { return 7; }
};
-struct B final : A
+struct B : A
{
int getA() override { return 42; }
};
#endif
+#if !HAVE_NULLPTR
+#error "Expect nullptr feature"
+#else
+
+const char* getString()
+{
+ return nullptr;
+}
+
+#endif
+
int main()
{