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

Side by Side Diff: runtime/vm/unit_test.h

Issue 8501034: Deal with unhandled exceptions the same way in all Dart api functions. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/snapshot_test.cc ('k') | runtime/vm/unit_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 // Test the Compiler::CompileScript functionality by checking the return 245 // Test the Compiler::CompileScript functionality by checking the return
246 // value to see if no parse errors were reported. 246 // value to see if no parse errors were reported.
247 static bool TestCompileScript(const Library& library, const Script& script); 247 static bool TestCompileScript(const Library& library, const Script& script);
248 248
249 // Test the Compiler::CompileFunction functionality by checking the return 249 // Test the Compiler::CompileFunction functionality by checking the return
250 // value to see if no parse errors were reported. 250 // value to see if no parse errors were reported.
251 static bool TestCompileFunction(const Function& function); 251 static bool TestCompileFunction(const Function& function);
252 }; 252 };
253 253
254 #define EXPECT_VALID(handle) \ 254 #define EXPECT_VALID(handle) \
255 if (!Dart_IsValid((handle))) { \ 255 if (Dart_IsError((handle))) { \
256 dart::Expect(__FILE__, __LINE__).Fail("invalid handle '%s':\n '%s'\n", \ 256 dart::Expect(__FILE__, __LINE__).Fail("invalid handle '%s':\n '%s'\n", \
257 #handle, Dart_GetError(handle)); \ 257 #handle, Dart_GetError(handle)); \
258 } 258 }
259 259
260 } // namespace dart 260 } // namespace dart
261 261
262 #endif // VM_UNIT_TEST_H_ 262 #endif // VM_UNIT_TEST_H_
OLDNEW
« no previous file with comments | « runtime/vm/snapshot_test.cc ('k') | runtime/vm/unit_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698