mirror of
https://github.com/zarzet/SpotiFLAC-Mobile.git
synced 2026-11-29 07:34:13 +01:00
Rename the Dart package, Android and iOS identifiers, Rust crates, native libraries, and Discord plugin. Preserve legacy data readers and compatibility aliases. Update localized branding, documentation, artwork, build tooling, and release artifacts. Route Telegram release notifications to @mornyeupdates and link @mornyecommunity.
40 lines
1.1 KiB
Dart
40 lines
1.1 KiB
Dart
import 'dart:convert';
|
|
import 'dart:io';
|
|
|
|
import 'package:flutter_test/flutter_test.dart';
|
|
import 'package:mornye/services/library_row_mapper.dart';
|
|
import 'package:mornye/utils/path_match_keys.dart';
|
|
|
|
void main() {
|
|
test(
|
|
'native library fixtures preserve production Dart row and path codecs',
|
|
() {
|
|
final fixture =
|
|
jsonDecode(
|
|
File(
|
|
'test/fixtures/native_library_contract.json',
|
|
).readAsStringSync(),
|
|
)
|
|
as Map<String, dynamic>;
|
|
for (final entry in fixture['rows'] as List) {
|
|
final value = entry as Map<String, dynamic>;
|
|
expect(
|
|
LibraryRowMapper.encode(
|
|
Map<String, dynamic>.from(value['input'] as Map),
|
|
sourceId: 'source',
|
|
),
|
|
value['expected'],
|
|
);
|
|
}
|
|
for (final entry in fixture['paths'] as List) {
|
|
final value = entry as Map<String, dynamic>;
|
|
expect(
|
|
buildPathMatchKeys(value['input'] as String).toList()..sort(),
|
|
value['expected'],
|
|
reason: value['input'] as String,
|
|
);
|
|
}
|
|
},
|
|
);
|
|
}
|