[PATCH] D33344: [compiler-rt] Add negative test for boolean flags.
Vitaly Buka via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri May 19 15:50:39 PDT 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rL303462: [compiler-rt] Add negative test for boolean flags. (authored by vitalybuka).
Changed prior to commit:
https://reviews.llvm.org/D33344?vs=99514&id=99635#toc
Repository:
rL LLVM
https://reviews.llvm.org/D33344
Files:
compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_flags_test.cc
Index: compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_flags_test.cc
===================================================================
--- compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_flags_test.cc
+++ compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_flags_test.cc
@@ -59,6 +59,14 @@
TestFlag(true, "flag_name=0", false);
TestFlag(true, "flag_name=no", false);
TestFlag(true, "flag_name=false", false);
+
+ EXPECT_DEATH(TestFlag(false, "flag_name", true), "expected '='");
+ EXPECT_DEATH(TestFlag(false, "flag_name=", true),
+ "Invalid value for bool option: ''");
+ EXPECT_DEATH(TestFlag(false, "flag_name=2", true),
+ "Invalid value for bool option: '2'");
+ EXPECT_DEATH(TestFlag(false, "flag_name=-1", true),
+ "Invalid value for bool option: '-1'");
}
TEST(SanitizerCommon, IntFlags) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D33344.99635.patch
Type: text/x-patch
Size: 875 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170519/4188c9a4/attachment.bin>
More information about the llvm-commits
mailing list