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

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

Issue 8585028: Split PrivateMemberTest multi-test into separate tests. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove one test. Created 9 years 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
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 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 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 #library('PrivateMemberLibA'); 5 #library('PrivateMemberLibA');
6 6
7 #import('PrivateMemberLibB.dart'); 7 #import('PrivateMemberLibB.dart');
8 8
9 #source('PrivateMemberLibA.dart'); 9 class A {
10 int i;
11 int _instanceField;
12 static int _staticField;
13 int _fun1() { return 1; }
14 void _fun2(int i) { }
15 }
10 16
11 class Test extends B { 17 class Test extends B {
12 test() { 18 test() {
13 i = _private1; 19 i = _instanceField;
14 b = _private1; /// 01: compile-time error 20 i = _staticField;
15 i = _static1;
16 b = _static1; /// 02: compile-time error
17 i = _fun1(); 21 i = _fun1();
18 b = _fun1(); /// 03: compile-time error 22 _fun2(42);
19 _fun4(42);
20 _fun4(true); /// 04: compile-time error
21 } 23 }
22 } 24 }
23 25
24 void main() { 26 void main() {
25 new Test().test(); 27 new Test().test();
26 } 28 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698