From 7809c72f033b3e4ca19eb696680936896a27bc4e Mon Sep 17 00:00:00 2001 From: "thomashii@dukefirehawk.com" Date: Thu, 29 Dec 2022 00:25:55 +0800 Subject: [PATCH] Updated container --- .../lib/angel3_container_generator.dart | 2 ++ .../test/reflector_test.dart | 12 +++++------- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/container/angel_container_generator/lib/angel3_container_generator.dart b/packages/container/angel_container_generator/lib/angel3_container_generator.dart index aab909eb..9b2f3607 100644 --- a/packages/container/angel_container_generator/lib/angel3_container_generator.dart +++ b/packages/container/angel_container_generator/lib/angel3_container_generator.dart @@ -8,9 +8,11 @@ const Reflectable contained = ContainedReflectable(); class ContainedReflectable extends Reflectable { const ContainedReflectable() : super( + topLevelInvokeCapability, typeAnnotationQuantifyCapability, superclassQuantifyCapability, instanceInvokeCapability, + libraryCapability, invokingCapability, newInstanceCapability, reflectedTypeCapability, diff --git a/packages/container/angel_container_generator/test/reflector_test.dart b/packages/container/angel_container_generator/test/reflector_test.dart index 494504bd..e0ba0d70 100644 --- a/packages/container/angel_container_generator/test/reflector_test.dart +++ b/packages/container/angel_container_generator/test/reflector_test.dart @@ -49,7 +49,7 @@ void testReflector(Reflector reflector) { expect(blazikenMirror.getField('type').reflectee, blaziken.type); }); - /* +/* group('reflectFunction', () { var mirror = reflector.reflectFunction(returnVoidFromAFunction); @@ -73,8 +73,8 @@ void testReflector(Reflector reflector) { expect(p?.annotations, isEmpty); expect(p?.type, reflector.reflectType(int)); }); - }, skip: 'pkg:reflectable cannot reflect on closures at all (yet)'); - */ + }, skip: 'pkg:reflectable cannot reflect on closures at all (yet)'); +*/ test('make on singleton type returns singleton', () { expect(container.make(Pokemon), blaziken); @@ -110,12 +110,10 @@ void testReflector(Reflector reflector) { expect(kantoPokemonType.isAssignableTo(pokemonType), true); - var a = container.reflector.reflectType(String); - expect( - kantoPokemonType + () => kantoPokemonType .isAssignableTo(container.reflector.reflectType(String)), - false); + throwsUnsupportedError); }); }