commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject cvs commit: jakarta-commons/codec/src/test/org/apache/commons/codec/language SoundexTest.java
Date Wed, 10 Dec 2003 04:25:16 GMT
ggregory    2003/12/09 20:25:15

  Modified:    codec/src/test/org/apache/commons/codec/language
                        SoundexTest.java
  Log:
  Assert API parameters for testDifference() were reversed.
  
  Revision  Changes    Path
  1.11      +13 -13    jakarta-commons/codec/src/test/org/apache/commons/codec/language/SoundexTest.java
  
  Index: SoundexTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/codec/src/test/org/apache/commons/codec/language/SoundexTest.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- SoundexTest.java	10 Dec 2003 00:04:46 -0000	1.10
  +++ SoundexTest.java	10 Dec 2003 04:25:15 -0000	1.11
  @@ -166,21 +166,21 @@
   
       public void testDifference() throws EncoderException {
           // Edge cases
  -        assertEquals(this.getEncoder().difference(null, null), 0);
  -        assertEquals(this.getEncoder().difference("", ""), 0);
  -        assertEquals(this.getEncoder().difference(" ", " "), 0);
  +        assertEquals(0, this.getEncoder().difference(null, null));
  +        assertEquals(0, this.getEncoder().difference("", ""));
  +        assertEquals(0, this.getEncoder().difference(" ", " "));
           // Normal cases
  -        assertEquals(this.getEncoder().difference("Smith", "Smythe"), 4);
  -        assertEquals(this.getEncoder().difference("Ann", "Andrew"), 2);
  -        assertEquals(this.getEncoder().difference("Margaret", "Andrew"), 1);
  -        assertEquals(this.getEncoder().difference("Janet", "Margaret"), 0);
  +        assertEquals(4, this.getEncoder().difference("Smith", "Smythe"));
  +        assertEquals(2, this.getEncoder().difference("Ann", "Andrew"));
  +        assertEquals(1, this.getEncoder().difference("Margaret", "Andrew"));
  +        assertEquals(0, this.getEncoder().difference("Janet", "Margaret"));
           // Examples from http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_de-dz_8co5.asp
  -        assertEquals(this.getEncoder().difference("Green", "Greene"), 4);
  -        assertEquals(this.getEncoder().difference("Blotchet-Halls", "Greene"), 0);
  +        assertEquals(4, this.getEncoder().difference("Green", "Greene"));
  +        assertEquals(0, this.getEncoder().difference("Blotchet-Halls", "Greene"));
           // Examples from http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_setu-sus_3o6w.asp
  -        assertEquals(this.getEncoder().difference("Smith", "Smythe"), 4);
  -        assertEquals(this.getEncoder().difference("Smithers", "Smythers"), 4);
  -        assertEquals(this.getEncoder().difference("Anothers", "Brothers"), 2);        
  +        assertEquals(4, this.getEncoder().difference("Smith", "Smythe"));
  +        assertEquals(4, this.getEncoder().difference("Smithers", "Smythers"));
  +        assertEquals(2, this.getEncoder().difference("Anothers", "Brothers"));        
       }
   
       public void testEncodeBasic() {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message