blob: 6d6e536a1b65a7ac8b492a3eeb991f6f72792ea2 [file]
import 'package:checks/checks.dart';
import 'package:test/scaffolding.dart';
void main() {
test('has', () {
// This check succeeds.
check(RegExp('^abc')).has((r) => r.pattern, 'pattern').equals('^abc');
// This check fails.
check(RegExp('^abc')).has((r) => r.pattern, 'pattern').equals('^xyz');
// Expected: a RegExp that has pattern: '^xyz'
// Actual: a RegExp that has pattern: '^abc'
// Which: differs at offset 1:
// ^xyz
// ^abc
// ^
});
}