6f40403682
- Soon mojo embedder private packages will be imported with a 'dart:_' prefixes. - Add an explicit test of transitive private library access. This ensures that imports of 'dart:embedder_private_packages' cannot access anything imported within it. R=zra@google.com Review URL: https://codereview.chromium.org//1066613004 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45169 260f80e4-7a28-3924-810f-c04153c831b5
22 lines
697 B
Dart
22 lines
697 B
Dart
// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
|
|
// 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.
|
|
// Dart test program to check that we can resolve unqualified identifiers
|
|
|
|
// Import 'dart:typed_data' which internally imports 'dart:_internal'.
|
|
import 'dart:typed_data';
|
|
|
|
import 'package:expect/expect.dart';
|
|
|
|
main() {
|
|
bool exceptionCaught = false;
|
|
try {
|
|
// Attempt to access something in 'dart:_internal'.
|
|
return ClassID.GetID(4);
|
|
Expect.fail("Should have thrown an exception");
|
|
} catch (e) {
|
|
exceptionCaught = true;
|
|
}
|
|
Expect.isTrue(exceptionCaught);
|
|
}
|