| Index: Source/platform/CommaDelimitedParserTest.cpp
|
| diff --git a/Source/platform/CommaDelimitedParserTest.cpp b/Source/platform/CommaDelimitedParserTest.cpp
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..b5f1e8778938b1699f4cc149532d6669e66e8fd3
|
| --- /dev/null
|
| +++ b/Source/platform/CommaDelimitedParserTest.cpp
|
| @@ -0,0 +1,32 @@
|
| +// Copyright 2015 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "config.h"
|
| +#include "CommaDelimitedParser.h"
|
| +
|
| +#include <gtest/gtest.h>
|
| +
|
| +namespace blink {
|
| +
|
| +TEST(CommaDelimitedParserTest, Basic)
|
| +{
|
| + {
|
| + CommaDelimitedParser parser("dpr, rw, whatever");
|
| + EXPECT_TRUE(parser.contains("dpr"));
|
| + EXPECT_TRUE(parser.contains("rw"));
|
| + EXPECT_TRUE(parser.contains("whatever"));
|
| + }
|
| + {
|
| + CommaDelimitedParser parser("dprw\t , fo\to");
|
| + EXPECT_FALSE(parser.contains("dpr"));
|
| + EXPECT_FALSE(parser.contains("rw"));
|
| + EXPECT_FALSE(parser.contains("whatever"));
|
| + EXPECT_TRUE(parser.contains("dprw"));
|
| + EXPECT_FALSE(parser.contains("foo"));
|
| + EXPECT_TRUE(parser.contains("fo\to"));
|
| + }
|
| +}
|
| +
|
| +} // namespace blink
|
| +
|
|
|