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

Side by Side Diff: tests/language/src/GetterClosureExecutionOrderTest.dart

Issue 8347035: Add a test for testing evaluation order of getters. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 9 years, 2 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 | « tests/language/language.status ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
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.
4 // Test that a getter is evaluated after the arguments, when a getter is
ahe 2011/10/19 10:59:15 Please add at least one empty line between the fil
ngeoffray 2011/10/19 13:03:41 Done.
5 // for invoking a method. See chapter 'Method Invocation' in specification.
6
7 var counter = 0;
8
9 get a() {
10 Expect.equals(1, counter);
11 counter++;
12 return (c) { };
13 }
14
15 b() {
16 Expect.equals(0, counter);
17 counter++;
18 return 1;
19 }
20
21 main() {
22 a(b());
23 Expect.equals(2, counter);
24 }
OLDNEW
« no previous file with comments | « tests/language/language.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698