整个课程和数据UI重新设计版本
This commit is contained in:
@@ -3,16 +3,16 @@ import 'package:kouyu_english/core/writing_feedback.dart';
|
||||
|
||||
void main() {
|
||||
test('accepts a variable name in the first lesson', () {
|
||||
final result = WritingFeedback.check('a0-01', 'Hello. I am Alex.');
|
||||
final result = WritingFeedback.check('a0-01-a', 'Hello. I am Alex.');
|
||||
expect(result.complete, isTrue);
|
||||
});
|
||||
|
||||
test(
|
||||
'requests the missing sentence frame without rejecting a valid place',
|
||||
() {
|
||||
expect(WritingFeedback.check('a0-06', 'Hong Kong.').complete, isFalse);
|
||||
expect(WritingFeedback.check('a0-06-a', 'Hong Kong.').complete, isFalse);
|
||||
expect(
|
||||
WritingFeedback.check('a0-06', "I'm from Shanghai.").complete,
|
||||
WritingFeedback.check('a0-06-a', "I'm from Shanghai.").complete,
|
||||
isTrue,
|
||||
);
|
||||
},
|
||||
@@ -20,19 +20,19 @@ void main() {
|
||||
|
||||
test('requires the three independent parts in lesson ten', () {
|
||||
expect(
|
||||
WritingFeedback.check('a0-10', "I'm Alex. I'm from Beijing.").complete,
|
||||
WritingFeedback.check('a0-10-a', "I'm Alex. I'm from Beijing.").complete,
|
||||
isFalse,
|
||||
);
|
||||
expect(
|
||||
WritingFeedback.check(
|
||||
'a0-10',
|
||||
'a0-10-a',
|
||||
"I'm Alex. I'm from Beijing. I like tea.",
|
||||
).complete,
|
||||
isFalse,
|
||||
);
|
||||
expect(
|
||||
WritingFeedback.check(
|
||||
'a0-10',
|
||||
'a0-10-a',
|
||||
"I'm Alex. I'm from Beijing. I like water.",
|
||||
).complete,
|
||||
isTrue,
|
||||
@@ -42,23 +42,22 @@ void main() {
|
||||
test('ignores multiple spaces, mixed casing and curly apostrophes', () {
|
||||
// a0-01 greeting and name with multiple spaces and uppercase
|
||||
expect(
|
||||
WritingFeedback.check('a0-01', ' HELLO I AM ALEX ').complete,
|
||||
WritingFeedback.check('a0-01-a', ' HELLO I AM ALEX ').complete,
|
||||
isTrue,
|
||||
);
|
||||
// a0-01 with curly quote and multiple spaces
|
||||
expect(WritingFeedback.check('a0-01', 'HI I’M MIA').complete, isTrue);
|
||||
expect(
|
||||
WritingFeedback.check('a0-01-a', 'HI I’M MIA').complete,
|
||||
isTrue,
|
||||
);
|
||||
// a0-07 with multiple spaces in phrase
|
||||
expect(
|
||||
WritingFeedback.check('a0-07', 'THIS IS MY MOTHER').complete,
|
||||
WritingFeedback.check('a0-07-a', 'THIS IS MY MOTHER').complete,
|
||||
isTrue,
|
||||
);
|
||||
// a0-08-c with multiple spaces and curly apostrophe
|
||||
expect(
|
||||
WritingFeedback.check(
|
||||
'a0-08-c',
|
||||
'IT’S THREE O’CLOCK',
|
||||
segmentId: 'a0-08-c',
|
||||
).complete,
|
||||
WritingFeedback.check('a0-08-c', 'IT’S THREE O’CLOCK').complete,
|
||||
isTrue,
|
||||
);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user