Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR DART

dart test expect assert fail

import 'package:test/test.dart';

void main() {
  test('assert throws assert', () {
    expect(() {
      assert(false);
    }, throwsA(isA<AssertionError>());
  });
}
Source by github.com #
 
PREVIOUS NEXT
Tagged: #dart #test #expect #assert #fail
ADD COMMENT
Topic
Name
6+4 =