anchor.diff:  class Customer { }
   ''';
   
  +const _testLibPartContentNoLibrary = r'''
  +part of 'test_lib.dart';
  +final int bar = 42;
  +class Customer { }
  +''';
  +
   const _testLibContentSyntaxError = r'''
   final int foo = 42
   ''';
  
positive.code:     );
    });
  
    test('Allow no "library"  by default', () async {
      final sources =
          _createPackageStub(testLibContent: _testLibContentNoLibrary);
      final builder = PartBuilder([const CommentGenerator()], '.foo.dart');
  
      await testBuilder(
        builder,
        sources,
        outputs: {'$_pkgName|lib/test_lib.foo.dart': _testGenNoLibrary},
      );
    });
  
    test('Does not fail when there is no output', () async {
      final sources = _createPackageStub(testLibContent: 'class A {}');
      final builder =
  
negative.code:     part 'test_lib.g.dart';
      ''',
        testLibPartContent: '''
      part of 'test_lib.dart';
      @deprecated
      int x;
      ''',
  