summaryrefslogtreecommitdiff
path: root/lib/sanitizer_common/tests
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sanitizer_common/tests')
-rw-r--r--lib/sanitizer_common/tests/sanitizer_flags_test.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/sanitizer_common/tests/sanitizer_flags_test.cc b/lib/sanitizer_common/tests/sanitizer_flags_test.cc
index 3e5d8381e..24a3f3d3c 100644
--- a/lib/sanitizer_common/tests/sanitizer_flags_test.cc
+++ b/lib/sanitizer_common/tests/sanitizer_flags_test.cc
@@ -47,6 +47,9 @@ void TestFlag(const char *start_value, const char *env,
parser.ParseString(env);
EXPECT_EQ(0, internal_strcmp(final_value, flag));
+
+ // Reporting unrecognized flags is needed to reset them.
+ ReportUnrecognizedFlags();
}
TEST(SanitizerCommon, BooleanFlags) {
@@ -97,6 +100,9 @@ static void TestTwoFlags(const char *env, bool expected_flag1,
EXPECT_EQ(expected_flag1, flag1);
EXPECT_EQ(0, internal_strcmp(flag2, expected_flag2));
+
+ // Reporting unrecognized flags is needed to reset them.
+ ReportUnrecognizedFlags();
}
TEST(SanitizerCommon, MultipleFlags) {