From 2881a88fb23a89cc826796514b3df24f8791d45a Mon Sep 17 00:00:00 2001 From: Matan Lurey Date: Sat, 8 Jul 2017 07:09:06 -0700 Subject: [PATCH] Add a test for no outputs. --- test/builder_test.dart | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/builder_test.dart b/test/builder_test.dart index 234d1ab5..23fda30f 100644 --- a/test/builder_test.dart +++ b/test/builder_test.dart @@ -75,6 +75,13 @@ void main() { throwsA(const isInstanceOf())); }); + test('Does not fail when there is no output', () async { + var sources = _createPackageStub(pkgName, testLibContent: 'class A {}'); + var builder = + new GeneratorBuilder([new CommentGenerator(forClasses: false)]); + await testBuilder(builder, sources, outputs: {}); + }); + test('Allow no "library" when requireLibraryDirective=false', () async { var sources = _createPackageStub(pkgName, testLibContent: 'class A {}'); var builder = new GeneratorBuilder([const CommentGenerator()],