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

Unified Diff: runtime/vm/json_test.cc

Issue 2481873005: clang-format runtime/vm (Closed)
Patch Set: Merge Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/json_stream.cc ('k') | runtime/vm/kernel.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/json_test.cc
diff --git a/runtime/vm/json_test.cc b/runtime/vm/json_test.cc
index a0b27c207548b28773d5d1c25368375d0af6a38d..372ec2b5eb1a4942813b1548b08622958d8a251c 100644
--- a/runtime/vm/json_test.cc
+++ b/runtime/vm/json_test.cc
@@ -24,16 +24,12 @@ TEST_CASE(JSON_TextBuffer) {
TEST_CASE(JSON_JSONStream_Primitives) {
{
JSONStream js;
- {
- JSONObject jsobj(&js);
- }
+ { JSONObject jsobj(&js); }
EXPECT_STREQ("{}", js.ToCString());
}
{
JSONStream js;
- {
- JSONArray jsarr(&js);
- }
+ { JSONArray jsarr(&js); }
EXPECT_STREQ("[]", js.ToCString());
}
{
@@ -183,24 +179,25 @@ TEST_CASE(JSON_JSONStream_DartObject) {
}
char buffer[1024];
ElideJSONSubstring("classes", js.ToCString(), buffer);
- EXPECT_STREQ("[{\"type\":\"@Instance\","
- "\"_vmType\":\"null\","
- "\"class\":{\"type\":\"@Class\",\"fixedId\":true,\"id\":\"\","
- "\"name\":\"Null\"},"
- "\"kind\":\"Null\","
- "\"fixedId\":true,"
- "\"id\":\"objects\\/null\","
- "\"valueAsString\":\"null\"},"
- "{\"object_key\":"
- "{\"type\":\"@Instance\","
- "\"_vmType\":\"null\","
- "\"class\":{\"type\":\"@Class\",\"fixedId\":true,\"id\":\"\","
- "\"name\":\"Null\"},"
- "\"kind\":\"Null\","
- "\"fixedId\":true,"
- "\"id\":\"objects\\/null\","
- "\"valueAsString\":\"null\"}}]",
- buffer);
+ EXPECT_STREQ(
+ "[{\"type\":\"@Instance\","
+ "\"_vmType\":\"null\","
+ "\"class\":{\"type\":\"@Class\",\"fixedId\":true,\"id\":\"\","
+ "\"name\":\"Null\"},"
+ "\"kind\":\"Null\","
+ "\"fixedId\":true,"
+ "\"id\":\"objects\\/null\","
+ "\"valueAsString\":\"null\"},"
+ "{\"object_key\":"
+ "{\"type\":\"@Instance\","
+ "\"_vmType\":\"null\","
+ "\"class\":{\"type\":\"@Class\",\"fixedId\":true,\"id\":\"\","
+ "\"name\":\"Null\"},"
+ "\"kind\":\"Null\","
+ "\"fixedId\":true,"
+ "\"id\":\"objects\\/null\","
+ "\"valueAsString\":\"null\"}}]",
+ buffer);
}
TEST_CASE(JSON_JSONStream_EscapedString) {
@@ -338,16 +335,13 @@ TEST_CASE(JSON_JSONStream_AppendJSONStreamConsumer) {
const char* test_data = "{a, b, c},";
AppendJSONStreamConsumer(Dart_StreamConsumer_kData, "",
reinterpret_cast<const uint8_t*>(&test_data[0]),
- strlen(test_data),
- &js);
+ strlen(test_data), &js);
AppendJSONStreamConsumer(Dart_StreamConsumer_kData, "",
reinterpret_cast<const uint8_t*>(&test_data[0]),
- strlen(test_data),
- &js);
+ strlen(test_data), &js);
AppendJSONStreamConsumer(Dart_StreamConsumer_kData, "",
reinterpret_cast<const uint8_t*>(&test_data[0]),
- strlen(test_data) - 1,
- &js);
+ strlen(test_data) - 1, &js);
}
}
« no previous file with comments | « runtime/vm/json_stream.cc ('k') | runtime/vm/kernel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698