1
- (* phone-number - 1.7. 0 *)
1
+ (* phone-number - 1.0 *)
2
2
open Base
3
3
open OUnit2
4
4
open Phone_number
@@ -18,19 +18,19 @@ let tests = [
18
18
" cleans numbers with multiple spaces" > ::
19
19
ae (Ok " 2234567890" ) (number " 223 456 7890 " );
20
20
" invalid when 9 digits" > ::
21
- ae (Error " incorrect number of digits" ) (number " 123456789" );
21
+ ae (Error " must not be fewer than 10 digits" ) (number " 123456789" );
22
22
" invalid when 11 digits does not start with a 1" > ::
23
23
ae (Error " 11 digits must start with 1" ) (number " 22234567890" );
24
24
" valid when 11 digits and starting with 1" > ::
25
25
ae (Ok " 2234567890" ) (number " 12234567890" );
26
26
" valid when 11 digits and starting with 1 even with punctuation" > ::
27
27
ae (Ok " 2234567890" ) (number " +1 (223) 456-7890" );
28
28
" invalid when more than 11 digits" > ::
29
- ae (Error " more than 11 digits" ) (number " 321234567890" );
29
+ ae (Error " must not be greater than 11 digits" ) (number " 321234567890" );
30
30
" invalid with letters" > ::
31
- ae (Error " letters not permitted" ) (number " 123 -abc-7890" );
31
+ ae (Error " letters not permitted" ) (number " 523 -abc-7890" );
32
32
" invalid with punctuations" > ::
33
- ae (Error " punctuations not permitted" ) (number " 123 -@:!-7890" );
33
+ ae (Error " punctuations not permitted" ) (number " 523 -@:!-7890" );
34
34
" invalid if area code starts with 0" > ::
35
35
ae (Error " area code cannot start with zero" ) (number " (023) 456-7890" );
36
36
" invalid if area code starts with 1" > ::
0 commit comments