From 3046be77847ce54baae1d432dec224282dedcc16 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Sat, 24 Jan 2015 15:22:23 +0100 Subject: [PATCH 1/2] Features: Emit a test failure if 'override' is present but not expected --- Tests/CompileFeatures/genex_test.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Tests/CompileFeatures/genex_test.cpp b/Tests/CompileFeatures/genex_test.cpp index d9c8eec67..7919eb401 100644 --- a/Tests/CompileFeatures/genex_test.cpp +++ b/Tests/CompileFeatures/genex_test.cpp @@ -4,6 +4,9 @@ #error "Expect override control feature" #endif #else +#if !EXPECT_OVERRIDE_CONTROL +#error "Expect no override control feature" +#endif struct A { From 67e76e82df0fe8466b4bf65265d0c6b7f6046dfb Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 26 Jan 2015 14:25:22 -0500 Subject: [PATCH 2/2] Features: Fix test to reject missing expectation definitions Whenever feature support is added to a compiler, the CompileFeatures test needs to be updated to set expected availability of features. Add #error directives to ensure the test fails if expectations are not set. Suggested-by: Stephen Kelly --- Tests/CompileFeatures/genex_test.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Tests/CompileFeatures/genex_test.cpp b/Tests/CompileFeatures/genex_test.cpp index 7919eb401..2161bca49 100644 --- a/Tests/CompileFeatures/genex_test.cpp +++ b/Tests/CompileFeatures/genex_test.cpp @@ -1,3 +1,15 @@ +#ifndef EXPECT_FINAL +# error EXPECT_FINAL not defined +#endif +#ifndef EXPECT_INHERITING_CONSTRUCTORS +# error EXPECT_INHERITING_CONSTRUCTORS not defined +#endif +#ifndef EXPECT_INHERITING_CONSTRUCTORS_AND_FINAL +# error EXPECT_INHERITING_CONSTRUCTORS_AND_FINAL not defined +#endif +#ifndef EXPECT_OVERRIDE_CONTROL +# error EXPECT_OVERRIDE_CONTROL not defined +#endif #if !HAVE_OVERRIDE_CONTROL #if EXPECT_OVERRIDE_CONTROL