Index: runtime/vm/dart_api_impl_test.cc |
diff --git a/runtime/vm/dart_api_impl_test.cc b/runtime/vm/dart_api_impl_test.cc |
index 67b2f8a4167c8731fe15330258e0f4b967e95ef9..73d9b197c2b686566c5d314d25aac466f93c9410 100644 |
--- a/runtime/vm/dart_api_impl_test.cc |
+++ b/runtime/vm/dart_api_impl_test.cc |
@@ -3919,6 +3919,15 @@ TEST_CASE(New) { |
EXPECT_VALID(Dart_IntegerToInt64(foo, &int_value)); |
EXPECT_EQ(7, int_value); |
+ // Allocate without a constructor. |
+ result = Dart_Allocate(cls); |
siva
2013/06/19 15:36:24
I think you may run into conflicts with my CL. I h
|
+ EXPECT_VALID(result); |
+ instanceof = false; |
+ EXPECT_VALID(Dart_ObjectIsType(result, cls, &instanceof)); |
+ EXPECT(instanceof); |
+ foo = Dart_GetField(result, NewString("foo")); |
+ EXPECT(Dart_IsNull(foo)); |
+ |
// Invoke the unnamed constructor with an empty string. |
result = Dart_New(cls, NewString(""), 0, NULL); |
EXPECT_VALID(result); |