hegeltest_flutter 0.1.0 copy "hegeltest_flutter: ^0.1.0" to clipboard
hegeltest_flutter: ^0.1.0 copied to clipboard

Flutter integration for hegeltest — property-based testing powered by Hegel's native engine. Use with flutter_test instead of package:test.

hegeltest_flutter — Property-based testing for Flutter #

pub package CI license

Flutter integration for hegeltest — property-based testing powered by Hegel's native fuzzing engine.

Why this package? #

hegeltest depends on package:test. Flutter projects use flutter_test. This package bridges the gap by providing hegelFlutterTest() which uses flutter_test's test() function while giving you full access to all hegeltest generators.

Quick Start #

dev_dependencies:
  hegeltest_flutter: ^0.1.0
  flutter_test:
    sdk: flutter
import 'package:flutter_test/flutter_test.dart';
import 'package:hegeltest_flutter/hegeltest_flutter.dart';

void main() {
  hegelFlutterTest('reverse is involutory', (tc) {
    final xs = tc.draw(lists(integers()));
    expect(xs.reversed.toList().reversed.toList(), equals(xs));
  });
}

Run with:

flutter test

API #

hegelFlutterTest() accepts all the same parameters as hegelTest():

  • testCases — number of random inputs to try (default: 100)
  • seed — fixed seed for reproducibility
  • reproduce — replay a specific failure blob
  • config — HegelConfig for reusable settings
  • setUpEach / tearDownEach — per-iteration lifecycle hooks
  • All flutter_test parameters: timeout, tags, skip, retry

All generators from package:hegeltest are re-exported:

  • Primitives: integers(), doubles(), booleans(), bigIntegers()
  • Text: text(), fromRegex(), emails(), urls(), uuids()
  • Collections: lists(), sets(), maps()
  • Combinators: oneOf(), sampled(), nullable(), tuples2/3/4()
  • Temporal: dates(), times(), dateTimes()
  • Network: ipv4Addresses(), ipv6Addresses()
  • Bytes: bytes()

Platform Support #

Platform Status
macOS arm64 ✅
Linux x64 ✅
Linux arm64 ✅
Windows x64 ✅
Windows arm64 ✅
Web ❌ (throws UnsupportedError)

License #

BSD 3-Clause. See LICENSE.

0
likes
0
points
318
downloads

Publisher

verified publisherletstesttools.dev

Weekly Downloads

Flutter integration for hegeltest — property-based testing powered by Hegel's native engine. Use with flutter_test instead of package:test.

Homepage
Repository (GitHub)
View/report issues

Topics

#testing #property-based-testing #fuzzing #flutter

License

unknown (license)

Dependencies

flutter, flutter_test, hegeltest

More

Packages that depend on hegeltest_flutter