Skip to content

Commit

Permalink
✅ Adds more test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
esentis committed May 1, 2022
1 parent f779884 commit eae3186
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions test/string_extensions_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ void main() {
() {
String? string = 'Hello world ! dear 4asd';
expect(string.countWords, 4);

expect('despoina '.countWords, 1);
expect('despoina '.countWords, 1);
expect(null.countWords, 0);
expect(''.countWords, 0);
expect(' '.countWords, 0);
Expand All @@ -34,7 +35,8 @@ void main() {
expect(string.capitalize, 'Hackerrr');
expect(string2.capitalize, 'Για 5 ημέρες');
expect(string3.capitalize, 'Για 5 ημέρες ολα θα πάνε καλά ');

expect('despoina '.capitalize, 'Despoina ');
expect('despoina '.capitalize, 'Despoina ');
expect(null.capitalize, null);
expect(''.capitalize, '');
expect(' '.capitalize, ' ');
Expand All @@ -48,6 +50,7 @@ void main() {
expect(string.toTitleCase, 'Hello Dear Friend How You Doing ?');
expect('G'.toTitleCase, 'G');
expect('despoina '.toTitleCase, 'Despoina');
expect('despoina '.toTitleCase, 'Despoina');
expect('g'.toTitleCase, 'G');
expect('gg'.toTitleCase, 'Gg');
expect(''.toTitleCase, '');
Expand Down

0 comments on commit eae3186

Please sign in to comment.