platform/packages/inflection3/test/singular_verb_test.dart

34 lines
1.4 KiB
Dart
Raw Normal View History

2021-05-17 14:50:37 +00:00
library inflection3.singular_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 SingularVerbEncoder', () {
test('converts verbs from singular to plural', () {
expect(SINGULARVERB.convert(''), equals(''));
expect(SINGULARVERB.convert('eat'), equals('eats'));
expect(SINGULARVERB.convert('go'), equals('goes'));
expect(SINGULARVERB.convert('box'), equals('boxes'));
expect(SINGULARVERB.convert('pay'), equals('pays'));
expect(SINGULARVERB.convert('ride'), equals('rides'));
expect(SINGULARVERB.convert('write'), equals('writes'));
expect(SINGULARVERB.convert('wear'), equals('wears'));
expect(SINGULARVERB.convert('steal'), equals('steals'));
expect(SINGULARVERB.convert('spring'), equals('springs'));
expect(SINGULARVERB.convert('speak'), equals('speaks'));
expect(SINGULARVERB.convert('sing'), equals('sings'));
expect(SINGULARVERB.convert('bus'), equals('buses'));
expect(SINGULARVERB.convert('know'), equals('knows'));
expect(SINGULARVERB.convert('hide'), equals('hides'));
expect(SINGULARVERB.convert('catch'), equals('catches'));
2021-05-02 08:39:25 +00:00
});
2021-05-17 15:10:07 +00:00
test('handles irregular plural verbs', () {
expect(SINGULARVERB.convert('are'), equals('is'));
expect(SINGULARVERB.convert('were'), equals('was'));
expect(SINGULARVERB.convert('have'), equals('has'));
2021-05-02 08:39:25 +00:00
});
});
}