blob: 4e5b8bc11a2086c2dfe9781855b9ddd6b78be04d [file] [log] [blame]
// Copyright (c) 2011, 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 = 2.9
library dynamic_check;
import "expect.dart";
checkTypeError(f()) {
Expect.throws(f, (e) => e is TypeError, "Type error should be thrown");
/// Check that dynamic error occurs. Dart specification (3rd Edition/June 12015)
/// does not specify what is 'dynamic erros'
/// (see ). So, for now,
/// this is a stub that checks that Error is thrown
checkDynamicError(f()) {
Expect.throws(f, (e) => e is Error, "Dynamic Error should be thrown");