tests: move const_data tests to test/const_data
All checks were successful
Build and test / evals (push) Successful in 11m38s

This commit is contained in:
2026-03-02 17:16:14 +09:00
parent ad3343a01e
commit bb44bf786a
3 changed files with 38 additions and 9 deletions

View File

@@ -0,0 +1,21 @@
import 'package:collection/collection.dart';
import 'package:jadb/const_data/kanji_grades.dart';
import 'package:test/test.dart';
void main() {
test('All constant kanji in jouyouKanjiByGrades are 2136 in total', () {
expect(jouyouKanjiByGrades.values.flattenedToSet.length, 2136);
});
// test('All constant kanji in jouyouKanjiByGrades are present in KANJIDIC2', () {
// });
// test('All constant kanji in jouyouKanjiByGrades have matching grade as in KANJIDIC2', () {
// });
// test('All constant kanji in jouyouKanjiByGradesAndStrokeCount have matching stroke count as in KANJIDIC2', () {
// });
}

View File

@@ -0,0 +1,17 @@
import 'package:collection/collection.dart';
import 'package:jadb/const_data/radicals.dart';
import 'package:test/test.dart';
void main() {
test('All constant radicals are 253 in total', () {
expect(radicals.values.flattenedToSet.length, 253);
});
// test('All constant radicals have at least 1 associated kanji in KANJIDIC2', () {
// });
// test('All constant radicals match the stroke order listed in KANJIDIC2', () {
// });
}

View File

@@ -1,9 +0,0 @@
import 'package:collection/collection.dart';
import 'package:jadb/const_data/kanji_grades.dart';
import 'package:test/test.dart';
void main() {
test('Assert 2136 kanji in jouyou set', () {
expect(jouyouKanjiByGrades.values.flattenedToSet.length, 2136);
});
}