mirror of
https://github.com/flame-engine/flame.git
synced 2025-11-03 04:18:25 +08:00
26 lines
508 B
Dart
26 lines
508 B
Dart
import 'package:flame_test/flame_test.dart';
|
|
import 'package:test/test.dart';
|
|
|
|
void main() {
|
|
group('failsAssert', () {
|
|
test('without message', () {
|
|
expect(
|
|
() {
|
|
// ignore: prefer_asserts_with_message
|
|
assert(2 + 2 == 5);
|
|
},
|
|
failsAssert(),
|
|
);
|
|
});
|
|
|
|
test('with message', () {
|
|
expect(
|
|
() {
|
|
assert(2 + 2 == 5, 'Basic arithmetic error');
|
|
},
|
|
failsAssert('Basic arithmetic error'),
|
|
);
|
|
});
|
|
});
|
|
}
|