Simplifies a couple of tests that are failing in the compiler.
This doesn't actually fix anything, just makes a couple of tests simpler. These tests are meant to test the visibility of symbols in libraries, but there was some extra baggage in the test that might make it fail for unrelated reasons. BUG=5406175 Review URL: https://chromereviews.googleplex.com/3536017 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@118 260f80e4-7a28-3924-810f-c04153c831b5
This commit is contained in:
@@ -2,23 +2,11 @@
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
//
|
||||
// Symbols in libraries imported by the prefixed library should not be visible
|
||||
|
||||
#library("Prefix11NegativeTest.dart");
|
||||
#import("library12.dart", prefix:"lib12");
|
||||
|
||||
class Prefix11NegativeTest {
|
||||
static Test1() {
|
||||
// Symbols in libraries imported by the prefixed library should not be
|
||||
// visible here.
|
||||
var result = 0;
|
||||
var obj = new lib12.Library11(1);
|
||||
result = obj.fld;
|
||||
Expect.equals(1, result);
|
||||
result += obj.func();
|
||||
Expect.equals(4, result);
|
||||
}
|
||||
}
|
||||
|
||||
main() {
|
||||
Prefix11NegativeTest.Test1();
|
||||
var obj = new lib12.Library11(1); // Error, method should not be visible
|
||||
}
|
||||
|
||||
@@ -2,19 +2,11 @@
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
//
|
||||
// Symbols in libraries imported by the prefixed library should not be visible
|
||||
|
||||
#library("Prefix12NegativeTest.dart");
|
||||
#import("library12.dart", prefix:"lib12");
|
||||
|
||||
class Prefix12NegativeTest {
|
||||
static Test1() {
|
||||
// Symbols in libraries imported by the prefixed library should not be
|
||||
// visible here.
|
||||
var obj = lib12.top_level11;
|
||||
Expect.equals(100, obj);
|
||||
}
|
||||
}
|
||||
|
||||
main() {
|
||||
Prefix12NegativeTest.Test1();
|
||||
var obj = lib12.top_level11; // Error, variable should not be visible
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user