Skip to content

Commit 774744a

Browse files
authored
Don't write runtimeType as test expectation. (#758)
1 parent d3448ba commit 774744a

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

source_gen/test/generator_for_annotation_test.dart

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,12 @@ $dartFormatWidth
161161
final builder = LibraryBuilder(
162162
_StubGenerator<Deprecated>(
163163
'Deprecated',
164-
directiveBehavior: (element) => '// ${element.runtimeType}',
164+
directiveBehavior: (element) => switch (element) {
165+
LibraryImport() => '// LibraryImport',
166+
LibraryExport() => '// LibraryExport',
167+
PartInclude() => '// PartInclude',
168+
_ => throw UnimplementedError('${element.runtimeType}')
169+
},
165170
elementBehavior: (element) => '// ${element.runtimeType}',
166171
),
167172
);
@@ -189,11 +194,11 @@ $dartFormatWidth
189194
// Generator: Deprecated
190195
// **************************************************************************
191196
192-
// LibraryImportElementImpl
197+
// LibraryImport
193198
194-
// LibraryExportElementImpl
199+
// LibraryExport
195200
196-
// PartElementImpl
201+
// PartInclude
197202
''',
198203
},
199204
);

0 commit comments

Comments
 (0)