Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(169)

Side by Side Diff: base/json/json_reader_unittest.cc

Issue 6714032: Move some files in base to base/memory. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: only base Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 "testing/gtest/include/gtest/gtest.h" 5 #include "testing/gtest/include/gtest/gtest.h"
6 #include "base/json/json_reader.h" 6 #include "base/json/json_reader.h"
7 #include "base/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/string_piece.h" 8 #include "base/string_piece.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "base/values.h" 10 #include "base/values.h"
11 #include "build/build_config.h" 11 #include "build/build_config.h"
12 12
13 namespace base { 13 namespace base {
14 14
15 TEST(JSONReaderTest, Reading) { 15 TEST(JSONReaderTest, Reading) {
16 // some whitespace checking 16 // some whitespace checking
17 scoped_ptr<Value> root; 17 scoped_ptr<Value> root;
(...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after
557 557
558 root.reset(JSONReader::ReadAndReturnError("[\"xxx\\q\"]", false, 558 root.reset(JSONReader::ReadAndReturnError("[\"xxx\\q\"]", false,
559 &error_code, &error_message)); 559 &error_code, &error_message));
560 EXPECT_FALSE(root.get()); 560 EXPECT_FALSE(root.get());
561 EXPECT_EQ(JSONReader::FormatErrorMessage(1, 7, JSONReader::kInvalidEscape), 561 EXPECT_EQ(JSONReader::FormatErrorMessage(1, 7, JSONReader::kInvalidEscape),
562 error_message); 562 error_message);
563 EXPECT_EQ(JSONReader::JSON_INVALID_ESCAPE, error_code); 563 EXPECT_EQ(JSONReader::JSON_INVALID_ESCAPE, error_code);
564 } 564 }
565 565
566 } // namespace base 566 } // namespace base
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698