整个课程和数据UI重新设计版本

This commit is contained in:
shenlei
2026-09-18 17:55:44 +09:00
parent febfd30f49
commit 0a4f97d105
154 changed files with 12366 additions and 4784 deletions
+6 -10
View File
@@ -1,5 +1,5 @@
import 'package:flutter_test/flutter_test.dart';
import 'package:kouyu_english/core/a0_core.dart';
import 'package:kouyu_english/core/courses/courses.dart';
import 'package:kouyu_english/core/models.dart';
import 'package:kouyu_english/core/review_feedback.dart';
@@ -31,11 +31,11 @@ void main() {
test('checks an A0 word without accepting a different word', () {
expect(
ReviewFeedback.check(review('A0-W08', 'three'), 'four').complete,
ReviewFeedback.check(review('A0-W04', 'three'), 'four').complete,
isFalse,
);
expect(
ReviewFeedback.check(review('A0-W08', 'three'), 'three').complete,
ReviewFeedback.check(review('A0-W04', 'three'), 'three').complete,
isTrue,
);
});
@@ -100,7 +100,7 @@ void main() {
);
// Multi-space on word item
expect(
ReviewFeedback.check(review('A0-W08', 'three'), ' THREE ').complete,
ReviewFeedback.check(review('A0-W04', 'three'), ' THREE ').complete,
isTrue,
);
});
@@ -121,14 +121,10 @@ void main() {
expect(coreReviewVariant('A0-P12', 2).skill, spokenRecallSkill);
expect(coreReviewVariant('A0-P12', 3).skill, '回忆表达');
for (final id in a0CoreItems.keys) {
final sentence = a0DictationSentences[id];
final sentence = coreDictationSentences[id];
expect(sentence, isNotNull, reason: id);
// Each dictation sentence really contains the item it checks.
expect(
coreItemUsedIn(id, sentence!.sentence, word: a0CoreItems[id]),
isTrue,
reason: id,
);
expect(coreItemUsedIn(id, sentence!.sentence), isTrue, reason: id);
}
});
}