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

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

Issue 316016: Move the json-related files into a separate json directory. This hopefully al... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 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
« no previous file with comments | « base/json/json_writer.cc ('k') | base/json/string_escape.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:mergeinfo
Merged /branches/chrome_webkit_merge_branch/base/json_writer_unittest.cc:r69-2775
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/json/json_writer.h"
6 #include "base/values.h"
5 #include "testing/gtest/include/gtest/gtest.h" 7 #include "testing/gtest/include/gtest/gtest.h"
6 #include "base/json_writer.h" 8
7 #include "base/values.h" 9 namespace base {
8 10
9 TEST(JSONWriterTest, Writing) { 11 TEST(JSONWriterTest, Writing) {
10 // Test null 12 // Test null
11 Value* root = Value::CreateNullValue(); 13 Value* root = Value::CreateNullValue();
12 std::string output_js; 14 std::string output_js;
13 JSONWriter::Write(root, false, &output_js); 15 JSONWriter::Write(root, false, &output_js);
14 ASSERT_EQ("null", output_js); 16 ASSERT_EQ("null", output_js);
15 delete root; 17 delete root;
16 18
17 // Test empty dict 19 // Test empty dict
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 #define JSON_NEWLINE "\n" 70 #define JSON_NEWLINE "\n"
69 #endif 71 #endif
70 ASSERT_EQ("{" JSON_NEWLINE 72 ASSERT_EQ("{" JSON_NEWLINE
71 " \"list\": [ {" JSON_NEWLINE 73 " \"list\": [ {" JSON_NEWLINE
72 " \"inner int\": 10" JSON_NEWLINE 74 " \"inner int\": 10" JSON_NEWLINE
73 " }, [ ], true ]" JSON_NEWLINE 75 " }, [ ], true ]" JSON_NEWLINE
74 "}" JSON_NEWLINE, 76 "}" JSON_NEWLINE,
75 output_js); 77 output_js);
76 #undef JSON_NEWLINE 78 #undef JSON_NEWLINE
77 } 79 }
80
81 } // namespace base
OLDNEW
« no previous file with comments | « base/json/json_writer.cc ('k') | base/json/string_escape.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698