blob: 9a4eeaa42b4643a68deabc3987e886a7aa79f2dd [file] [log] [blame]
// Copyright (c) 2014, 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.
@MirrorsUsed(symbols: 'foo')
import 'dart:mirrors';
import 'dart:async';
import 'package:expect/expect.dart';
class A {
noSuchMethod(Invocation invocation) {
return MirrorSystem.getName(invocation.memberName);
var lines = [];
capturePrint(Zone self, ZoneDelegate parent, Zone origin, line) {
runTests() {
// "foo" is in MirrorsUsed and should therefore always work.
Expect.equals("foo", new A().foo);
var barResult = new A().bar;
Expect.equals("bar", barResult); /// minif: ok
Expect.isTrue(lines.length == 1);
var line = lines.first;
Expect.isTrue(line.contains("Warning") &&
line.contains("bar") && /// minif: continued
main() {
zoneSpecification: new ZoneSpecification(print: capturePrint));