| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 #ifndef VM_UNIT_TEST_H_ | 5 #ifndef VM_UNIT_TEST_H_ |
| 6 #define VM_UNIT_TEST_H_ | 6 #define VM_UNIT_TEST_H_ |
| 7 | 7 |
| 8 #include "include/dart_api.h" | 8 #include "include/dart_api.h" |
| 9 | 9 |
| 10 #include "vm/ast.h" | 10 #include "vm/ast.h" |
| (...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 public: | 242 public: |
| 243 // Test the Compiler::CompileScript functionality by checking the return | 243 // Test the Compiler::CompileScript functionality by checking the return |
| 244 // value to see if no parse errors were reported. | 244 // value to see if no parse errors were reported. |
| 245 static bool TestCompileScript(const Library& library, const Script& script); | 245 static bool TestCompileScript(const Library& library, const Script& script); |
| 246 | 246 |
| 247 // Test the Compiler::CompileFunction functionality by checking the return | 247 // Test the Compiler::CompileFunction functionality by checking the return |
| 248 // value to see if no parse errors were reported. | 248 // value to see if no parse errors were reported. |
| 249 static bool TestCompileFunction(const Function& function); | 249 static bool TestCompileFunction(const Function& function); |
| 250 }; | 250 }; |
| 251 | 251 |
| 252 #define EXPECT_VALID(handle) \ |
| 253 if (!Dart_IsValid((handle))) { \ |
| 254 dart::Expect(__FILE__, __LINE__).Fail("invalid handle '%s':\n '%s'\n", \ |
| 255 #handle, Dart_GetError(handle)); \ |
| 256 } |
| 257 |
| 252 } // namespace dart | 258 } // namespace dart |
| 253 | 259 |
| 254 #endif // VM_UNIT_TEST_H_ | 260 #endif // VM_UNIT_TEST_H_ |
| OLD | NEW |