📜  dart 测试期望断言失败 - Dart 代码示例

📅  最后修改于: 2022-03-11 14:48:04.390000             🧑  作者: Mango

代码示例1
import 'package:test/test.dart';

void main() {
  test('assert throws assert', () {
    expect(() {
      assert(false);
    }, throwsA(isA());
  });
}