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

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

Issue 170313008: - Restore the better error message. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 10 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
« no previous file with comments | « no previous file | runtime/vm/parser.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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2
3 // 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
4 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
5 4
6 #include "bin/builtin.h" 5 #include "bin/builtin.h"
7 #include "include/dart_api.h" 6 #include "include/dart_api.h"
8 #include "include/dart_debugger_api.h" 7 #include "include/dart_debugger_api.h"
9 #include "include/dart_mirrors_api.h" 8 #include "include/dart_mirrors_api.h"
10 #include "include/dart_native_api.h" 9 #include "include/dart_native_api.h"
11 #include "platform/assert.h" 10 #include "platform/assert.h"
12 #include "platform/json.h" 11 #include "platform/json.h"
(...skipping 6084 matching lines...) Expand 10 before | Expand all | Expand 10 after
6097 EXPECT(Dart_IsInteger(result)); 6096 EXPECT(Dart_IsInteger(result));
6098 value = 0; 6097 value = 0;
6099 EXPECT_VALID(Dart_IntegerToInt64(result, &value)); 6098 EXPECT_VALID(Dart_IntegerToInt64(result, &value));
6100 EXPECT_EQ(123456, value); 6099 EXPECT_EQ(123456, value);
6101 6100
6102 // A NULL resolver is okay, but resolution will fail. 6101 // A NULL resolver is okay, but resolution will fail.
6103 result = Dart_SetNativeResolver(lib, NULL); 6102 result = Dart_SetNativeResolver(lib, NULL);
6104 EXPECT_VALID(result); 6103 EXPECT_VALID(result);
6105 6104
6106 EXPECT_ERROR(Dart_Invoke(type, NewString("baz"), 0, NULL), 6105 EXPECT_ERROR(Dart_Invoke(type, NewString("baz"), 0, NULL),
6107 "native function 'SomeNativeFunction3' cannot be found"); 6106 "native function 'SomeNativeFunction3' (0 arguments) "
6107 "cannot be found");
6108 } 6108 }
6109 6109
6110 6110
6111 // Test that an imported name does not clash with the same name defined 6111 // Test that an imported name does not clash with the same name defined
6112 // in the importing library. 6112 // in the importing library.
6113 TEST_CASE(ImportLibrary2) { 6113 TEST_CASE(ImportLibrary2) {
6114 const char* kScriptChars = 6114 const char* kScriptChars =
6115 "import 'library1_dart';\n" 6115 "import 'library1_dart';\n"
6116 "var foo;\n" 6116 "var foo;\n"
6117 "main() { foo = 0; }\n"; 6117 "main() { foo = 0; }\n";
(...skipping 1794 matching lines...) Expand 10 before | Expand all | Expand 10 after
7912 NewString("main"), 7912 NewString("main"),
7913 1, 7913 1,
7914 dart_args); 7914 dart_args);
7915 int64_t value = 0; 7915 int64_t value = 0;
7916 result = Dart_IntegerToInt64(result, &value); 7916 result = Dart_IntegerToInt64(result, &value);
7917 EXPECT_VALID(result); 7917 EXPECT_VALID(result);
7918 EXPECT_EQ(6, value); 7918 EXPECT_EQ(6, value);
7919 } 7919 }
7920 7920
7921 } // namespace dart 7921 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698