blob: 90d6f00a60af288e8e3e322b18843535bb9bd396 [file] [log] [blame]
// Copyright (c) 2016, 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.
/// @assertion AssertionError class
/// Error thrown by the runtime system when an assert statement fails.
/// Implements Error
/// @description Checks that when an assert statement fails, an AssertionError is
/// thrown.
/// Checks that AssertionError implements Error.
/// @author rodionov
import "../../../Utils/expect.dart";
main() {
if (assertStatementsEnabled) {
try {
assert(false);"AssertionError expected");
} on AssertionError catch (e) {
Expect.isTrue(e is Error);