Updated container
This commit is contained in:
parent
14a7b82616
commit
7809c72f03
2 changed files with 7 additions and 7 deletions
|
@ -8,9 +8,11 @@ const Reflectable contained = ContainedReflectable();
|
||||||
class ContainedReflectable extends Reflectable {
|
class ContainedReflectable extends Reflectable {
|
||||||
const ContainedReflectable()
|
const ContainedReflectable()
|
||||||
: super(
|
: super(
|
||||||
|
topLevelInvokeCapability,
|
||||||
typeAnnotationQuantifyCapability,
|
typeAnnotationQuantifyCapability,
|
||||||
superclassQuantifyCapability,
|
superclassQuantifyCapability,
|
||||||
instanceInvokeCapability,
|
instanceInvokeCapability,
|
||||||
|
libraryCapability,
|
||||||
invokingCapability,
|
invokingCapability,
|
||||||
newInstanceCapability,
|
newInstanceCapability,
|
||||||
reflectedTypeCapability,
|
reflectedTypeCapability,
|
||||||
|
|
|
@ -49,7 +49,7 @@ void testReflector(Reflector reflector) {
|
||||||
expect(blazikenMirror.getField('type').reflectee, blaziken.type);
|
expect(blazikenMirror.getField('type').reflectee, blaziken.type);
|
||||||
});
|
});
|
||||||
|
|
||||||
/*
|
/*
|
||||||
group('reflectFunction', () {
|
group('reflectFunction', () {
|
||||||
var mirror = reflector.reflectFunction(returnVoidFromAFunction);
|
var mirror = reflector.reflectFunction(returnVoidFromAFunction);
|
||||||
|
|
||||||
|
@ -73,8 +73,8 @@ void testReflector(Reflector reflector) {
|
||||||
expect(p?.annotations, isEmpty);
|
expect(p?.annotations, isEmpty);
|
||||||
expect(p?.type, reflector.reflectType(int));
|
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', () {
|
test('make on singleton type returns singleton', () {
|
||||||
expect(container.make(Pokemon), blaziken);
|
expect(container.make(Pokemon), blaziken);
|
||||||
|
@ -110,12 +110,10 @@ void testReflector(Reflector reflector) {
|
||||||
|
|
||||||
expect(kantoPokemonType.isAssignableTo(pokemonType), true);
|
expect(kantoPokemonType.isAssignableTo(pokemonType), true);
|
||||||
|
|
||||||
var a = container.reflector.reflectType(String);
|
|
||||||
|
|
||||||
expect(
|
expect(
|
||||||
kantoPokemonType
|
() => kantoPokemonType
|
||||||
.isAssignableTo(container.reflector.reflectType(String)),
|
.isAssignableTo(container.reflector.reflectType(String)),
|
||||||
false);
|
throwsUnsupportedError);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue