|
|
@ -81,19 +81,15 @@ void main() {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
flameTester.test(
|
|
|
|
flameTester.test('new children', (game) async {
|
|
|
|
'loads children correctly',
|
|
|
|
|
|
|
|
(game) async {
|
|
|
|
|
|
|
|
final component = Component();
|
|
|
|
final component = Component();
|
|
|
|
final googleLetter = GoogleLetter(
|
|
|
|
final googleLetter = GoogleLetter(
|
|
|
|
1,
|
|
|
|
1,
|
|
|
|
children: [component],
|
|
|
|
children: [component],
|
|
|
|
);
|
|
|
|
);
|
|
|
|
await game.ensureAdd(googleLetter);
|
|
|
|
await game.ensureAdd(googleLetter);
|
|
|
|
|
|
|
|
expect(googleLetter.children, contains(component));
|
|
|
|
expect(googleLetter.children.contains(component), isTrue);
|
|
|
|
});
|
|
|
|
},
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
test('throws error when index out of range', () {
|
|
|
|
test('throws error when index out of range', () {
|
|
|
|
expect(() => GoogleLetter(-1), throwsA(isA<RangeError>()));
|
|
|
|
expect(() => GoogleLetter(-1), throwsA(isA<RangeError>()));
|
|
|
|