OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 // TODO(zra): Remove when tests are ready to enable. | 5 // TODO(zra): Remove when tests are ready to enable. |
6 #include "platform/globals.h" | 6 #include "platform/globals.h" |
7 #if !defined(TARGET_ARCH_ARM64) | 7 #if !defined(TARGET_ARCH_ARM64) |
8 | 8 |
9 #include "platform/assert.h" | 9 #include "platform/assert.h" |
10 #include "vm/class_finalizer.h" | 10 #include "vm/class_finalizer.h" |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 Dart_Invoke(lib, Dart_NewStringFromCString("makeObj"), 0, NULL); | 87 Dart_Invoke(lib, Dart_NewStringFromCString("makeObj"), 0, NULL); |
88 EXPECT(!Dart_IsNull(obj_handle)); | 88 EXPECT(!Dart_IsNull(obj_handle)); |
89 EXPECT(!Dart_IsError(obj_handle)); | 89 EXPECT(!Dart_IsError(obj_handle)); |
90 const Object& obj = Object::Handle(Api::UnwrapHandle(obj_handle)); | 90 const Object& obj = Object::Handle(Api::UnwrapHandle(obj_handle)); |
91 EXPECT(!obj.IsNull()); | 91 EXPECT(!obj.IsNull()); |
92 EXPECT(obj.IsInstance()); | 92 EXPECT(obj.IsInstance()); |
93 | 93 |
94 String& expr_text = String::Handle(); | 94 String& expr_text = String::Handle(); |
95 expr_text = String::New("apa + ' ${calc(10)}' + dot"); | 95 expr_text = String::New("apa + ' ${calc(10)}' + dot"); |
96 Object& val = Object::Handle(); | 96 Object& val = Object::Handle(); |
97 val = Instance::Cast(obj).Evaluate(expr_text); | 97 val = Instance::Cast(obj).Evaluate(expr_text, |
| 98 Array::empty_array(), |
| 99 Array::empty_array()); |
98 EXPECT(!val.IsNull()); | 100 EXPECT(!val.IsNull()); |
99 EXPECT(!val.IsError()); | 101 EXPECT(!val.IsError()); |
100 EXPECT(val.IsString()); | 102 EXPECT(val.IsString()); |
101 EXPECT_STREQ("Herr Nilsson 100.", val.ToCString()); | 103 EXPECT_STREQ("Herr Nilsson 100.", val.ToCString()); |
102 } | 104 } |
103 | 105 |
104 } // namespace dart | 106 } // namespace dart |
105 | 107 |
106 #endif // !defined(TARGET_ARCH_ARM64) | 108 #endif // !defined(TARGET_ARCH_ARM64) |
OLD | NEW |