Revision: 6969
          
http://languagetool.svn.sourceforge.net/languagetool/?rev=6969&view=rev
Author:   milek_pl
Date:     2012-05-18 14:02:10 +0000 (Fri, 18 May 2012)
Log Message:
-----------
fix junit errors

Modified Paths:
--------------
    trunk/JLanguageTool/src/test/org/languagetool/JLanguageToolTest.java
    trunk/JLanguageTool/src/test/org/languagetool/rules/HunspellRuleTest.java

Modified: trunk/JLanguageTool/src/test/org/languagetool/JLanguageToolTest.java
===================================================================
--- trunk/JLanguageTool/src/test/org/languagetool/JLanguageToolTest.java        
2012-05-18 13:48:58 UTC (rev 6968)
+++ trunk/JLanguageTool/src/test/org/languagetool/JLanguageToolTest.java        
2012-05-18 14:02:10 UTC (rev 6969)
@@ -124,12 +124,12 @@
     tool.activateDefaultPatternRules();
     matches = tool.check("Premier drapie się w ucho co i rusz.");
     assertEquals(1, matches.size());
-    // Polish rule has no effect with English error:
+    // Polish rule has no effect with English error but will get spelling 
activated:
     matches = tool.check("I can give you more a detailed description");
-    assertEquals(0, matches.size());
+    assertEquals(5, matches.size());
     tool.setListUnknownWords(true);
     matches = tool.check("This is not a Polish text.");
-    assertEquals(0, matches.size());
+    assertEquals(3, matches.size());
     assertEquals("[Polish, This, is]", tool.getUnknownWords().toString());
     //check positions relative to sentence ends    
     matches = tool.check("To jest tekst.\nTest 1. To jest linia w której nie 
ma przecinka.");

Modified: 
trunk/JLanguageTool/src/test/org/languagetool/rules/HunspellRuleTest.java
===================================================================
--- trunk/JLanguageTool/src/test/org/languagetool/rules/HunspellRuleTest.java   
2012-05-18 13:48:58 UTC (rev 6968)
+++ trunk/JLanguageTool/src/test/org/languagetool/rules/HunspellRuleTest.java   
2012-05-18 14:02:10 UTC (rev 6969)
@@ -45,6 +45,7 @@
            // correct sentences:
            assertEquals(0, rule.match(langTool.getAnalyzedSentence("To jest 
test bez jakiegokolwiek błędu.")).length);
            assertEquals(0, rule.match(langTool.getAnalyzedSentence("Żółw na 
starość wydziela dziwną woń.")).length);
+           assertEquals(0, 
rule.match(langTool.getAnalyzedSentence(",")).length);
            
            //incorrect sentences:
            
@@ -54,13 +55,7 @@
            assertEquals(0, matches[0].getFromPos());
            assertEquals(4, matches[0].getToPos());         
            assertEquals("Żółw", matches[0].getSuggestedReplacements().get(9));
-           
-           matches = rule.match(langTool.getAnalyzedSentence(","));
-           // check match positions:
-           assertEquals(1, matches.length);
-           assertEquals(0, matches[0].getFromPos());
-           assertEquals(1, matches[0].getToPos());         
-           assertEquals("a", matches[0].getSuggestedReplacements().get(0));
+                   
        }
 
 }

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Languagetool-cvs mailing list
Languagetool-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/languagetool-cvs

Reply via email to