1 | //===-- Tests for Test Filter functionality -------------------------------===// |
2 | // |
3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
4 | // See https://llvm.org/LICENSE.txt for license information. |
5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
6 | // |
7 | //===----------------------------------------------------------------------===// |
8 | |
9 | #include "test/UnitTest/LibcTest.h" |
10 | |
11 | TEST(LlvmLibcTestFilterTest, CorrectFilter) {} |
12 | |
13 | TEST(LlvmLibcTestFilterTest, CorrectFilter2) {} |
14 | |
15 | TEST(LlvmLibcTestFilterTest, IncorrectFilter) {} |
16 | |
17 | TEST(LlvmLibcTestFilterTest, NoFilter) {} |
18 | |
19 | TEST(LlvmLibcTestFilterTest, CheckCorrectFilter) { |
20 | ASSERT_EQ(LIBC_NAMESPACE::testing::Test::runTests( |
21 | "LlvmLibcTestFilterTest.NoFilter" ), |
22 | 0); |
23 | ASSERT_EQ(LIBC_NAMESPACE::testing::Test::runTests( |
24 | "LlvmLibcTestFilterTest.IncorrFilter" ), |
25 | 1); |
26 | ASSERT_EQ(LIBC_NAMESPACE::testing::Test::runTests( |
27 | "LlvmLibcTestFilterTest.CorrectFilter" ), |
28 | 0); |
29 | ASSERT_EQ(LIBC_NAMESPACE::testing::Test::runTests( |
30 | "LlvmLibcTestFilterTest.CorrectFilter2" ), |
31 | 0); |
32 | } |
33 | |
34 | int main() { |
35 | LIBC_NAMESPACE::testing::Test::runTests( |
36 | "LlvmLibcTestFilterTest.CheckCorrectFilter" ); |
37 | return 0; |
38 | } |
39 | |