Avi Drissman | e4622aa | 2022-09-08 20:36:06 | [diff] [blame] | 1 | // Copyright 2013 The Chromium Authors |
[email protected] | 5bcf3b7 | 2012-09-14 00:20:28 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
3 | // found in the LICENSE file. | ||||
4 | |||||
[email protected] | 5bcf3b7 | 2012-09-14 00:20:28 | [diff] [blame] | 5 | #include <string> |
6 | |||||
Peter Kasting | 134ef9af | 2024-12-28 02:30:09 | [diff] [blame] | 7 | #include "base/substring_set_matcher/matcher_string_pattern.h" |
[email protected] | 5bcf3b7 | 2012-09-14 00:20:28 | [diff] [blame] | 8 | #include "testing/gtest/include/gtest/gtest.h" |
9 | |||||
Steinar H. Gunderson | 5570febc | 2022-05-12 10:39:48 | [diff] [blame] | 10 | namespace base { |
[email protected] | 5bcf3b7 | 2012-09-14 00:20:28 | [diff] [blame] | 11 | |
Steinar H. Gunderson | f817493 | 2022-05-21 00:25:17 | [diff] [blame] | 12 | TEST(MatcherStringPatternTest, MatcherStringPattern) { |
13 | MatcherStringPattern r1("Test", 2); | ||||
[email protected] | 5bcf3b7 | 2012-09-14 00:20:28 | [diff] [blame] | 14 | EXPECT_EQ("Test", r1.pattern()); |
Peter Kasting | 78549f3 | 2022-05-31 18:20:20 | [diff] [blame] | 15 | EXPECT_EQ(2u, r1.id()); |
[email protected] | 5bcf3b7 | 2012-09-14 00:20:28 | [diff] [blame] | 16 | |
17 | EXPECT_FALSE(r1 < r1); | ||||
Steinar H. Gunderson | f817493 | 2022-05-21 00:25:17 | [diff] [blame] | 18 | MatcherStringPattern r2("Test", 3); |
[email protected] | 5bcf3b7 | 2012-09-14 00:20:28 | [diff] [blame] | 19 | EXPECT_TRUE(r1 < r2); |
Steinar H. Gunderson | f817493 | 2022-05-21 00:25:17 | [diff] [blame] | 20 | MatcherStringPattern r3("ZZZZ", 2); |
[email protected] | 5bcf3b7 | 2012-09-14 00:20:28 | [diff] [blame] | 21 | EXPECT_TRUE(r1 < r3); |
22 | } | ||||
[email protected] | 716c016 | 2013-12-13 20:36:53 | [diff] [blame] | 23 | |
Steinar H. Gunderson | 5570febc | 2022-05-12 10:39:48 | [diff] [blame] | 24 | } // namespace base |