Files
iron-arc/app/test/widget_test.dart
T

32 lines
661 B
Dart

import 'package:flutter_test/flutter_test.dart';
import 'package:iron_arc/src/game/iron_arc_game.dart';
void main() {
test('HudState compares by value', () {
const a = HudState(
turn: 1,
current: 0,
wind: 3,
hp0: 100,
hp1: 100,
phase: 0,
winner: 254,
aimAngle: 45,
aimPower: 0.6,
);
final b = HudState(
turn: a.turn,
current: a.current,
wind: a.wind,
hp0: a.hp0,
hp1: a.hp1,
phase: a.phase,
winner: a.winner,
aimAngle: a.aimAngle,
aimPower: a.aimPower,
);
expect(a, equals(b));
expect(a.hashCode, equals(b.hashCode));
});
}