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

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

Issue 8588040: Add a mid-sized integration test for the Dart Embedding Api which (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 years 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/port_test.cc ('k') | runtime/vm/vm_sources.gypi » ('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 #include <stdio.h> 5 #include <stdio.h>
6 6
7 #include "vm/unit_test.h" 7 #include "vm/unit_test.h"
8 8
9 #include "vm/assembler.h" 9 #include "vm/assembler.h"
10 #include "vm/ast_printer.h" 10 #include "vm/ast_printer.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 } 74 }
75 return Dart_Error("unsupported url encountered %s", url_chars); 75 return Dart_Error("unsupported url encountered %s", url_chars);
76 } 76 }
77 77
78 78
79 Dart_Handle TestCase::LoadTestScript(const char* script, 79 Dart_Handle TestCase::LoadTestScript(const char* script,
80 Dart_NativeEntryResolver resolver) { 80 Dart_NativeEntryResolver resolver) {
81 Dart_Handle url = Dart_NewString(TestCase::url()); 81 Dart_Handle url = Dart_NewString(TestCase::url());
82 Dart_Handle source = Dart_NewString(script); 82 Dart_Handle source = Dart_NewString(script);
83 Dart_Handle lib = Dart_LoadScript(url, source, LibraryTagHandler); 83 Dart_Handle lib = Dart_LoadScript(url, source, LibraryTagHandler);
84 ASSERT(!Dart_IsError(lib)); 84 DART_CHECK_VALID(lib);
85 Dart_Handle result = Dart_SetNativeResolver(lib, resolver); 85 Dart_Handle result = Dart_SetNativeResolver(lib, resolver);
86 ASSERT(!Dart_IsError(result)); 86 DART_CHECK_VALID(result);
87 return lib; 87 return lib;
88 } 88 }
89 89
90 90
91 Dart_Handle TestCase::lib() { 91 Dart_Handle TestCase::lib() {
92 Dart_Handle url = Dart_NewString(TestCase::url()); 92 Dart_Handle url = Dart_NewString(TestCase::url());
93 Dart_Handle lib = Dart_LookupLibrary(url); 93 Dart_Handle lib = Dart_LookupLibrary(url);
94 ASSERT(!Dart_IsError(lib)); 94 DART_CHECK_VALID(lib);
95 ASSERT(Dart_IsLibrary(lib)); 95 ASSERT(Dart_IsLibrary(lib));
96 return lib; 96 return lib;
97 } 97 }
98 98
99 99
100 uword AssemblerTest::Assemble() { 100 uword AssemblerTest::Assemble() {
101 const Code& code = Code::Handle(Code::FinalizeCode(name_, assembler_)); 101 const Code& code = Code::Handle(Code::FinalizeCode(name_, assembler_));
102 if (FLAG_disassemble) { 102 if (FLAG_disassemble) {
103 OS::Print("Code for test '%s' {\n", name_); 103 OS::Print("Code for test '%s' {\n", name_);
104 const Instructions& instructions = 104 const Instructions& instructions =
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 Compiler::CompileFunction(function); 203 Compiler::CompileFunction(function);
204 retval = true; 204 retval = true;
205 } else { 205 } else {
206 retval = false; 206 retval = false;
207 } 207 }
208 isolate->set_long_jump_base(base); 208 isolate->set_long_jump_base(base);
209 return retval; 209 return retval;
210 } 210 }
211 211
212 } // namespace dart 212 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/port_test.cc ('k') | runtime/vm/vm_sources.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698