2021-05-17 14:50:37 +00:00
|
|
|
library inflection3.plural_verb.test;
|
2021-05-02 08:39:25 +00:00
|
|
|
|
2021-05-17 15:10:07 +00:00
|
|
|
import 'package:inflection3/inflection3.dart';
|
2021-05-02 08:39:25 +00:00
|
|
|
import 'package:test/test.dart';
|
|
|
|
|
|
|
|
void main() {
|
2021-05-17 15:10:07 +00:00
|
|
|
group('The PluralVerbEncoder', () {
|
|
|
|
test('converts verbs from singular to plural', () {
|
|
|
|
expect(PLURALVERB.convert(''), equals(''));
|
|
|
|
expect(PLURALVERB.convert('eats'), equals('eat'));
|
|
|
|
expect(PLURALVERB.convert('goes'), equals('go'));
|
|
|
|
expect(PLURALVERB.convert('boxes'), equals('box'));
|
|
|
|
expect(PLURALVERB.convert('pays'), equals('pay'));
|
|
|
|
expect(PLURALVERB.convert('rides'), equals('ride'));
|
|
|
|
expect(PLURALVERB.convert('writes'), equals('write'));
|
|
|
|
expect(PLURALVERB.convert('wears'), equals('wear'));
|
|
|
|
expect(PLURALVERB.convert('steals'), equals('steal'));
|
|
|
|
expect(PLURALVERB.convert('springs'), equals('spring'));
|
|
|
|
expect(PLURALVERB.convert('speaks'), equals('speak'));
|
|
|
|
expect(PLURALVERB.convert('sings'), equals('sing'));
|
|
|
|
expect(PLURALVERB.convert('buses'), equals('bus'));
|
|
|
|
expect(PLURALVERB.convert('knows'), equals('know'));
|
|
|
|
expect(PLURALVERB.convert('hides'), equals('hide'));
|
|
|
|
expect(PLURALVERB.convert('catches'), equals('catch'));
|
2021-05-02 08:39:25 +00:00
|
|
|
});
|
|
|
|
|
2021-05-17 15:10:07 +00:00
|
|
|
test('handles irregular plural verbs', () {
|
|
|
|
expect(PLURALVERB.convert('am'), equals('are'));
|
|
|
|
expect(PLURALVERB.convert('is'), equals('are'));
|
|
|
|
expect(PLURALVERB.convert('was'), equals('were'));
|
|
|
|
expect(PLURALVERB.convert('has'), equals('have'));
|
2021-05-02 08:39:25 +00:00
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|