blob: fdab05dec9873fa615d93b50e4e73e0ab475e164 [file] [log] [blame]
Avi Drissmane4622aa2022-09-08 20:36:061// Copyright 2013 The Chromium Authors
[email protected]5bcf3b72012-09-14 00:20:282// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
[email protected]5bcf3b72012-09-14 00:20:285#include <string>
6
Peter Kasting134ef9af2024-12-28 02:30:097#include "base/substring_set_matcher/matcher_string_pattern.h"
[email protected]5bcf3b72012-09-14 00:20:288#include "testing/gtest/include/gtest/gtest.h"
9
Steinar H. Gunderson5570febc2022-05-12 10:39:4810namespace base {
[email protected]5bcf3b72012-09-14 00:20:2811
Steinar H. Gundersonf8174932022-05-21 00:25:1712TEST(MatcherStringPatternTest, MatcherStringPattern) {
13 MatcherStringPattern r1("Test", 2);
[email protected]5bcf3b72012-09-14 00:20:2814 EXPECT_EQ("Test", r1.pattern());
Peter Kasting78549f32022-05-31 18:20:2015 EXPECT_EQ(2u, r1.id());
[email protected]5bcf3b72012-09-14 00:20:2816
17 EXPECT_FALSE(r1 < r1);
Steinar H. Gundersonf8174932022-05-21 00:25:1718 MatcherStringPattern r2("Test", 3);
[email protected]5bcf3b72012-09-14 00:20:2819 EXPECT_TRUE(r1 < r2);
Steinar H. Gundersonf8174932022-05-21 00:25:1720 MatcherStringPattern r3("ZZZZ", 2);
[email protected]5bcf3b72012-09-14 00:20:2821 EXPECT_TRUE(r1 < r3);
22}
[email protected]716c0162013-12-13 20:36:5323
Steinar H. Gunderson5570febc2022-05-12 10:39:4824} // namespace base