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

Unified Diff: runtime/vm/object_test.cc

Issue 1723733002: Simplify various name flavors in VM. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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
Index: runtime/vm/object_test.cc
diff --git a/runtime/vm/object_test.cc b/runtime/vm/object_test.cc
index ae009ec0be0c2c96ba9b749bc796ef52d42e5b40..2cdfc96c8f98330d2e1ad6ba8889446f2b842ced 100644
--- a/runtime/vm/object_test.cc
+++ b/runtime/vm/object_test.cc
@@ -4222,7 +4222,7 @@ VM_TEST_CASE(PrintJSONPrimitives) {
"{\"type\":\"@Instance\","
"\"_vmType\":\"Smi\","
"\"class\":{\"type\":\"@Class\",\"fixedId\":true,\"id\":\"\","
- "\"name\":\"_Smi\","
+ "\"name\":\"int\","
"\"_vmName\":\"\"},"
"\"kind\":\"Int\","
"\"fixedId\":true,"
@@ -4241,7 +4241,7 @@ VM_TEST_CASE(PrintJSONPrimitives) {
"{\"type\":\"@Instance\","
"\"_vmType\":\"Mint\","
"\"class\":{\"type\":\"@Class\",\"fixedId\":true,\"id\":\"\","
- "\"name\":\"_Mint\",\"_vmName\":\"\"},"
+ "\"name\":\"int\",\"_vmName\":\"\"},"
"\"kind\":\"Int\","
"\"id\":\"\",\"valueAsString\":\"-9223372036854775808\"}",
buffer);
@@ -4260,7 +4260,7 @@ VM_TEST_CASE(PrintJSONPrimitives) {
"{\"type\":\"@Instance\","
"\"_vmType\":\"Bigint\","
"\"class\":{\"type\":\"@Class\",\"fixedId\":true,\"id\":\"\","
- "\"name\":\"_Bigint\",\"_vmName\":\"\"},"
+ "\"name\":\"int\",\"_vmName\":\"\"},"
"\"kind\":\"Int\","
"\"id\":\"\",\"valueAsString\":\"44444444444444444444444444444444\"}",
buffer);
@@ -4277,7 +4277,7 @@ VM_TEST_CASE(PrintJSONPrimitives) {
"{\"type\":\"@Instance\","
"\"_vmType\":\"Double\","
"\"class\":{\"type\":\"@Class\",\"fixedId\":true,\"id\":\"\","
- "\"name\":\"_Double\",\"_vmName\":\"\"},"
+ "\"name\":\"double\",\"_vmName\":\"\"},"
"\"kind\":\"Double\","
"\"id\":\"\",\"valueAsString\":\"0.1234\"}",
buffer);
@@ -4294,7 +4294,7 @@ VM_TEST_CASE(PrintJSONPrimitives) {
"{\"type\":\"@Instance\","
"\"_vmType\":\"String\","
"\"class\":{\"type\":\"@Class\",\"fixedId\":true,\"id\":\"\","
- "\"name\":\"_OneByteString\",\"_vmName\":\"\"},"
+ "\"name\":\"String\",\"_vmName\":\"\"},"
"\"kind\":\"String\","
"\"id\":\"\",\"length\":2,\"valueAsString\":\"dw\"}",
buffer);
@@ -4311,7 +4311,7 @@ VM_TEST_CASE(PrintJSONPrimitives) {
"{\"type\":\"@Instance\","
"\"_vmType\":\"Array\","
"\"class\":{\"type\":\"@Class\",\"fixedId\":true,\"id\":\"\","
- "\"name\":\"_List\",\"_vmName\":\"\"},"
+ "\"name\":\"List\",\"_vmName\":\"\"},"
"\"kind\":\"List\","
"\"id\":\"\",\"length\":0}",
buffer);
@@ -4329,7 +4329,7 @@ VM_TEST_CASE(PrintJSONPrimitives) {
"{\"type\":\"@Instance\","
"\"_vmType\":\"GrowableObjectArray\","
"\"class\":{\"type\":\"@Class\",\"fixedId\":true,\"id\":\"\","
- "\"name\":\"_GrowableList\","
+ "\"name\":\"List\","
"\"_vmName\":\"\"},"
"\"kind\":\"List\","
"\"id\":\"\",\"length\":0}",
@@ -4692,7 +4692,7 @@ struct TestResult {
};
-VM_TEST_CASE(String_IdentifierPrettyName) {
+VM_TEST_CASE(String_ScrubName) {
TestResult tests[] = {
{"(dynamic, dynamic) => void", "(dynamic, dynamic) => void"},
{"_List@915557746", "_List"},
@@ -4712,7 +4712,7 @@ VM_TEST_CASE(String_IdentifierPrettyName) {
String& result = String::Handle();
for (size_t i = 0; i < ARRAY_SIZE(tests); i++) {
test = String::New(tests[i].in);
- result = String::IdentifierPrettyName(test);
+ result = String::ScrubName(test);
EXPECT_STREQ(tests[i].out, result.ToCString());
}
}

Powered by Google App Engine
This is Rietveld 408576698