Index: trunk/extensions/Narayam/tests/qunit/ext.narayam.tests.js |
— | — | @@ -68,11 +68,11 @@ |
69 | 69 | equals( $.narayam.lastNChars( "foobarbaz", 5, 2 ), "ba", "lastNChars works with short buffer." ); |
70 | 70 | equals( $.narayam.lastNChars( "foobarbaz", 2, 5 ), "fo", "lastNChars works with long buffer." ); |
71 | 71 | |
72 | | - equals( $.narayam.firstDivergence( "abc", "abc" ), -1 ); |
73 | | - equals( $.narayam.firstDivergence( "a", "b" ), 0 ); |
74 | | - equals( $.narayam.firstDivergence( "a", "bb" ), 0 ); |
75 | | - equals( $.narayam.firstDivergence( "abc", "abd" ), 2 ); |
76 | | - equals( $.narayam.firstDivergence( "abcd", "abd" ), 2 ); |
| 72 | + equals( $.narayam.firstDivergence( "abc", "abc" ), -1, "firstDivergence - equal strings" ); |
| 73 | + equals( $.narayam.firstDivergence( "a", "b" ), 0, "firstDivergence - different one-letter strings" ); |
| 74 | + equals( $.narayam.firstDivergence( "a", "bb" ), 0, "firstDivergence - different strings, different lengths" ); |
| 75 | + equals( $.narayam.firstDivergence( "abc", "abd" ), 2, "firstDivergence - different strings with equal beginnings" ); |
| 76 | + equals( $.narayam.firstDivergence( "abcd", "abd" ), 2, "firstDivergence - different strings, equal beginnings, different lengths" ); |
77 | 77 | teardown(); |
78 | 78 | } ); |
79 | 79 | |