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

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

Issue 1574213005: Report missing semicolons after function declarations (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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
« no previous file with comments | « runtime/vm/class_finalizer.cc ('k') | runtime/vm/flow_graph_builder.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 // 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 "bin/builtin.h" 5 #include "bin/builtin.h"
6 #include "include/dart_api.h" 6 #include "include/dart_api.h"
7 #include "include/dart_mirrors_api.h" 7 #include "include/dart_mirrors_api.h"
8 #include "include/dart_native_api.h" 8 #include "include/dart_native_api.h"
9 #include "include/dart_tools_api.h" 9 #include "include/dart_tools_api.h"
10 #include "platform/assert.h" 10 #include "platform/assert.h"
(...skipping 6744 matching lines...) Expand 10 before | Expand all | Expand 10 after
6755 bool* auto_setup_scope) { 6755 bool* auto_setup_scope) {
6756 ASSERT(auto_setup_scope != NULL); 6756 ASSERT(auto_setup_scope != NULL);
6757 *auto_setup_scope = false; 6757 *auto_setup_scope = false;
6758 return &MyNativeFunction2; 6758 return &MyNativeFunction2;
6759 } 6759 }
6760 6760
6761 6761
6762 TEST_CASE(SetNativeResolver) { 6762 TEST_CASE(SetNativeResolver) {
6763 const char* kScriptChars = 6763 const char* kScriptChars =
6764 "class Test {" 6764 "class Test {"
6765 " static foo() native \"SomeNativeFunction\";" 6765 " static foo() native \"SomeNativeFunction\";\n"
6766 " static bar() native \"SomeNativeFunction2\";" 6766 " static bar() native \"SomeNativeFunction2\";\n"
6767 " static baz() native \"SomeNativeFunction3\";" 6767 " static baz() native \"SomeNativeFunction3\";\n"
6768 "}"; 6768 "}";
6769 Dart_Handle error = Dart_NewApiError("incoming error"); 6769 Dart_Handle error = Dart_NewApiError("incoming error");
6770 Dart_Handle result; 6770 Dart_Handle result;
6771 6771
6772 // Load a test script. 6772 // Load a test script.
6773 Dart_Handle url = NewString(TestCase::url()); 6773 Dart_Handle url = NewString(TestCase::url());
6774 Dart_Handle source = NewString(kScriptChars); 6774 Dart_Handle source = NewString(kScriptChars);
6775 result = Dart_SetLibraryTagHandler(library_handler); 6775 result = Dart_SetLibraryTagHandler(library_handler);
6776 EXPECT_VALID(result); 6776 EXPECT_VALID(result);
6777 Dart_Handle lib = Dart_LoadScript(url, source, 0, 0); 6777 Dart_Handle lib = Dart_LoadScript(url, source, 0, 0);
(...skipping 2808 matching lines...) Expand 10 before | Expand all | Expand 10 after
9586 EXPECT_SUBSTRING("\"cat\":\"Compiler\"", buffer); 9586 EXPECT_SUBSTRING("\"cat\":\"Compiler\"", buffer);
9587 EXPECT_SUBSTRING("\"name\":\"CompileFunction\"", buffer); 9587 EXPECT_SUBSTRING("\"name\":\"CompileFunction\"", buffer);
9588 EXPECT_SUBSTRING("\"function\":\"::_main\"", buffer); 9588 EXPECT_SUBSTRING("\"function\":\"::_main\"", buffer);
9589 9589
9590 // Heartbeat test for new events. 9590 // Heartbeat test for new events.
9591 EXPECT_SUBSTRING("\"name\":\"TestVMDuration2\"", buffer); 9591 EXPECT_SUBSTRING("\"name\":\"TestVMDuration2\"", buffer);
9592 EXPECT_SUBSTRING("\"function\":\"::_bar\"", buffer); 9592 EXPECT_SUBSTRING("\"function\":\"::_bar\"", buffer);
9593 } 9593 }
9594 9594
9595 } // namespace dart 9595 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/class_finalizer.cc ('k') | runtime/vm/flow_graph_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698