search: let radical search API take RadkfileRadical inputs
Build and test / build (push) Successful in 5m11s
Build and test / build (push) Successful in 5m11s
This commit is contained in:
@@ -58,31 +58,26 @@ void main() {
|
||||
},
|
||||
);
|
||||
|
||||
test(
|
||||
'All constant radicals are located in the correct stroke count group',
|
||||
() {
|
||||
for (final mapEntry in radicals.entries) {
|
||||
final strokeCount = mapEntry.key;
|
||||
final radicalsInGroup = mapEntry.value;
|
||||
for (final radical in radicalsInGroup) {
|
||||
expect(
|
||||
strokeCount,
|
||||
radical.strokeCount,
|
||||
reason:
|
||||
'Radical ${radical.formalVariant} should have stroke count $strokeCount but has ${radical.strokeCount}',
|
||||
);
|
||||
}
|
||||
test('All constant radicals are located in the correct stroke count group', () {
|
||||
for (final mapEntry in radicals.entries) {
|
||||
final strokeCount = mapEntry.key;
|
||||
final radicalsInGroup = mapEntry.value;
|
||||
for (final radical in radicalsInGroup) {
|
||||
expect(
|
||||
strokeCount,
|
||||
radical.strokeCount,
|
||||
reason:
|
||||
'Radical ${radical.formalVariant} should have stroke count $strokeCount but has ${radical.strokeCount}',
|
||||
);
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
group('All radicals should return results', () {
|
||||
for (final radical in radicals.values.flattened) {
|
||||
test(' - $radical', () async {
|
||||
final connection = await setupDatabaseConnection();
|
||||
final result = await connection.jadbSearchKanjiByRadicals([
|
||||
radical.formalVariant,
|
||||
]);
|
||||
final result = await connection.jadbSearchKanjiByRadicals([radical]);
|
||||
expect(result, isNotEmpty);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user