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

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

Issue 11363206: More function literal changes in tests. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 1 month 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/debugger_api_impl_test.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 "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 3205 matching lines...) Expand 10 before | Expand all | Expand 10 after
3216 " int fld1;\n" 3216 " int fld1;\n"
3217 " final int fld2;\n" 3217 " final int fld2;\n"
3218 " static int fld3;\n" 3218 " static int fld3;\n"
3219 " static const int fld4 = 10;\n" 3219 " static const int fld4 = 10;\n"
3220 "}\n" 3220 "}\n"
3221 "NativeFields testMain1() {\n" 3221 "NativeFields testMain1() {\n"
3222 " NativeFields obj = new NativeFields(10, 20);\n" 3222 " NativeFields obj = new NativeFields(10, 20);\n"
3223 " return obj;\n" 3223 " return obj;\n"
3224 "}\n" 3224 "}\n"
3225 "Function testMain2() {\n" 3225 "Function testMain2() {\n"
3226 " return function() {};\n" 3226 " return () {};\n"
3227 "}\n"; 3227 "}\n";
3228 Dart_Handle result; 3228 Dart_Handle result;
3229 DARTSCOPE_NOCHECKS(Isolate::Current()); 3229 DARTSCOPE_NOCHECKS(Isolate::Current());
3230 3230
3231 // Create a test library and Load up a test script in it. 3231 // Create a test library and Load up a test script in it.
3232 Dart_Handle lib = TestCase::LoadTestScript(kScriptChars, NULL); 3232 Dart_Handle lib = TestCase::LoadTestScript(kScriptChars, NULL);
3233 3233
3234 // Invoke a function which returns an object of type NativeFields. 3234 // Invoke a function which returns an object of type NativeFields.
3235 Dart_Handle retobj = Dart_Invoke(lib, NewString("testMain1"), 0, NULL); 3235 Dart_Handle retobj = Dart_Invoke(lib, NewString("testMain1"), 0, NULL);
3236 EXPECT_VALID(retobj); 3236 EXPECT_VALID(retobj);
(...skipping 3921 matching lines...) Expand 10 before | Expand all | Expand 10 after
7158 EXPECT(o2 == reinterpret_cast<void*>(&p2)); 7158 EXPECT(o2 == reinterpret_cast<void*>(&p2));
7159 } 7159 }
7160 Dart_ExitScope(); 7160 Dart_ExitScope();
7161 isolate->heap()->CollectGarbage(Heap::kOld); 7161 isolate->heap()->CollectGarbage(Heap::kOld);
7162 EXPECT_EQ(0, isolate->heap()->PeerCount()); 7162 EXPECT_EQ(0, isolate->heap()->PeerCount());
7163 } 7163 }
7164 7164
7165 #endif // defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64). 7165 #endif // defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64).
7166 7166
7167 } // namespace dart 7167 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/debugger_api_impl_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698