Permalink
Browse files

Fixed bug that threw exception if extra columns were in OrderedQuery …

…table
  • Loading branch information...
1 parent 4d8e132 commit 447bbb3ed75477cd5bd848d534c6cb1389844bba unclebob committed Aug 12, 2009
@@ -0,0 +1,9 @@
+!|Ordered Query:duplicate rows|
+|x|
+|SuiteChildOne.SuiteSetUp |
+|SuiteChildOne.TestOneOne |
+|SuiteChildOne.TestOneTwo |
+|SuiteChildOne.SuiteTearDown |blah|
+|SuiteChildOne.SuiteSetUp |
+|SuiteChildOne.TestOneThree |
+|SuiteChildOne.SuiteTearDown |
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<properties>
+ <Edit>true</Edit>
+ <Files>true</Files>
+ <Properties>true</Properties>
+ <RecentChanges>true</RecentChanges>
+ <Refactor>true</Refactor>
+ <Search>true</Search>
+ <Test>true</Test>
+ <Versions>true</Versions>
+ <WhereUsed>true</WhereUsed>
+</properties>
@@ -10,4 +10,4 @@ To add your first "page", click the [[Edit][FrontPage?edit]] button and add a [[
| [[User Guide][FitNesse.UserGuide]]|''Answer the rest of your questions here.''|
| [[Acceptance Tests][FitNesse.SuiteAcceptanceTests]]|''FitNesse's suite of Acceptance Tests''|
-!note Release v20090807
+!note Release v20090812
@@ -1,3 +1,4 @@
+|FitNesse.SuiteAcceptanceTests.SuiteSlimTests.TestOrderedQueryWithDuplicateRows||14:27:54 Wed, Aug 12, 2009|
|FitNesse.SuiteAcceptanceTests.SuiteWikiImportTests.TestImportFromSecureWikiWithCredentials||16:05:29 Wed, Aug 05, 2009|
|FitNesse.SuiteAcceptanceTests.SuiteWikiImportTests|docs|16:04:48 Wed, Aug 05, 2009|
|FitNesse.SuiteAcceptanceTests.SuiteWikiImportTests.TestCantImportFromSecureWiki||16:04:21 Wed, Aug 05, 2009|
@@ -97,25 +98,3 @@
|FitNesse.UserGuide.SliM.ScenarioTable||16:28:45 Wed, May 20, 2009|
|FitNesse.UserGuide.SpecialPages||16:25:57 Wed, May 20, 2009|
|ProjectPage.LoginExample.ScenarioLibrary||16:19:13 Wed, May 20, 2009|
-|ProjectPage.LoginExample.SetUp||16:18:38 Wed, May 20, 2009|
-|FitNesse.SuiteAcceptanceTests.SuiteWidgetTests.SetUp||16:17:05 Wed, May 20, 2009|
-|FitNesse.SuiteAcceptanceTests.SuiteTestHistory.SetUp||16:15:17 Wed, May 20, 2009|
-|FitNesse.SuiteAcceptanceTests.SuiteSlimTests.ScenarioLibraryTestSuite.ScenarioLibrariesAreIncludedInTheCorrectOrder||16:03:27 Wed, May 20, 2009|
-|FitNesse.SuiteAcceptanceTests.SuiteSlimTests.ScenarioLibraryTestSuite.NoScenarioSectionIfThereAreNone||16:03:12 Wed, May 20, 2009|
-|FitNesse.SuiteAcceptanceTests.SuiteSlimTests.ScenarioLibraryTestSuite.ManyUnclesAreIncluded||16:03:00 Wed, May 20, 2009|
-|FitNesse.SuiteAcceptanceTests.SuiteSlimTests.ScenarioLibraryTestSuite.ScenariosOnlyInSlimTests||16:02:43 Wed, May 20, 2009|
-|FitNesse.SuiteAcceptanceTests.SuiteSlimTests.ScenarioLibraryTestSuite.ScenarioLibrariesOnlyIncludedInTestPages||15:58:02 Wed, May 20, 2009|
-|FitNesse.SuiteAcceptanceTests.SuiteSlimTests.ScenarioLibraryTestSuite.ScenarioLibraryIsCollapsed||15:02:17 Wed, May 20, 2009|
-|FitNesse.SuiteAcceptanceTests.SuiteSlimTests.SetUp||14:55:58 Wed, May 20, 2009|
-|FitNesse.SuiteAcceptanceTests.SuiteSlimTests.ScenarioLibraryTestSuite||11:10:46 Wed, May 20, 2009|
-|FitNesse.SuiteAcceptanceTests.SuiteTestHistory.SuiteTopLevelTestHistory.TopLevelHistoryLineShouldShowPassFailResultsInColor||16:35:48 Wed, May 13, 2009|
-|FitNesse.UserGuide.PageProperties||14:10:29 Wed, May 13, 2009|
-|FitNesse.UserGuide.SecurityDescription.SpnegoAuthentication||14:04:04 Wed, May 13, 2009|
-|FitNesse.UserGuide.SecurityDescription||13:58:07 Wed, May 13, 2009|
-|FitNesse.UserGuide.SliM.SlimProtocol||11:18:31 Wed, May 13, 2009|
-|JunkParent.StopTestTest||09:49:09 Wed, May 13, 2009|
-|JunkPage.UseVarPage||15:20:57 Tue, May 12, 2009|
-|FitNesse.UserGuide.TestSuites||13:34:29 Wed, May 27, 2009|
-|FitNesse.SuiteAcceptanceTests.SuiteResponderTests.SuiteTestResponders.SuiteResponder.TestNotSuiteFilter||13:32:59 Wed, May 27, 2009|
-|FitNesse.SuiteAcceptanceTests.SuiteWidgetTests.TestClasspathPrecededByDefine||12:47:54 Wed, May 27, 2009|
-|FitNesse.SuiteAcceptanceTests.SuiteResponderTests.SuiteTestResponders.SuiteResponder.TempTest||12:41:35 Wed, May 27, 2009|
View
@@ -7,7 +7,7 @@
<description> The fully integrated standalone wiki, and acceptance
testing framework. </description>
<url>http://fitnesse.org</url>
- <version>20090807</version>
+ <version>20090812</version>
<licenses>
<license>
<name>GNU Public License, Version 2.0</name>
@@ -0,0 +1,20 @@
+
+(use 'clojure.contrib.duck-streams)
+
+(def file-counts
+ (map
+ #(list (.toString %) (count (read-lines %)))
+ (remove #(.isDirectory %)
+ (file-seq (file-str "~/projects/FitNesseGit/src/fitnesse")))))
+
+(defn count-lines-that-end-with [file-counts suffix]
+ (reduce +
+ (map second
+ (filter #(.endsWith (first %) suffix) file-counts))))
+
+(def java-count (count-lines-that-end-with file-counts ".java"))
+(def test-count (count-lines-that-end-with file-counts "Test.java"))
+
+(printf "Java lines: %d\n" java-count)
+(printf "Test lines: %d\n" test-count)
+(printf "Test pct: %.1f\n" (double (* 100 (/ test-count java-count))))
@@ -4,6 +4,6 @@
public class FitNesseVersion {
public String toString() {
- return "v20090807";
+ return "v20090812";
}
}
@@ -0,0 +1,34 @@
+package fitnesse.fixtures;
+
+import java.util.Arrays;
+import java.util.List;
+
+public class DuplicateRows {
+ public List<Object> query() {
+ List results = Arrays.asList(
+ Arrays.asList(
+ Arrays.asList("x", "SuiteChildOne.SuiteSetUp")
+ ),
+ Arrays.asList(
+ Arrays.asList("x", "SuiteChildOne.TestOneOne")
+ ),
+ Arrays.asList(
+ Arrays.asList("x", "SuiteChildOne.TestOneTwo")
+ ),
+ Arrays.asList(
+ Arrays.asList("x", "SuiteChildOne.SuiteTearDown")
+ ),
+ Arrays.asList(
+ Arrays.asList("x", "SuiteChildOne.SuiteSetUp")
+ ),
+ Arrays.asList(
+ Arrays.asList("x", "SuiteChildOne.TestOneThree")
+ ),
+ Arrays.asList(
+ Arrays.asList("x", "SuiteChildOne.SuiteTearDown")
+ )
+ );
+ return results;
+
+ }
+}
@@ -29,6 +29,8 @@ private void markColumns(int tableRow, int matchedRow, int columns) {
}
private void markColumn(int tableRow, int matchedRow, int col) {
+ if (col >= fieldNames.size())
+ return; // ignore strange table geometry.
String actualValue = queryResults.getCell(fieldNames.get(col), matchedRow);
String expectedValue = table.getCellContents(col, tableRow);
table.setCell(col, tableRow, replaceSymbolsWithFullExpansion(expectedValue));
@@ -72,5 +72,4 @@ public void threeRowsOneMissingTwoOutOfOrder() throws Exception {
"[[2] fail(out of order: row 1), pass(4)]]"
);
}
-
}

0 comments on commit 447bbb3

Please sign in to comment.