import 'package:test/test.dart';
import 'package:wolf_3d_dart/wolf_3d_data_types.dart';

void main() {
  group('DataVersion.fromChecksum', () {
    test('resolves all known checksum constants', () {
      for (final version in DataVersion.values.where(
        (version) => version != DataVersion.unknown,
      )) {
        expect(DataVersion.fromChecksum(version.checksum), version);
      }
    });

    test('returns unknown for unrecognized checksum', () {
      expect(
        DataVersion.fromChecksum('ffffffffffffffffffffffffffffffff'),
        DataVersion.unknown,
      );
    });
  });
}
