You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
dateKeys-dart/test/capsule_writer_vm_test.dart

30 lines
795 B

// The writer of capsules against Go: every case of
// test/vectors/capsule_writer.json (see capsule_writer_cases.dart).
@TestOn('vm')
library;
import 'dart:convert';
import 'dart:io';
import 'package:test/test.dart';
import 'capsule_writer_cases.dart';
import 'capsule_writer_support.dart';
import 'vectors/capsule_writer.g.dart';
void main() {
final text = File('test/vectors/capsule_writer.json').readAsStringSync();
final doc = jsonDecode(text) as Json;
test('the Dart constant holds the cases marked node', () {
final node = jsonDecode(capsuleWriterJson) as Json;
expect(node['releases'], doc['releases']);
expect(node['cases'], [
for (final c in listOf(doc['cases']))
if ((c['recipe']! as Json)['node'] == true) c,
]);
});
writerCases(doc);
}

Powered by TurnKey Linux.