#include "flutter/tools/licenses_cpp/src/filter.h"
#include "gtest/gtest.h"
#include <sstream>
Go to the source code of this file.
|
| | TEST (FilterTest, Simple) |
| |
| | TEST (FilterTest, Comments) |
| |
◆ TEST() [1/2]
| TEST |
( |
FilterTest |
, |
|
|
Comments |
|
|
) |
| |
Definition at line 21 of file filter_unittests.cc.
21 {
22 std::stringstream ss;
23 ss << ".*\\.dart" << std::endl;
24 ss << "# hello!" << std::endl;
25 ss << ".*\\.cc" << std::endl;
26
28 ASSERT_TRUE(filter.ok());
29 EXPECT_TRUE(filter->Matches("foo/bar/baz.dart"));
30 EXPECT_TRUE(filter->Matches("foo/bar/baz.cc"));
31 EXPECT_FALSE(filter->Matches("foo/bar/baz.txt"));
32}
static absl::StatusOr< Filter > Open(std::string_view path)
References Filter::Open().
◆ TEST() [2/2]
| TEST |
( |
FilterTest |
, |
|
|
Simple |
|
|
) |
| |
Definition at line 9 of file filter_unittests.cc.
9 {
10 std::stringstream ss;
11 ss << ".*\\.dart" << std::endl;
12 ss << ".*\\.cc" << std::endl;
13
15 ASSERT_TRUE(filter.ok());
16 EXPECT_TRUE(filter->Matches("foo/bar/baz.dart"));
17 EXPECT_TRUE(filter->Matches("foo/bar/baz.cc"));
18 EXPECT_FALSE(filter->Matches("foo/bar/baz.txt"));
19}
References Filter::Open().