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

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

Issue 11712002: Remove NoSuchMethodErrorImplementation class and use NoSuchMethodError from core (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 11 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 | « runtime/vm/bootstrap_natives.h ('k') | runtime/vm/flow_graph_builder.h » ('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 // 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 5763 matching lines...) Expand 10 before | Expand all | Expand 10 after
5774 Dart_Handle script_url = NewString("theScript"); 5774 Dart_Handle script_url = NewString("theScript");
5775 source = NewString(kScriptChars); 5775 source = NewString(kScriptChars);
5776 Dart_Handle test_script = Dart_LoadScript(script_url, source); 5776 Dart_Handle test_script = Dart_LoadScript(script_url, source);
5777 EXPECT_VALID(test_script); 5777 EXPECT_VALID(test_script);
5778 5778
5779 // Make sure that we can compile all of the patched code. 5779 // Make sure that we can compile all of the patched code.
5780 result = Dart_CompileAll(); 5780 result = Dart_CompileAll();
5781 EXPECT_VALID(result); 5781 EXPECT_VALID(result);
5782 5782
5783 result = Dart_Invoke(test_script, NewString("e1"), 0, NULL); 5783 result = Dart_Invoke(test_script, NewString("e1"), 0, NULL);
5784 EXPECT_ERROR(result, "No such method: 'unpatched'"); 5784 EXPECT_ERROR(result, "method not found: 'unpatched'");
5785 5785
5786 int64_t value = 0; 5786 int64_t value = 0;
5787 result = Dart_Invoke(test_script, NewString("m1"), 0, NULL); 5787 result = Dart_Invoke(test_script, NewString("m1"), 0, NULL);
5788 EXPECT_VALID(result); 5788 EXPECT_VALID(result);
5789 EXPECT(Dart_IsInteger(result)); 5789 EXPECT(Dart_IsInteger(result));
5790 EXPECT_VALID(Dart_IntegerToInt64(result, &value)); 5790 EXPECT_VALID(Dart_IntegerToInt64(result, &value));
5791 EXPECT_EQ(4, value); 5791 EXPECT_EQ(4, value);
5792 5792
5793 value = 0; 5793 value = 0;
5794 result = Dart_Invoke(test_script, NewString("m2"), 0, NULL); 5794 result = Dart_Invoke(test_script, NewString("m2"), 0, NULL);
(...skipping 1592 matching lines...) Expand 10 before | Expand all | Expand 10 after
7387 Dart_LoadSource(TestCase::lib(), url, source); 7387 Dart_LoadSource(TestCase::lib(), url, source);
7388 7388
7389 dart_args[0] = Dart_NewInteger(1); 7389 dart_args[0] = Dart_NewInteger(1);
7390 result = Dart_Invoke(lib1, NewString("start"), 1, dart_args); 7390 result = Dart_Invoke(lib1, NewString("start"), 1, dart_args);
7391 EXPECT_VALID(result); 7391 EXPECT_VALID(result);
7392 } 7392 }
7393 7393
7394 #endif // defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64). 7394 #endif // defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64).
7395 7395
7396 } // namespace dart 7396 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/bootstrap_natives.h ('k') | runtime/vm/flow_graph_builder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698