source_gen_test 0.1.0+3 copy "source_gen_test: ^0.1.0+3" to clipboard
source_gen_test: ^0.1.0+3 copied to clipboard

outdated

Test support for the source_gen package. Includes helpers to make it easy to validate both success and failure cases.

example/example.dart

import 'dart:async';

import 'package:source_gen_test/src/build_log_tracking.dart';
import 'package:source_gen_test/src/init_library_reader.dart';
import 'package:source_gen_test/src/test_annotated_classes.dart';

import 'example_generator.dart';
import 'src/example_annotation.dart';

Future<void> main() async {
  final reader = await initializeLibraryReaderForDirectory(
      'example/src', 'example_test_src.dart');

  initializeBuildLogTracking();
  testAnnotatedElements<ExampleAnnotation>(
    reader,
    const ExampleGenerator(),
    additionalGenerators: const {
      'no-prefix-required': ExampleGenerator(requireTestClassPrefix: false)
    },
  );
}
11
likes
0
pub points
67%
popularity

Publisher

verified publisherj832.com

Test support for the source_gen package. Includes helpers to make it easy to validate both success and failure cases.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

analyzer, build, build_test, dart_style, meta, path, source_gen, test

More

Packages that depend on source_gen_test