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

Unified Diff: runtime/vm/dart_api_impl_test.cc

Issue 11411271: Remove support for interfaces. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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/dart_api_impl.cc ('k') | runtime/vm/flow_graph_compiler_ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/dart_api_impl_test.cc
===================================================================
--- runtime/vm/dart_api_impl_test.cc (revision 15556)
+++ runtime/vm/dart_api_impl_test.cc (working copy)
@@ -2379,16 +2379,16 @@
"class 'SomeClass' is not a function-type class.");
}
-#define CHECK_INTERFACE(handle, name) \
- { \
- Dart_Handle tmp = (handle); \
- EXPECT_VALID(tmp); \
- EXPECT(Dart_IsInterface(tmp)); \
- Dart_Handle intf_name = Dart_ClassName(tmp); \
- EXPECT_VALID(intf_name); \
- const char* intf_name_cstr = ""; \
- EXPECT_VALID(Dart_StringToCString(intf_name, &intf_name_cstr)); \
- EXPECT_STREQ((name), intf_name_cstr); \
+#define CHECK_ABSTRACT_CLASS(handle, name) \
+ { \
+ Dart_Handle tmp = (handle); \
+ EXPECT_VALID(tmp); \
+ EXPECT(Dart_IsAbstractClass(tmp)); \
+ Dart_Handle intf_name = Dart_ClassName(tmp); \
+ EXPECT_VALID(intf_name); \
+ const char* intf_name_cstr = ""; \
+ EXPECT_VALID(Dart_StringToCString(intf_name, &intf_name_cstr)); \
+ EXPECT_STREQ((name), intf_name_cstr); \
}
@@ -2403,10 +2403,10 @@
"class MyClass2 implements MyInterface0, MyInterface1 {\n"
"}\n"
"\n"
- "interface MyInterface0 {\n"
+ "abstract class MyInterface0 {\n"
"}\n"
"\n"
- "interface MyInterface1 extends MyInterface0 {\n"
+ "abstract class MyInterface1 implements MyInterface0 {\n"
"}\n";
Dart_Handle lib = TestCase::LoadTestScript(kScriptChars, NULL);
@@ -2426,7 +2426,7 @@
len = -1;
EXPECT_VALID(Dart_ClassGetInterfaceCount(cls1, &len));
EXPECT_EQ(1, len);
- CHECK_INTERFACE(Dart_ClassGetInterfaceAt(cls1, 0), "MyInterface1");
+ CHECK_ABSTRACT_CLASS(Dart_ClassGetInterfaceAt(cls1, 0), "MyInterface1");
EXPECT_ERROR(Dart_ClassGetInterfaceAt(cls1, -1),
"Dart_ClassGetInterfaceAt: argument 'index' out of bounds");
@@ -2438,8 +2438,8 @@
EXPECT_EQ(2, len);
// TODO(turnidge): The test relies on the ordering here. Sort this.
- CHECK_INTERFACE(Dart_ClassGetInterfaceAt(cls2, 0), "MyInterface0");
- CHECK_INTERFACE(Dart_ClassGetInterfaceAt(cls2, 1), "MyInterface1");
+ CHECK_ABSTRACT_CLASS(Dart_ClassGetInterfaceAt(cls2, 0), "MyInterface0");
+ CHECK_ABSTRACT_CLASS(Dart_ClassGetInterfaceAt(cls2, 1), "MyInterface1");
len = -1;
EXPECT_VALID(Dart_ClassGetInterfaceCount(intf0, &len));
@@ -2448,7 +2448,7 @@
len = -1;
EXPECT_VALID(Dart_ClassGetInterfaceCount(intf1, &len));
EXPECT_EQ(1, len);
- CHECK_INTERFACE(Dart_ClassGetInterfaceAt(intf1, 0), "MyInterface0");
+ CHECK_ABSTRACT_CLASS(Dart_ClassGetInterfaceAt(intf1, 0), "MyInterface0");
// Error cases.
EXPECT_ERROR(Dart_ClassGetInterfaceCount(Dart_True(), &len),
« no previous file with comments | « runtime/vm/dart_api_impl.cc ('k') | runtime/vm/flow_graph_compiler_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698