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

Unified Diff: test/cctest/test-traced-value.cc

Issue 2628463002: [tracing] Use locale independent writer for FP values. (Closed)
Patch Set: update test Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/tracing/traced-value.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-traced-value.cc
diff --git a/test/cctest/test-traced-value.cc b/test/cctest/test-traced-value.cc
index 5a8b9ab9c498bf3009d563f8b6f458d9b45275e2..1c3e7ac2522d7e37939ee0861889f5a1dcffb01a 100644
--- a/test/cctest/test-traced-value.cc
+++ b/test/cctest/test-traced-value.cc
@@ -16,7 +16,7 @@ TEST(FlatDictionary) {
std::string json = "PREFIX";
value->AppendAsTraceFormat(&json);
CHECK_EQ(
- "PREFIX{\"int\":2014,\"double\":0.000000,\"bool\":true,\"string\":"
+ "PREFIX{\"int\":2014,\"double\":0,\"bool\":true,\"string\":"
"\"string\"}",
json);
}
@@ -24,13 +24,13 @@ TEST(FlatDictionary) {
TEST(NoDotPathExpansion) {
auto value = TracedValue::Create();
value->SetInteger("in.t", 2014);
- value->SetDouble("doub.le", 0.0);
+ value->SetDouble("doub.le", -20.25);
value->SetBoolean("bo.ol", true);
value->SetString("str.ing", "str.ing");
std::string json;
value->AppendAsTraceFormat(&json);
CHECK_EQ(
- "{\"in.t\":2014,\"doub.le\":0.000000,\"bo.ol\":true,\"str.ing\":\"str."
+ "{\"in.t\":2014,\"doub.le\":-20.25,\"bo.ol\":true,\"str.ing\":\"str."
"ing\"}",
json);
}
@@ -46,6 +46,7 @@ TEST(Hierarchy) {
value->SetString("s1", "foo");
value->EndDictionary();
value->SetDouble("d0", 0.0);
+ value->SetDouble("d1", 10.5);
value->SetBoolean("b0", true);
value->BeginArray("a1");
value->AppendInteger(1);
@@ -69,8 +70,8 @@ TEST(Hierarchy) {
value->AppendAsTraceFormat(&json);
CHECK_EQ(
"{\"i0\":2014,\"dict1\":{\"i1\":2014,\"dict2\":{\"b2\":false},"
- "\"s1\":\"foo\"},\"d0\":0.000000,\"b0\":true,\"a1\":[1,true,{\"i2\":3}],"
- "\"s0\":\"foo\",\"arr1\":[{},[],{}]}",
+ "\"s1\":\"foo\"},\"d0\":0,\"d1\":10.5,\"b0\":true,\"a1\":[1,true,{\"i2\":"
+ "3}],\"s0\":\"foo\",\"arr1\":[{},[],{}]}",
json);
}
« no previous file with comments | « src/tracing/traced-value.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698