diff --git a/floor_generator/test/misc/extension/type_converter_element_extension_test.dart b/floor_generator/test/misc/extension/type_converter_element_extension_test.dart index d48b0d11..81557501 100644 --- a/floor_generator/test/misc/extension/type_converter_element_extension_test.dart +++ b/floor_generator/test/misc/extension/type_converter_element_extension_test.dart @@ -37,6 +37,19 @@ void main() { expect(actual, equals({expected})); }); + test('throws error when empty list in annotation', () async { + const typeConverterScope = TypeConverterScope.database; + final element = await ''' + @TypeConverters(null) + abstract class Foo {} + ''' + .asClassElement(); + + final actual = () => element.getTypeConverters(typeConverterScope); + + expect(actual, throwsUnresolvedAnnotationException()); + }); + test('throws error when empty list in annotation', () async { const typeConverterScope = TypeConverterScope.database; final element = await ''' diff --git a/floor_generator/test/test_utils.dart b/floor_generator/test/test_utils.dart index 5858f00d..33a700dc 100644 --- a/floor_generator/test/test_utils.dart +++ b/floor_generator/test/test_utils.dart @@ -157,6 +157,12 @@ Matcher throwsProcessorError([ } } +Matcher throwsUnresolvedAnnotationException() { + return throwsA(isA()); +} + + + Future createDao(final String methodSignature) async { final library = await resolveSource(''' library test;