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

Side by Side Diff: base/trace_event/trace_event_argument_unittest.cc

Issue 1466413002: Update gtest to 786564fa4a3c, switch to googlemock in gtest Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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
OLDNEW
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2014 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/trace_event/trace_event_argument.h" 5 #include "base/trace_event/trace_event_argument.h"
6 #include "base/values.h" 6 #include "base/values.h"
7 #include "testing/gtest/include/gtest/gtest.h" 7 #include "testing/gtest/googletest/include/gtest/gtest.h"
8 8
9 namespace base { 9 namespace base {
10 namespace trace_event { 10 namespace trace_event {
11 11
12 TEST(TraceEventArgumentTest, FlatDictionary) { 12 TEST(TraceEventArgumentTest, FlatDictionary) {
13 scoped_refptr<TracedValue> value = new TracedValue(); 13 scoped_refptr<TracedValue> value = new TracedValue();
14 value->SetInteger("int", 2014); 14 value->SetInteger("int", 2014);
15 value->SetDouble("double", 0.0); 15 value->SetDouble("double", 0.0);
16 value->SetBoolean("bool", true); 16 value->SetBoolean("bool", true);
17 value->SetString("string", "string"); 17 value->SetString("string", "string");
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 nested_dict_value->SetInteger("f", 3); 150 nested_dict_value->SetInteger("f", 3);
151 nested_dict_value->BeginDictionary("g"); 151 nested_dict_value->BeginDictionary("g");
152 nested_dict_value->EndDictionary(); 152 nested_dict_value->EndDictionary();
153 json = ""; 153 json = "";
154 nested_dict_value->AppendAsTraceFormat(&json); 154 nested_dict_value->AppendAsTraceFormat(&json);
155 EXPECT_EQ("{\"b\":2,\"c\":[\"foo\"],\"f\":3,\"g\":{}}", json); 155 EXPECT_EQ("{\"b\":2,\"c\":[\"foo\"],\"f\":3,\"g\":{}}", json);
156 } 156 }
157 157
158 } // namespace trace_event 158 } // namespace trace_event
159 } // namespace base 159 } // namespace base
OLDNEW
« no previous file with comments | « base/trace_event/trace_config_unittest.cc ('k') | base/trace_event/trace_event_memory_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698