OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/values.h" | 5 #include "base/values.h" |
6 #include "chrome/common/json_schema_validator.h" | 6 #include "chrome/common/json_schema/json_schema_validator.h" |
7 #include "chrome/common/json_schema_validator_unittest_base.h" | 7 #include "chrome/common/json_schema/json_schema_validator_unittest_base.h" |
8 #include "testing/gtest/include/gtest/gtest.h" | 8 #include "testing/gtest/include/gtest/gtest.h" |
9 | 9 |
10 class JSONSchemaValidatorCPPTest : public JSONSchemaValidatorTestBase { | 10 class JSONSchemaValidatorCPPTest : public JSONSchemaValidatorTestBase { |
11 public: | 11 public: |
12 JSONSchemaValidatorCPPTest() | 12 JSONSchemaValidatorCPPTest() |
13 : JSONSchemaValidatorTestBase(JSONSchemaValidatorTestBase::CPP) { | 13 : JSONSchemaValidatorTestBase(JSONSchemaValidatorTestBase::CPP) { |
14 } | 14 } |
15 | 15 |
16 protected: | 16 protected: |
17 virtual void ExpectValid(const std::string& test_source, | 17 virtual void ExpectValid(const std::string& test_source, |
(...skipping 25 matching lines...) Expand all Loading... |
43 ASSERT_EQ(1u, validator.errors().size()) << test_source; | 43 ASSERT_EQ(1u, validator.errors().size()) << test_source; |
44 EXPECT_EQ(expected_error_path, validator.errors()[0].path) << test_source; | 44 EXPECT_EQ(expected_error_path, validator.errors()[0].path) << test_source; |
45 EXPECT_EQ(expected_error_message, validator.errors()[0].message) | 45 EXPECT_EQ(expected_error_message, validator.errors()[0].message) |
46 << test_source; | 46 << test_source; |
47 } | 47 } |
48 }; | 48 }; |
49 | 49 |
50 TEST_F(JSONSchemaValidatorCPPTest, Test) { | 50 TEST_F(JSONSchemaValidatorCPPTest, Test) { |
51 RunTests(); | 51 RunTests(); |
52 } | 52 } |
OLD | NEW |