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

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

Issue 10704216: Fix type checking of void type. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 5 months 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
OLDNEW
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 #include "include/dart_api.h" 5 #include "include/dart_api.h"
6 #include "platform/assert.h" 6 #include "platform/assert.h"
7 #include "platform/json.h" 7 #include "platform/json.h"
8 #include "platform/utils.h" 8 #include "platform/utils.h"
9 #include "vm/class_finalizer.h" 9 #include "vm/class_finalizer.h"
10 #include "vm/dart_api_impl.h" 10 #include "vm/dart_api_impl.h"
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 125
126 126
127 static Dart_NativeFunction PropagateError_native_lookup( 127 static Dart_NativeFunction PropagateError_native_lookup(
128 Dart_Handle name, int argument_count) { 128 Dart_Handle name, int argument_count) {
129 return reinterpret_cast<Dart_NativeFunction>(&PropagateErrorNative); 129 return reinterpret_cast<Dart_NativeFunction>(&PropagateErrorNative);
130 } 130 }
131 131
132 132
133 TEST_CASE(Dart_PropagateError) { 133 TEST_CASE(Dart_PropagateError) {
134 const char* kScriptChars = 134 const char* kScriptChars =
135 "void raiseCompileError() {\n" 135 "raiseCompileError() {\n"
136 " return badIdent;\n" 136 " return badIdent;\n"
137 "}\n" 137 "}\n"
138 "\n" 138 "\n"
139 "void throwException() {\n" 139 "void throwException() {\n"
140 " throw new Exception('myException');\n" 140 " throw new Exception('myException');\n"
141 "}\n" 141 "}\n"
142 "\n" 142 "\n"
143 "void nativeFunc(closure) native 'Test_nativeFunc';\n" 143 "void nativeFunc(closure) native 'Test_nativeFunc';\n"
144 "\n" 144 "\n"
145 "void Func1() {\n" 145 "void Func1() {\n"
(...skipping 6014 matching lines...) Expand 10 before | Expand all | Expand 10 after
6160 EXPECT_VALID(result); 6160 EXPECT_VALID(result);
6161 EXPECT(Dart_IsInteger(result)); 6161 EXPECT(Dart_IsInteger(result));
6162 int64_t value = 0; 6162 int64_t value = 0;
6163 EXPECT_VALID(Dart_IntegerToInt64(result, &value)); 6163 EXPECT_VALID(Dart_IntegerToInt64(result, &value));
6164 EXPECT_EQ(0, value); 6164 EXPECT_EQ(0, value);
6165 } 6165 }
6166 6166
6167 #endif // defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64). 6167 #endif // defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64).
6168 6168
6169 } // namespace dart 6169 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698