OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2015, 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 // Dart test program to check that we can resolve unqualified identifiers |
| 5 |
| 6 // Import 'dart:typed_data' which internally imports 'dart:_internal'. |
| 7 import 'dart:typed_data'; |
| 8 |
| 9 import 'package:expect/expect.dart'; |
| 10 |
| 11 main() { |
| 12 bool exceptionCaught = false; |
| 13 try { |
| 14 // Attempt to access something in 'dart:_internal'. |
| 15 return ClassID.GetID(4); |
| 16 Expect.fail("Should have thrown an exception"); |
| 17 } catch (e) { |
| 18 exceptionCaught = true; |
| 19 } |
| 20 Expect.isTrue(exceptionCaught); |
| 21 } |
OLD | NEW |