[jfit commit] r3 - in trunk: . antfit fit-1.1 fit-1.1/doc fit-1.1/examples fit-1.1/examples/eg fit-1.1/examples...

0 views
Skip to first unread message

codesite...@google.com

unread,
Mar 17, 2008, 11:49:09 AM3/17/08
to jf...@googlegroups.com
Author: robert....@SmokejumperIT.com
Date: Mon Mar 17 08:33:57 2008
New Revision: 3

Added:
trunk/fit-1.1/
trunk/fit-1.1/doc/
trunk/fit-1.1/doc/changes.txt
trunk/fit-1.1/doc/style.css
trunk/fit-1.1/examples/
trunk/fit-1.1/examples/eg/
trunk/fit-1.1/examples/eg/AllCombinations.java
trunk/fit-1.1/examples/eg/AllFiles.java
trunk/fit-1.1/examples/eg/AllPairs.java
trunk/fit-1.1/examples/eg/ArithmeticColumnFixture.java
trunk/fit-1.1/examples/eg/ArithmeticFixture.java
trunk/fit-1.1/examples/eg/BinaryChop.java
trunk/fit-1.1/examples/eg/Calculator.java
trunk/fit-1.1/examples/eg/ColumnIndex.java
trunk/fit-1.1/examples/eg/Division.java
trunk/fit-1.1/examples/eg/ExampleTests.java
trunk/fit-1.1/examples/eg/Page.java
trunk/fit-1.1/examples/eg/Sqrt.java
trunk/fit-1.1/examples/eg/music/
trunk/fit-1.1/examples/eg/music/Browser.java
trunk/fit-1.1/examples/eg/music/Dialog.java
trunk/fit-1.1/examples/eg/music/Display.java
trunk/fit-1.1/examples/eg/music/Music.java
trunk/fit-1.1/examples/eg/music/Music.txt
trunk/fit-1.1/examples/eg/music/MusicLibrary.java
trunk/fit-1.1/examples/eg/music/MusicPlayer.java
trunk/fit-1.1/examples/eg/music/Realtime.java
trunk/fit-1.1/examples/eg/music/Simulator.java
trunk/fit-1.1/examples/eg/net/
trunk/fit-1.1/examples/eg/net/GeoCoordinate.java
trunk/fit-1.1/examples/eg/net/Simulator.java
trunk/fit-1.1/examples/input/
trunk/fit-1.1/examples/input/AllCombinations.html
trunk/fit-1.1/examples/input/AllFiles.html
trunk/fit-1.1/examples/input/AllPairs/
trunk/fit-1.1/examples/input/AllPairs.html
trunk/fit-1.1/examples/input/AllPairs/function/
trunk/fit-1.1/examples/input/AllPairs/function/cosine.html
trunk/fit-1.1/examples/input/AllPairs/function/sine.html
trunk/fit-1.1/examples/input/AllPairs/magnitude/
trunk/fit-1.1/examples/input/AllPairs/magnitude/180+30.html
trunk/fit-1.1/examples/input/AllPairs/magnitude/30.html
trunk/fit-1.1/examples/input/AllPairs/magnitude/360+30.html
trunk/fit-1.1/examples/input/AllPairs/magnitude/90-30.html
trunk/fit-1.1/examples/input/AllPairs/sign/
trunk/fit-1.1/examples/input/AllPairs/sign/change-sign.html
trunk/fit-1.1/examples/input/AllPairs/sign/multiply.html
trunk/fit-1.1/examples/input/AllPairs/sign/no-change.html
trunk/fit-1.1/examples/input/BasicEmployeeCompensation.html
trunk/fit-1.1/examples/input/BinaryChop.html
trunk/fit-1.1/examples/input/CalculatorExample.html
trunk/fit-1.1/examples/input/ExampleTests.html
trunk/fit-1.1/examples/input/FitAcceptanceTests.html
trunk/fit-1.1/examples/input/MusicExample.html
trunk/fit-1.1/examples/input/MusicExampleWithErrors.html
trunk/fit-1.1/examples/input/NetworkExample.html
trunk/fit-1.1/examples/input/WebPageExample.html
trunk/fit-1.1/examples/input/arithmetic.html
trunk/fit-1.1/examples/input/files/
trunk/fit-1.1/examples/input/files/hp35bk.jpg (contents, props changed)
trunk/fit-1.1/examples/input/logo.gif (contents, props changed)
trunk/fit-1.1/examples/output/
trunk/fit-1.1/examples/output/CalculatorExample.html
trunk/fit-1.1/examples/output/MusicExample.html
trunk/fit-1.1/examples/output/arithmetic.html
trunk/fit-1.1/fit-java-1.1.zip (contents, props changed)
trunk/fit-1.1/fit.jar (contents, props changed)
trunk/fit-1.1/license.txt
trunk/fit-1.1/readme.html
trunk/fit-1.1/source/
trunk/fit-1.1/source/docs/
trunk/fit-1.1/source/docs/documentation.html
trunk/fit-1.1/source/docs/index.html
trunk/fit-1.1/source/docs/readme.txt
trunk/fit-1.1/source/docs/style.css
trunk/fit-1.1/source/examples/
trunk/fit-1.1/source/examples/AllCombinations.html
trunk/fit-1.1/source/examples/AllFiles.html
trunk/fit-1.1/source/examples/AllPairs/
trunk/fit-1.1/source/examples/AllPairs.html
trunk/fit-1.1/source/examples/AllPairs/function/
trunk/fit-1.1/source/examples/AllPairs/function/cosine.html
trunk/fit-1.1/source/examples/AllPairs/function/sine.html
trunk/fit-1.1/source/examples/AllPairs/magnitude/
trunk/fit-1.1/source/examples/AllPairs/magnitude/180+30.html
trunk/fit-1.1/source/examples/AllPairs/magnitude/30.html
trunk/fit-1.1/source/examples/AllPairs/magnitude/360+30.html
trunk/fit-1.1/source/examples/AllPairs/magnitude/90-30.html
trunk/fit-1.1/source/examples/AllPairs/sign/
trunk/fit-1.1/source/examples/AllPairs/sign/change-sign.html
trunk/fit-1.1/source/examples/AllPairs/sign/multiply.html
trunk/fit-1.1/source/examples/AllPairs/sign/no-change.html
trunk/fit-1.1/source/examples/BasicEmployeeCompensation.html
trunk/fit-1.1/source/examples/BinaryChop.html
trunk/fit-1.1/source/examples/CalculatorExample.html
trunk/fit-1.1/source/examples/ExampleTests.html
trunk/fit-1.1/source/examples/FitAcceptanceTests.html
trunk/fit-1.1/source/examples/MusicExample.html
trunk/fit-1.1/source/examples/MusicExampleWithErrors.html
trunk/fit-1.1/source/examples/NetworkExample.html
trunk/fit-1.1/source/examples/WebPageExample.html
trunk/fit-1.1/source/examples/arithmetic.html
trunk/fit-1.1/source/examples/files/
trunk/fit-1.1/source/examples/files/hp35bk.jpg (contents, props changed)
trunk/fit-1.1/source/examples/logo.gif (contents, props changed)
trunk/fit-1.1/source/imp/
trunk/fit-1.1/source/imp/java/
trunk/fit-1.1/source/imp/java/.classpath
trunk/fit-1.1/source/imp/java/.project
trunk/fit-1.1/source/imp/java/build.bat
trunk/fit-1.1/source/imp/java/build.xml
trunk/fit-1.1/source/imp/java/doc/
trunk/fit-1.1/source/imp/java/doc/doc/
trunk/fit-1.1/source/imp/java/doc/doc/changes.txt
trunk/fit-1.1/source/imp/java/doc/doc/style.css
trunk/fit-1.1/source/imp/java/doc/readme.html
trunk/fit-1.1/source/imp/java/src/
trunk/fit-1.1/source/imp/java/src/eg/
trunk/fit-1.1/source/imp/java/src/eg/AllCombinations.java
trunk/fit-1.1/source/imp/java/src/eg/AllFiles.java
trunk/fit-1.1/source/imp/java/src/eg/AllPairs.java
trunk/fit-1.1/source/imp/java/src/eg/ArithmeticColumnFixture.java
trunk/fit-1.1/source/imp/java/src/eg/ArithmeticFixture.java
trunk/fit-1.1/source/imp/java/src/eg/BinaryChop.java
trunk/fit-1.1/source/imp/java/src/eg/Calculator.java
trunk/fit-1.1/source/imp/java/src/eg/ColumnIndex.java
trunk/fit-1.1/source/imp/java/src/eg/Division.java
trunk/fit-1.1/source/imp/java/src/eg/ExampleTests.java
trunk/fit-1.1/source/imp/java/src/eg/Page.java
trunk/fit-1.1/source/imp/java/src/eg/Sqrt.java
trunk/fit-1.1/source/imp/java/src/eg/music/
trunk/fit-1.1/source/imp/java/src/eg/music/Browser.java
trunk/fit-1.1/source/imp/java/src/eg/music/Dialog.java
trunk/fit-1.1/source/imp/java/src/eg/music/Display.java
trunk/fit-1.1/source/imp/java/src/eg/music/Music.java
trunk/fit-1.1/source/imp/java/src/eg/music/Music.txt
trunk/fit-1.1/source/imp/java/src/eg/music/MusicLibrary.java
trunk/fit-1.1/source/imp/java/src/eg/music/MusicPlayer.java
trunk/fit-1.1/source/imp/java/src/eg/music/Realtime.java
trunk/fit-1.1/source/imp/java/src/eg/music/Simulator.java
trunk/fit-1.1/source/imp/java/src/eg/net/
trunk/fit-1.1/source/imp/java/src/eg/net/GeoCoordinate.java
trunk/fit-1.1/source/imp/java/src/eg/net/Simulator.java
trunk/fit-1.1/source/imp/java/src/fat/
trunk/fit-1.1/source/imp/java/src/fat/AnnotationFixture.java
trunk/fit-1.1/source/imp/java/src/fat/Color.java
trunk/fit-1.1/source/imp/java/src/fat/Divide.java
trunk/fit-1.1/source/imp/java/src/fat/DocumentParseFixture.java
trunk/fit-1.1/source/imp/java/src/fat/Equals.java
trunk/fit-1.1/source/imp/java/src/fat/ExampleFixture.java
trunk/fit-1.1/source/imp/java/src/fat/FatTest.java
trunk/fit-1.1/source/imp/java/src/fat/FixtureLoadFixture.java
trunk/fit-1.1/source/imp/java/src/fat/FixtureNameFixture.java
trunk/fit-1.1/source/imp/java/src/fat/Frameworks.java
trunk/fit-1.1/source/imp/java/src/fat/HtmlToTextFixture.java
trunk/fit-1.1/source/imp/java/src/fat/Money.java
trunk/fit-1.1/source/imp/java/src/fat/NotAFixture.java
trunk/fit-1.1/source/imp/java/src/fat/ReferenceFixture.java
trunk/fit-1.1/source/imp/java/src/fat/StandardAnnotationFixture.java
trunk/fit-1.1/source/imp/java/src/fat/Table.java
trunk/fit-1.1/source/imp/java/src/fat/TableParseFixture.java
trunk/fit-1.1/source/imp/java/src/fat/Tests.java
trunk/fit-1.1/source/imp/java/src/fat/TextToHtmlFixture.java
trunk/fit-1.1/source/imp/java/src/fit/
trunk/fit-1.1/source/imp/java/src/fit/ActionFixture.java
trunk/fit-1.1/source/imp/java/src/fit/ColumnFixture.java
trunk/fit-1.1/source/imp/java/src/fit/Counts.java
trunk/fit-1.1/source/imp/java/src/fit/FileRunner.java
trunk/fit-1.1/source/imp/java/src/fit/FileRunnerTest.java
trunk/fit-1.1/source/imp/java/src/fit/Fixture.java
trunk/fit-1.1/source/imp/java/src/fit/FixtureTest.java
trunk/fit-1.1/source/imp/java/src/fit/FrameworkTest.java
trunk/fit-1.1/source/imp/java/src/fit/Parse.java
trunk/fit-1.1/source/imp/java/src/fit/ParseTest.java
trunk/fit-1.1/source/imp/java/src/fit/PrimitiveFixture.java
trunk/fit-1.1/source/imp/java/src/fit/RowFixture.java
trunk/fit-1.1/source/imp/java/src/fit/RowFixtureTest.java
trunk/fit-1.1/source/imp/java/src/fit/ScientificDouble.java
trunk/fit-1.1/source/imp/java/src/fit/Summary.java
trunk/fit-1.1/source/imp/java/src/fit/TimedActionFixture.java
trunk/fit-1.1/source/imp/java/src/fit/TypeAdapter.java
trunk/fit-1.1/source/imp/java/src/fit/WikiRunner.java
trunk/fit-1.1/source/imp/java/src/license.txt
trunk/fit-1.1/source/imp/java/tools/
trunk/fit-1.1/source/imp/java/tools/ant/
trunk/fit-1.1/source/imp/java/tools/ant/KEYS
trunk/fit-1.1/source/imp/java/tools/ant/LICENSE
trunk/fit-1.1/source/imp/java/tools/ant/LICENSE.dom
trunk/fit-1.1/source/imp/java/tools/ant/LICENSE.sax
trunk/fit-1.1/source/imp/java/tools/ant/LICENSE.xerces
trunk/fit-1.1/source/imp/java/tools/ant/README
trunk/fit-1.1/source/imp/java/tools/ant/WHATSNEW
trunk/fit-1.1/source/imp/java/tools/ant/bin/
trunk/fit-1.1/source/imp/java/tools/ant/bin/ant
trunk/fit-1.1/source/imp/java/tools/ant/bin/ant.bat
trunk/fit-1.1/source/imp/java/tools/ant/bin/antRun
trunk/fit-1.1/source/imp/java/tools/ant/bin/antRun.bat
trunk/fit-1.1/source/imp/java/tools/ant/bin/antRun.pl
trunk/fit-1.1/source/imp/java/tools/ant/bin/complete-ant-cmd.pl
trunk/fit-1.1/source/imp/java/tools/ant/bin/lcp.bat
trunk/fit-1.1/source/imp/java/tools/ant/bin/runant.pl
trunk/fit-1.1/source/imp/java/tools/ant/bin/runant.py
trunk/fit-1.1/source/imp/java/tools/ant/lib/
trunk/fit-1.1/source/imp/java/tools/ant/lib/README
trunk/fit-1.1/source/imp/java/tools/ant/lib/ant.jar (contents, props changed)
trunk/fit-1.1/source/imp/java/tools/ant/lib/junit.jar (contents, props changed)
trunk/fit-1.1/source/imp/java/tools/ant/lib/optional.jar (contents, props changed)
trunk/fit-1.1/source/imp/java/tools/ant/lib/xercesImpl.jar (contents, props changed)
trunk/fit-1.1/source/imp/java/tools/ant/lib/xml-apis.jar (contents, props changed)
trunk/fit-1.1/source/imp/java/tools/ant/welcome.html
trunk/fit-1.1/source/release.html
trunk/fit-1.1/source/spec/
trunk/fit-1.1/source/spec/annotation.html
trunk/fit-1.1/source/spec/extensions.html
trunk/fit-1.1/source/spec/fixtures.html
trunk/fit-1.1/source/spec/index.html
trunk/fit-1.1/source/spec/parse.html
trunk/fit-1.1/spec/
trunk/fit-1.1/spec/fat/
trunk/fit-1.1/spec/fat/AnnotationFixture.java
trunk/fit-1.1/spec/fat/Color.java
trunk/fit-1.1/spec/fat/Divide.java
trunk/fit-1.1/spec/fat/DocumentParseFixture.java
trunk/fit-1.1/spec/fat/Equals.java
trunk/fit-1.1/spec/fat/ExampleFixture.java
trunk/fit-1.1/spec/fat/FatTest.java
trunk/fit-1.1/spec/fat/FixtureLoadFixture.java
trunk/fit-1.1/spec/fat/FixtureNameFixture.java
trunk/fit-1.1/spec/fat/Frameworks.java
trunk/fit-1.1/spec/fat/HtmlToTextFixture.java
trunk/fit-1.1/spec/fat/Money.java
trunk/fit-1.1/spec/fat/NotAFixture.java
trunk/fit-1.1/spec/fat/ReferenceFixture.java
trunk/fit-1.1/spec/fat/StandardAnnotationFixture.java
trunk/fit-1.1/spec/fat/Table.java
trunk/fit-1.1/spec/fat/TableParseFixture.java
trunk/fit-1.1/spec/fat/Tests.java
trunk/fit-1.1/spec/fat/TextToHtmlFixture.java
trunk/fit-1.1/spec/input/
trunk/fit-1.1/spec/input/annotation.html
trunk/fit-1.1/spec/input/extensions.html
trunk/fit-1.1/spec/input/fixtures.html
trunk/fit-1.1/spec/input/index.html
trunk/fit-1.1/spec/input/parse.html
trunk/fit-1.1/spec/output/
trunk/fit-1.1/spec/output/annotation.html
trunk/fit-1.1/spec/output/extensions.html
trunk/fit-1.1/spec/output/fixtures.html
trunk/fit-1.1/spec/output/index.html
trunk/fit-1.1/spec/output/parse.html
trunk/jfit.iml
trunk/jfit.ipr
trunk/jfit.iws
trunk/src/
trunk/src/jfit/
trunk/src/jfit/FitTask.java
Removed:
trunk/antfit/.classpath
trunk/antfit/.cvsignore
trunk/antfit/.project
trunk/antfit/antfitsrc.jardesc

Log:
Checking in all the Fit stuff.

Added: trunk/fit-1.1/doc/changes.txt
==============================================================================
--- (empty file)
+++ trunk/fit-1.1/doc/changes.txt Mon Mar 17 08:33:57 2008
@@ -0,0 +1,144 @@
+Changes in Fit-Java 1.1:
+Produced by Jim Shore. Released 7 April 2004.
+ * Updated for Fit Spec v1.1. Contributed by Jim Shore.
+ * Changed ColumnFixture headers to allow multiple words. Contributed by Rick Mugridge.
+ * Added fixture argument list support. Contributed by Rick Mugridge from FitNesse source code.
+ * Added support for nested tables. Contributed by Rick Mugridge.
+
+
+Changes in Fit-Java 1.0:
+No changes: identical to RC1. Released 18 Nov 2004.
+
+
+Changes in Fit-Java 1.0 RC1:
+Produced by Jim Shore and Ward Cunningham. Released 31 Aug 2004.
+ * Improved whitespace handling. Contributed by Jim Shore.
+ * Microsoft Word's "smart quotes" are turned into normal quotes. Contributed by Jim Shore.
+ * Java line feed characters are turned into HTML <br /> tags (and vice-versa). Contributed by Jim Shore.
+ * WikiRunner is deprecated in favor of a smarter FileRunner. Contributed by Ward Cunningham.
+ * Created parse specification and associated fat fixtures. Contributed by Jim Shore.
+
+
+Changes in Fit-Java b030915j
+Produced by Ward Cunningham and Jim Shore. Released 15 Sept 2003.
+ * Add statics for some color codes. Contributed by Jim Shore and Ward Cunningham.
+ * Add boolean support to PrimitiveFixture. Contributed by Jim Shore and Ward Cunningham.
+ * Add fat fixtures Table, Color, Equals, Divide, Money. Contributed by Jim Shore and Ward Cunningham.
+ * Add FitSpecification.html document. Contributed by Jim Shore and Ward Cunningham.
+
+
+Fit was created and the Java version implemented by Ward Cunningham. The following
+history was taken from the Fit web site.
+
+Download in http:files/JavaDownloads/fit-b030425j.tgz
+
+ * Invert nesting of <font> and <pre> in Fixture.exception.
+ * Change ColumnFixture to call execute() even without checks.
+ * Add package fat (fit acceptance test).
+
+Download in http:files/JavaDownloads/fit-b030420j.tgz
+
+ * Added BinaryChop example.
+ * Added trim to elements in ArrayAdapter.
+ * Print null elements as bland in ArrayAdapter.
+ * Correct jpg reference in CalculatorExample.
+ * Correct handling of Array types in RowFixture.
+
+Download http:files/JavaDownloads/fit-b021104j.tgz
+
+ * Change TimedActionFixture to fill empty splits with &nbsp;.
+ * Add a few more tests of unescape(String) to FrameworkTests.
+ * Change Summary lines to be gray as per ColorCode.
+ * Add elapsed run time to Summary.
+ * Change Fixture to have non-static Summary.
+ * Improve calculation of ScientificPrecision.
+ * Report values for unspecified cells.
+ * Change TypeAdapter to print null as "null".
+ * Add AllPairsExample (a "macroscopic" fixtures)
+ * Add FileFootnotes to ExampleTests fixture.
+ * Run ExampleTests in FrameworkTests.
+ * Change TypeAdapter to print array elements with spaces.
+
+Download http:files/JavaDownloads/fit-b021021j.tgz
+
+ * Add Counts class replacing static variables for right, wrong, etc.
+ * Change reflection to check for unexpected polymorphism.
+ * Add example that runs all ExampleTests.
+
+Download http:files/JavaDownloads/b021011.tgz
+
+ * Refactor and expand MusicExample
+ * Handle nested InvocationTargetException
+
+Download http:files/JavaDownloads/b021007.tgz
+
+ * Change ignoring so that only non-blank cells are ignored
+ * Change row matching to skip ignored columns
+ * Add color annotation (red/green) to count line of Summary
+ * Add TimedActionFixture which reports time of each step
+ * Add ColumnIndex (a RowFixture) to test legal column heads
+ * Add simulated realtime tests to MusicExample
+
+Download http:files/JavaDownloads/b021004.tgz
+
+ * Correct matching of duplicates in RowFixture
+ o (see degenerate cases in MusicExample)
+ * Simplify bindMethod in ColumnFixture
+ * Make use of ScientificPrecision optional.
+ * Add reset() and execute() methods to ColumnFixture
+ * Make all fields and methods be public, private or protected
+ * Refactor main() to simplify new runners
+
+Download http:files/JavaDownloads/b020927.tgz
+
+ * Add escape of "<" and "&" in actual values
+ * Improve handling of parse errors
+ * Add fixture for WebPageExample
+ * Change FrameworkTest to be date locale independent
+
+Download http:files/JavaDownloads/a020912.tar.gz
+
+ * Change "don't care" signal to blank.
+ * Add license notice and info.
+
+Download a020910.tar.gz (withdrawn)
+
+ * Add logic to accept n/a to omit checks if we "don't care."
+ * Package as "fit" for framework and "eg" for examples.
+ * Add RowFixture
+ * Add MusicExample as package "eg.music".
+
+Download a020905.tar.gz (withdrawn)
+
+ * Correct unformat() for complex formats.
+ * Moved main to FileRunner
+ * Replaced WikiFixture with WikiRunner
+ * Extend Fixture to parse Date
+ * Add TypeAdapter support for ALL primitive types.
+
+Download a020902.tar.gz (withdrawn)
+
+ * Add ActionFixture and some examples that use it.
+ * Extend TypeAdapter to handle Arrays.
+ * Modified spelling of Adapter to be consistent.
+
+Download a020827.tar.gz (withdrawn)
+
+ * Add logic to accept error as suggested in ExpectedErrors.
+ * Add Division fixture/implementation for SimpleExample.
+ * Removed type conversion in Fixture replaced by TypeAdapter
+
+Download a020823.tar.gz (withdrawn)
+
+ * Add boolean and fixed float/double in TypeAdapter.
+ * Add fixture/implementation for CalculatorExample.
+ * Add WikiFixture with main that looks for <wiki> ... </wiki> tags
+
+Download a020819.tar.gz (withdrawn)
+
+ * Parse HtmlTables from files.
+ * Apply test through variations on the Fixture.
+ * Run DataDriven test with the the ColumnFixture.
+ * Access variables and methods through the TypeAdapter.
+ * Write reports with results annotated in place.
+ * Test floats and doubles with ScientificPrecision.

Added: trunk/fit-1.1/doc/style.css
==============================================================================
--- (empty file)
+++ trunk/fit-1.1/doc/style.css Mon Mar 17 08:33:57 2008
@@ -0,0 +1,140 @@
+body {
+ font-family: Verdana, sans-serif;
+ font-size: 12px;
+ background: white;
+ color: black;
+}
+
+a:link { color: blue; }
+a:visited { color: purple }
+a:active { color: red; }
+a:hover { color: red; }
+
+h1 {
+ font-size: 1.5em;
+ font-weight: bold;
+ margin-top: 0;
+ text-align: center;
+ margin-bottom: 1em;
+}
+
+h2 {
+ font-size: 1.2em;
+ font-weight: bold;
+ margin-top: 1.5em;
+ margin-bottom: -0.25em;
+}
+
+table {
+ font-size: 12px;
+}
+
+.content table {
+ border-collapse: collapse;
+ margin-left: 3em;
+ margin-right: 3em;
+}
+
+th {
+ text-align: left;
+ text-decoration: underline;
+ font-variant: small-caps;
+ padding-right: 1em;
+}
+
+td {
+ vertical-align: top;
+}
+
+.content td {
+ text-align: left;
+ border: 0.1em solid grey;
+ padding: 0.25em 1em 0.25em 0.25em;
+}
+
+code {
+ font-family: monospace;
+ text-align: left;
+}
+
+li {
+ text-align: left;
+}
+
+.title {
+ font-size: 1.9em;
+ font-weight: bold;
+ text-align: center;
+}
+
+.menu {
+ font-size: 1.1em;
+ white-space: nowrap;
+ float: left;
+ margin-right: 1em;
+}
+
+.content {
+ text-align: justify;
+ float: left;
+}
+
+.code, .html {
+ text-align: left;
+ font-family: monospace;
+ margin: 1.5em 5em 1.5em 5em;
+ border: 1px dashed black;
+ padding: 0.5em;
+ background-color: #FFFFCC;
+}
+
+.emph {
+ font-weight: bold;
+}
+
+.demph {
+ color: grey;
+}
+
+.error {
+ background-color: red;
+ color: white;
+ padding: 0.2em;
+}
+
+.figure {
+ margin: 0em 1em 0em 1em;
+ font-size: .8em;
+}
+
+.keyword {
+ color: blue;
+}
+
+.comment {
+ color: green;
+}
+
+.asp {
+ color: black;
+ background-color: yellow;
+}
+
+.literal {
+ color: blue;
+}
+
+.tag {
+ color: brown;
+}
+
+.attribute {
+ color: red;
+}
+
+.end {
+ margin-top: 3em;
+ border-top: 1px solid black;
+ padding-top: 0.5em;
+ font-size: 0.75em;
+}

Added: trunk/fit-1.1/examples/eg/AllCombinations.java
==============================================================================
--- (empty file)
+++ trunk/fit-1.1/examples/eg/AllCombinations.java Mon Mar 17 08:33:57 2008
@@ -0,0 +1,47 @@
+// Copyright (c) 2002 Cunningham & Cunningham, Inc.
+// Released under the terms of the GNU General Public License version 2 or later.
+
+package eg;
+
+import fit.*;
+import java.util.*;
+
+public class AllCombinations extends AllFiles {
+
+ protected List lists = new ArrayList();
+ protected Parse row;
+ protected int caseNumber = 1;
+
+ public void doTable(Parse table) {
+ row = table.parts.last();
+ super.doTable(table);
+ combinations();
+ }
+
+ protected void doRow (Parse row, List files){
+ lists.add(files);
+ }
+
+ protected void combinations() {
+ combinations(0, new ArrayList(lists));
+ }
+
+ protected void combinations(int index, List combination) {
+ if (index == lists.size()) {
+ doCase(combination);
+ } else {
+ List files = (List)lists.get(index);
+ for (Iterator i=files.iterator(); i.hasNext(); ) {
+ combination.set(index, i.next());
+ combinations(index+1, combination);
+ }
+ }
+ }
+
+ protected void doCase(List combination) {
+ Parse number = tr(td("#"+caseNumber++, null), null);
+ number.leaf().addToTag(" colspan=2");
+ row.last().more = number;
+ super.doRow(number, combination);
+ }
+}

Added: trunk/fit-1.1/examples/eg/AllFiles.java
==============================================================================
--- (empty file)
+++ trunk/fit-1.1/examples/eg/AllFiles.java Mon Mar 17 08:33:57 2008
@@ -0,0 +1,179 @@
+// Copyright (c) 2002 Cunningham & Cunningham, Inc.
+// Released under the terms of the GNU General Public License version 2 or later.
+
+package eg;
+
+import fit.*;
+import java.io.*;
+import java.util.*;
+
+public class AllFiles extends Fixture {
+
+ public void doRow(Parse row) {
+ Parse cell = row.leaf();
+ List files = expand(cell.text());
+ if (files.size()>0) {
+ doRow(row, files);
+ } else {
+ ignore(cell);
+ info(cell, " no match");
+ }
+ }
+
+ protected List expand(String pattern) {
+ StringTokenizer tokens = new StringTokenizer(pattern, File.separator);
+ List files = new ArrayList();
+ expand(new File("."), tokens, files);
+ return files;
+ }
+
+ protected void expand(File path, StringTokenizer tokens, List result) {
+ if (tokens.hasMoreTokens()) {
+ File files[] = path.listFiles(new WildCard(tokens.nextToken()));
+ for (int i=0; i<files.length; i++) {
+ expand(files[i], tokens, result);
+ }
+ } else {
+ result.add(path);
+ }
+ }
+
+ protected void doRow(Parse row, List files) {
+ doFiles(row, files);
+ }
+
+ protected void doFiles(Parse row, List files) {
+ for (Iterator i=files.iterator(); i.hasNext(); ) {
+ File path = (File)i.next();
+ Parse cells = td(path.getName(), td("", null));
+ row = (row.more = tr(cells, row.more));
+ Fixture fixture = new Fixture();
+ run(path, fixture, cells);
+ summarize(fixture, path);
+ }
+ }
+
+ public static int runCount=0;
+
+ protected void run(File path, Fixture fixture, Parse cells) {
+ if (pushAndCheck(path)) {
+ ignore(cells);
+ info(cells, "recursive");
+ return;
+ }
+ try {
+ String input = read(path);
+ Parse tables;
+ if (input.indexOf("<wiki>") >= 0) {
+ tables = new Parse(input, new String[]{"wiki", "table", "tr", "td"});
+ fixture.doTables(tables.parts);
+ } else {
+ tables = new Parse(input, new String[]{"table", "tr", "td"});
+ fixture.doTables(tables);
+ }
+
+ info(cells.more, fixture.counts.toString());
+ if (fixture.counts.wrong == 0 && fixture.counts.exceptions == 0) {
+ right(cells.more);
+ } else {
+ wrong(cells.more);
+ cells.more.addToBody(tables.footnote());
+ }
+ } catch (Exception e) {
+ exception (cells, e);
+ }
+ pop(path);
+ }
+
+ public static List fileStack = new ArrayList();
+
+ protected boolean pushAndCheck(File path) {
+ String name = path.getAbsolutePath();
+ if (fileStack.contains(name)) {
+ return true;
+ }
+ fileStack.add(name);
+ return false;
+ }
+
+ protected void pop(File path) {
+ fileStack.remove(path.getAbsolutePath());
+ }
+
+ private void summarize(Fixture fixture, File path) {
+ fixture.summary.put("input file", path.getAbsolutePath());
+ fixture.summary.put("input update", new Date(path.lastModified()));
+ Counts runCounts = summary.containsKey("counts run")
+ ? (Counts)summary.get("counts run")
+ : new Counts();
+ runCounts.tally(fixture.counts);
+ summary.put("counts run", runCounts);
+ }
+
+ protected String read(File input) throws IOException {
+ char chars[] = new char[(int)(input.length())];
+ FileReader in = new FileReader(input);
+ in.read(chars);
+ in.close();
+ return new String(chars);
+ }
+
+
+ Parse tr (Parse cells, Parse more) {
+ return new Parse("tr", null, cells, more);
+ }
+
+ Parse td (String text, Parse more) {
+ return new Parse("td", info(text), null, more);
+ }
+
+ class WildCard implements FilenameFilter {
+
+ String prefix;
+ String sufix;
+ int minimum;
+
+ WildCard (String pattern) {
+ int star = pattern.indexOf("*");
+ if (star >= 0) {
+ prefix = pattern.substring(0, star);
+ sufix = pattern.substring(star+1);
+ minimum = prefix.length() + sufix.length();
+ } else {
+ prefix = pattern;
+ sufix = null;
+ minimum = prefix.length();
+ }
+ }
+
+ public boolean accept(File dir, String name) {
+ return
+ !(name.startsWith(".")) &&
+ name.length() >= minimum &&
+ name.startsWith(prefix) &&
+ (sufix==null
+ ? name.length() == minimum
+ : name.endsWith(sufix));
+ }
+ }
+
+ // Self Test ////////////////////////////////
+
+ public static class Expand extends ColumnFixture {
+
+ public String path;
+ AllFiles fixture = new AllFiles();
+
+ public String[] expansion() {
+ List files = fixture.expand(path);
+ String[] result = new String[files.size()];
+ for (int i=0; i<result.length; i++) {
+ result[i] = ((File)files.get(i)).getName();
+ }
+ return result;
+ }
+ }
+
+
+}
+

Added: trunk/fit-1.1/examples/eg/AllPairs.java
==============================================================================
--- (empty file)
+++ trunk/fit-1.1/examples/eg/AllPairs.java Mon Mar 17 08:33:57 2008
@@ -0,0 +1,307 @@
+// Copyright (c) 2002 Cunningham & Cunningham, Inc.
+// Released under the terms of the GNU General Public License version 2 or later.
+
+package eg;
+
+import fit.*;
+import java.util.*;
+import java.io.File;
+
+
+public class AllPairs extends AllCombinations {
+
+ public int rank;
+ public int steps=0;
+ public Map toItem = new HashMap();
+ public List vars = new ArrayList();
+ public SortedSet pairs = new TreeSet();
+
+ protected void combinations() {
+ populate();
+ generate();
+ }
+
+ // Populate /////////////////////////////////
+
+ protected void populate() {
+ doAllVars();
+ doAllVarPairs();
+ }
+
+ protected void doAllVars() {
+ rank = 0;
+ for (int i=0; i<lists.size(); i++) {
+ List files = (List) lists.get(i);
+ Var var = new Var(i, files);
+ vars.add(var);
+ doAllItems(var, files);
+ }
+ }
+
+ protected void doAllItems(Var var, List files) {
+ for (int i=0; i<files.size(); i++) {
+ Item item = new Item (var, i, rank++);
+ toItem.put(((File)files.get(i)).getName(), item);
+ var.items.add(item);
+ }
+ }
+
+ protected void doAllVarPairs() {
+ for (int i=0; i<vars.size(); i++) {
+ for (int j=i+1; j<vars.size(); j++) {
+ doAllItemPairs((Var)vars.get(i), (Var)vars.get(j));
+ }
+ }
+ }
+
+ protected void doAllItemPairs(Var vl, Var vr) {
+ for (int l=0; l<vl.size(); l++) {
+ for (int r=0; r<vr.size(); r++) {
+ pairs.add(new Pair(vl.get(l), vr.get(r)));
+ }
+ }
+ }
+
+ // Generate /////////////////////////////////
+
+ protected void generate() {
+ while(((Pair)pairs.first()).used == 0) {
+ emit(nextCase());
+ }
+ }
+
+ private Item[] nextCase() {
+ Item slug[] = new Item[vars.size()];
+ while (!isFull(slug)) {
+ Pair p=nextFit(slug);
+ fill(slug, p);
+ }
+ return slug;
+ }
+
+ protected void fill(Item[] slug, Pair pair) {
+ slug[pair.left.var.index] = pair.left;
+ slug[pair.right.var.index] = pair.right;
+ pair.used++;
+ pairs.add(pair);
+ }
+
+ protected boolean isFull (Item[]slug) {
+ for (int i=0; i<slug.length; i++) {
+ if (slug[i]==null) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ protected Pair nextFit(Item[] slug) {
+ List hold = new ArrayList();
+ Pair pair;
+ while(!(pair=nextPair()).isFit(slug)) {
+ hold.add(pair);
+ }
+ pairs.addAll(hold);
+ return pair;
+ }
+
+ protected Pair nextPair() {
+ Pair first = (Pair)pairs.first();
+ pairs.remove(first);
+ steps++;
+ return first;
+ }
+
+ protected void emit (Item[] slug) {
+ List combination = new ArrayList();
+ for (int i=0; i<slug.length; i++) {
+ combination.add(slug[i].file());
+ }
+ doCase(combination);
+ }
+
+ // Helper Classes ///////////////////////////
+
+ public class Var {
+ List files;
+ int index;
+ List items = new ArrayList();
+ Var (int index, List files) {this.index = index; this.files = files;}
+ int size() {return items.size();}
+ Item get(int index) {return (Item)items.get(index);}
+ }
+
+ public class Item {
+ Var var;
+ int index;
+ int rank;
+ Item (Var var, int i, int n) {this.var = var; index = i; rank=n;}
+ File file() {return (File)var.files.get(index);}
+ public String toString() {return file().getName();}
+ boolean isFit(Item[]slug) {return slug[var.index]==null || slug[var.index]==this;}
+ }
+
+ public class Pair implements Comparable {
+ public Item left, right;
+ public int used = 0;
+ Pair (Item left, Item right) {this.left=left; this.right=right;}
+ public String toString() {return left+"-"+right+" ("+used+")";}
+ boolean isFit(Item[]slug) {return left.isFit(slug) && right.isFit(slug);}
+ public int rank() {return rank*(rank*used+left.rank)+right.rank;}
+ public int compareTo(Object o) {return rank()-((Pair)o).rank();}
+ }
+
+ // Self Test Classes ////////////////////////
+
+ public static AllPairs fut;
+ public static List cases;
+
+ public static class Setup extends Fixture {
+
+ public void doTable(Parse table) {
+ fut = new AllPairs();
+ cases = new ArrayList();
+ super.doTable(table);
+ fut.populate();
+ }
+
+ public void doCell(Parse cell, int i) {
+ if (!cell.text().equals("")) {
+ while(fut.lists.size()<=i) {
+ fut.lists.add(new ArrayList());
+ }
+ ((List)fut.lists.get(i)).add(new File(cell.text()));
+ right(cell);
+ }
+ }
+ }
+
+
+ public static class Cases extends RowFixture {
+ public static class Case {
+ public int number;
+ public Item[] items;
+ Case(int n, Item[] i) {number=n; items=i;}
+ }
+ public Object[] query() {
+ while(((Pair)fut.pairs.first()).used==0) {
+ cases.add(fut.nextCase());
+ }
+ List result = new ArrayList();
+ for (int i=0; i<cases.size(); i++) {
+ result.add(new Case(i+1, (Item[])cases.get(i)));
+ }
+ return result.toArray();
+ }
+ public Class getTargetClass(){
+ return Case.class;
+ }
+ }
+
+ public static class Pairs extends RowFixture {
+ public Object[] query () {
+ return fut.pairs.toArray();
+ }
+ public Class getTargetClass() {
+ return Pair.class;
+ }
+ public Object parse (String s, Class type) throws Exception {
+ if (s.equals("null")) {return null;}
+ if (type.equals(Item.class)) {return fut.toItem.get(s);}
+ return super.parse(s, type);
+ }
+ }
+
+ public static class Step extends ColumnFixture {
+ static Pair next;
+ static Item slug[] = new Item[3];
+ static List hold = new ArrayList();
+
+ public String next() {
+ next=fut.nextPair();
+ hold.add(next);
+ return next.toString();
+ }
+
+ public String nextFit() {
+ next=fut.nextFit(slug);
+ hold.add(next);
+ return next.toString();
+ }
+
+ public int rank() {
+ return next.rank();
+ }
+
+ public boolean isFit() {
+ boolean isFit = next.isFit(slug);
+ if (isFit) {
+ fut.fill(slug, next);
+ fut.pairs.addAll(hold);
+ hold=new ArrayList();
+ }
+ return isFit;
+ }
+
+ public int hold() {
+ return hold.size();
+ }
+
+ public Item[] slug() {
+ return slug;
+ }
+
+ public boolean isFull() {
+ boolean result = fut.isFull(slug);
+ if(result){
+ cases.add(slug);
+ slug=new Item[3];
+ }
+ return result;
+ }
+
+ public Object parse (String s, Class type) throws Exception {
+ if (s.equals("null")) {return null;}
+ if (type.equals(Item.class)) {return fut.toItem.get(s);}
+ return super.parse(s, type);
+ }
+ }
+
+ public static class Stats extends ColumnFixture {
+ public int[] items;
+ public int pairs;
+ public int steps;
+ public long msec;
+
+ public int cases() {
+ AllPairs ap = new AllPairs();
+ setup(ap);
+ ap.populate();
+ return generate(ap);
+ }
+
+ void setup(AllPairs ap) {
+ int name=0;
+ for (int i=0; i<items.length; i++) {
+ List l = new ArrayList();
+ for (int j=0; j<items[i]; j++) {
+ l.add(new File(Integer.toString(name++)));
+ }
+ ap.lists.add(l);
+ }
+ }
+
+ int generate(AllPairs ap) {
+ int cases=0;
+ msec = System.currentTimeMillis();
+ while(((Pair)ap.pairs.first()).used == 0) {
+ ap.nextCase();
+ cases++;
+ }
+ pairs=ap.pairs.size();
+ steps=ap.steps;
+ msec = System.currentTimeMillis()-msec;
+ return cases;
+ }
+ }
+}
\ No newline at end of file

Added: trunk/fit-1.1/examples/eg/ArithmeticColumnFixture.java
==============================================================================
--- (empty file)
+++ trunk/fit-1.1/examples/eg/ArithmeticColumnFixture.java Mon Mar 17 08:33:57 2008
@@ -0,0 +1,42 @@
+package eg;
+
+// Copyright (c) 2002 Cunningham & Cunningham, Inc.
+// Released under the terms of the GNU General Public License version 2 or later.
+
+import fit.ColumnFixture;
+import fit.ScientificDouble;
+
+public class ArithmeticColumnFixture extends ColumnFixture {
+
+ public int x;
+ public int y;
+
+ public int plus () {
+ return x + y;
+ }
+
+ public int minus() {
+ return x - y;
+ }
+
+ public int times () {
+ return x * y;
+ }
+
+ public int divide () {
+ return x / y;
+ }
+
+ public float floating () {
+ return (float)x / (float)y;
+ }
+
+ public ScientificDouble sin () {
+ return new ScientificDouble(Math.sin(Math.toRadians(x)));
+ }
+
+ public ScientificDouble cos () {
+ return new ScientificDouble(Math.cos(Math.toRadians(x)));
+ }
+
+}

Added: trunk/fit-1.1/examples/eg/ArithmeticFixture.java
==============================================================================
--- (empty file)
+++ trunk/fit-1.1/examples/eg/ArithmeticFixture.java Mon Mar 17 08:33:57 2008
@@ -0,0 +1,28 @@
+package eg;
+
+// Copyright (c) 2002 Cunningham & Cunningham, Inc.
+// Released under the terms of the GNU General Public License version 2 or later.
+
+import fit.*;
+
+public class ArithmeticFixture extends PrimitiveFixture {
+
+ int x=0;
+ int y=0;
+
+ public void doRows(Parse rows) {
+ super.doRows(rows.more); // skip column heads
+ }
+
+ public void doCell(Parse cell, int column) {
+ switch (column) {
+ case 0: x = (int)parseLong(cell); break;
+ case 1: y = (int)parseLong(cell); break;
+ case 2: check(cell, x+y); break;
+ case 3: check(cell, x-y); break;
+ case 4: check(cell, x*y); break;
+ case 5: check(cell, x/y); break;
+ default: ignore(cell); break;
+ }
+ }
+}

Added: trunk/fit-1.1/examples/eg/BinaryChop.java
==============================================================================
--- (empty file)
+++ trunk/fit-1.1/examples/eg/BinaryChop.java Mon Mar 17 08:33:57 2008
@@ -0,0 +1,114 @@
+// Copyright (c) 2003 Cunningham & Cunningham, Inc.
+// Read license.txt in this directory.
+
+package eg;
+
+import fit.*;
+
+import java.util.*;
+
+public class BinaryChop extends ColumnFixture {
+
+// Test Fixture /////////////////////////////////
+
+ public int key, array[];
+
+ public void execute() {
+ int empty[] = {};
+ if (array==null) array=empty;
+ }
+
+ public int result() {
+ return chopFriday(key, array) ;
+ }
+
+ public int mon() {return chopMonday(key, array);}
+ public int tue() {return chopTuesday(key, array);}
+ public int wed() {return chopWednesday(key, array);}
+ public int thr() {return chopThursday(key, array);}
+ public int fri() {return chopFriday(key, array);}
+
+// Search Methods ///////////////////////////////
+
+ int chopMonday (int key, int array[]) {
+ int min = 0;
+ int max = array.length-1;
+ while (min<=max) {
+ int probe = (min+max)/2;
+ if (key == array[probe]) {
+ return probe;
+ } else if (key > array[probe]) {
+ min = probe+1;
+ } else {
+ max = probe-1;
+ }
+ }
+ return -1;
+ }
+
+ int chopTuesday (int key, int array[]) {
+ int min = 0;
+ int max = array.length-1;
+ while (min<=max) {
+ int probe = (min+max)/2;
+ switch (new Integer(key).compareTo(new Integer(array[probe]))) {
+ case (0):
+ return probe;
+ case (1):
+ min = probe+1;
+ break;
+ case (-1):
+ max = probe-1;
+ break;
+ default:
+ throw new Error("unexpected result from compareTo");
+ }
+ }
+ return -1;
+ }
+
+ int chopWednesday (int key, int array[]) {
+ if (array.length==0) return -1;
+ int probe = array.length/2;
+ if (key==array[probe]) return probe;
+ if (key<array[probe]) return chopWednesday(key, subarray(array, 0, probe));
+ int result = chopWednesday(key, subarray(array, probe+1, array.length-(probe+1)));
+ return result < 0 ? result : result + probe+1;
+ }
+
+ int chopThursday (int key, int array[]) {
+ int min = 0;
+ int max = array.length-1;
+ Random gen = new Random();
+
+ while (min<=max) {
+ int probe = (int)(gen.nextDouble()*(max-min))+min;
+ if (key == array[probe]) {
+ return probe;
+ } else if (key > array[probe]) {
+ min = probe+1;
+ } else {
+ max = probe-1;
+ }
+ }
+ return -1;
+ }
+
+ int chopFriday (int key, int array[]) {
+ for (int i=0; i<array.length; i++) {
+ if (key==array[i]) return i;
+ }
+ return -1;
+ }
+
+
+// Utilities ////////////////////////////////////
+
+ int[] subarray (int[] source, int pos, int length) {
+ int dest[] = new int [length];
+ for (int i=0; i<length; i++)
+ dest[i]=source[pos+i];
+ return dest;
+ }
+
+}

Added: trunk/fit-1.1/examples/eg/Calculator.java
==============================================================================
--- (empty file)
+++ trunk/fit-1.1/examples/eg/Calculator.java Mon Mar 17 08:33:57 2008
@@ -0,0 +1,110 @@
+package eg;
+
+// Copyright (c) 2002 Cunningham & Cunningham, Inc.
+// Released under the terms of the GNU General Public License version 2 or later.
+
+import fit.*;
+
+public class Calculator extends ColumnFixture {
+
+ public float volts;
+ public String key;
+
+ public static HP35 hp = new HP35();
+
+ public boolean points() {
+ return false;
+ }
+
+ public boolean flash() {
+ return false;
+ }
+
+ public float watts() {
+ return 0.5f;
+ }
+
+ public void reset () {
+ key = null;
+ }
+
+ public void execute () throws Exception {
+ if (key != null) {
+ hp.key(key);
+ }
+ }
+
+ public ScientificDouble x() {
+ return new ScientificDouble(hp.r[0]);
+ }
+
+ public ScientificDouble y() {
+ return new ScientificDouble(hp.r[1]);
+ }
+
+ public ScientificDouble z() {
+ return new ScientificDouble(hp.r[2]);
+ }
+
+ public ScientificDouble t() {
+ return new ScientificDouble(hp.r[3]);
+ }
+
+
+ static class HP35 {
+
+ double r[] = {0,0,0,0};
+ double s=0;
+
+ public void key(String key) throws Exception {
+ if (numeric(key)) {push(Double.parseDouble(key));}
+ else if (key.equals("enter")) {push();}
+ else if (key.equals("+")) {push(pop()+pop());}
+ else if (key.equals("-")) {double t=pop(); push(pop()-t);}
+ else if (key.equals("*")) {push(pop()*pop());}
+ else if (key.equals("/")) {double t=pop(); push(pop()/t);}
+ else if (key.equals("x^y")) {push(Math.exp(Math.log(pop())*pop()));}
+ else if (key.equals("clx")) {r[0]=0;}
+ else if (key.equals("clr")) {r[0]=r[1]=r[2]=r[3]=0;}
+ else if (key.equals("chs")) {r[0]=-r[0];}
+ else if (key.equals("x<>y")) {double t=r[0]; r[0]=r[1]; r[1]=t;}
+ else if (key.equals("r!")) {r[3]=pop();}
+ else if (key.equals("sto")) {s=r[0];}
+ else if (key.equals("rcl")) {push(s);}
+ else if (key.equals("sqrt")) {push(Math.sqrt(pop()));}
+ else if (key.equals("ln")) {push(Math.log(pop()));}
+ else if (key.equals("sin")) {push(Math.sin(Math.toRadians(pop())));}
+ else if (key.equals("cos")) {push(Math.cos(Math.toRadians(pop())));}
+ else if (key.equals("tan")) {push(Math.tan(Math.toRadians(pop())));}
+ else {throw new Exception("can't do key: "+key);
+ }
+ }
+
+ boolean numeric (String key) {
+ return key.length()>= 1 &&
+ (Character.isDigit(key.charAt(0)) ||
+ (key.length()>= 2 &&
+ (key.charAt(0) == '-' &&
+ Character.isDigit(key.charAt(1)))));
+ }
+
+ void push() {
+ for (int i=3; i>0; i--) {
+ r[i] = r[i-1];
+ }
+ }
+
+ void push(double value) {
+ push();
+ r[0] = value;
+ }
+
+ double pop() {
+ double result = r[0];
+ for (int i=0; i<3; i++) {
+ r[i] = r[i+1];
+ }
+ return result;
+ }
+ }
+}
\ No newline at end of file

Added: trunk/fit-1.1/examples/eg/ColumnIndex.java
==============================================================================
--- (empty file)
+++ trunk/fit-1.1/examples/eg/ColumnIndex.java Mon Mar 17 08:33:57 2008
@@ -0,0 +1,96 @@
+// Copyright (c) 2002 Cunningham & Cunningham, Inc.
+// Released under the terms of the GNU General Public License version 2 or later.
+
+package eg;
+
+import fit.*;
+
+import java.lang.reflect.Method;
+import java.lang.reflect.Field;
+import java.util.*;
+
+public class ColumnIndex extends RowFixture {
+
+ Parse rows;
+
+ public void doRows(Parse rows) {
+ this.rows = rows;
+ super.doRows(rows);
+ }
+
+ public Class getTargetClass() {
+ return Column.class;
+ }
+
+ public Object[] query() throws ClassNotFoundException {
+ // first find what classes are mentioned in the table
+ Set names = new HashSet();
+ int column=0;
+ for (Parse cell=rows.parts; cell != null; column++, cell = cell.more) {
+ if (cell.text().equals("className")) {
+ break;
+ }
+ }
+ for (Parse row = rows.more; row != null; row = row.more) {
+ names.add(row.at(0,column).text());
+ }
+ // then find the columns in these classes
+ ArrayList columns = new ArrayList();
+ for (Iterator i=names.iterator(); i.hasNext(); ) {
+ Class each = Class.forName((String)i.next());
+ Field f[] = each.getFields();
+ for (int j=0; j<f.length; j++) {
+ if(f[j].getModifiers()==1) {
+ columns.add(new Column(f[j]));
+ }
+ }
+ Method m[] = each.getMethods();
+ for (int j=0; j<m.length; j++) {
+ if(m[j].getParameterTypes().length == 0 && m[j].getModifiers()==1) {
+ columns.add(new Column(m[j]));
+ }
+ }
+ }
+ return columns.toArray();
+ }
+
+ public Object parse (String text, Class type) throws Exception {
+ if (type.equals(Class.class)) {return parseClass(text);}
+ return super.parse(text, type);
+ }
+
+ Class parseClass(String name) throws Exception {
+ if (name.equals("byte")) {return Byte.TYPE;}
+ if (name.equals("short")) {return Short.TYPE;}
+ if (name.equals("int")) {return Integer.TYPE;}
+ if (name.equals("long")) {return Long.TYPE;}
+ if (name.equals("float")) {return Float.TYPE;}
+ if (name.equals("double")) {return Double.TYPE;}
+ if (name.equals("char")) {return Character.TYPE;}
+ return Class.forName(name);
+ }
+
+ public class Column {
+ public Object column;
+ public Class className;
+ public String columnName;
+ public Class columnType;
+
+ Column (Field f) {
+ column = f;
+ className = f.getDeclaringClass();
+ columnName = f.getName();
+ columnType = f.getType();
+ }
+
+ Column (Method m) {
+ column = m;
+ className = m.getDeclaringClass();
+ columnName = m.getName() + "()";
+ columnType = m.getReturnType();
+ }
+ }
+
+}
+
+

Added: trunk/fit-1.1/examples/eg/Division.java
==============================================================================
--- (empty file)
+++ trunk/fit-1.1/examples/eg/Division.java Mon Mar 17 08:33:57 2008
@@ -0,0 +1,14 @@
+package eg;
+
+// Copyright (c) 2002 Cunningham & Cunningham, Inc.
+// Released under the terms of the GNU General Public License version 2 or later.
+
+import fit.ColumnFixture;
+
+public class Division extends ColumnFixture {
+ public float numerator;
+ public float denominator;
+ public float quotient() {
+ return numerator / denominator;
+ }
+}

Added: trunk/fit-1.1/examples/eg/ExampleTests.java
==============================================================================
--- (empty file)
+++ trunk/fit-1.1/examples/eg/ExampleTests.java Mon Mar 17 08:33:57 2008
@@ -0,0 +1,78 @@
+// Copyright (c) 2002 Cunningham & Cunningham, Inc.
+// Read license.txt in this directory.
+
+package eg;
+
+import fit.*;
+import java.io.*;
+
+public class ExampleTests extends ColumnFixture {
+
+ public String file;
+ public boolean wiki;
+
+ protected String input;
+ protected Parse tables;
+ protected Fixture fixture;
+ protected Counts runCounts = new Counts();
+ protected String footnote = null;
+
+ protected void run() throws Exception {
+ input = read(new File("Documents/"+file));
+ fixture = new Fixture();
+ if (wiki) {
+ tables = new Parse(input, new String[]{"wiki", "table", "tr", "td"});
+ fixture.doTables(tables.parts);
+ } else {
+ tables = new Parse(input, new String[]{"table", "tr", "td"});
+ fixture.doTables(tables);
+ }
+ runCounts.tally(fixture.counts);
+ summary.put("counts run", runCounts);
+ }
+
+
+ public int right() throws Exception {
+ run();
+ return fixture.counts.right;
+ }
+
+ public int wrong() {
+ return fixture.counts.wrong;
+ }
+
+ public int ignores() {
+ return fixture.counts.ignores;
+ }
+
+ public int exceptions() {
+ return fixture.counts.exceptions;
+ }
+
+ protected String read(File input) throws IOException {
+ char chars[] = new char[(int)(input.length())];
+ FileReader in = new FileReader(input);
+ in.read(chars);
+ in.close();
+ return new String(chars);
+ }
+
+
+ // Footnote /////////////////////////////////
+
+ Parse fileCell;
+
+ public void doRow(Parse row) {
+ fileCell = row.leaf();
+ super.doRow(row);
+ }
+
+ public void wrong(Parse cell) {
+ super.wrong(cell);
+ if (footnote==null) {
+ footnote = tables.footnote();
+ fileCell.addToBody(footnote);
+ }
+ }
+
+}

Added: trunk/fit-1.1/examples/eg/Page.java
==============================================================================
--- (empty file)
+++ trunk/fit-1.1/examples/eg/Page.java Mon Mar 17 08:33:57 2008
@@ -0,0 +1,91 @@
+// Copyright (c) 2002 Cunningham & Cunningham, Inc.
+// Released under the terms of the GNU General Public License version 2 or later.
+
+package eg;
+
+import fit.*;
+import java.net.*;
+import java.io.*;
+import java.util.StringTokenizer;
+
+public class Page extends RowFixture {
+ static URL url;
+ static String text;
+
+ // actions //////////////////////////////////
+
+ public void location(String url) throws Exception {
+ Page.url = new URL(url);
+ Page.text = get(Page.url);
+ }
+
+ public String title() throws Exception {
+ return new Parse(text, new String[]{"title"}).text();
+ }
+
+ public void link (String label) throws Exception {
+ Parse links = new Parse (text, new String[]{"a"});
+ while (!links.text().startsWith(label)) {
+ links = links.more;
+ }
+ StringTokenizer tokens = new StringTokenizer(links.tag, "<> =\"");
+ while (!tokens.nextToken().toLowerCase().equals("href")) {};
+ url = new URL(url, tokens.nextToken());
+ text = get(url);
+ }
+
+ // rows /////////////////////////////////////
+
+ public Class getTargetClass() {
+ return Row.class;
+ }
+
+ public Object[] query() throws Exception {
+ String tags[] = {"wiki", "table", "tr", "td"};
+ Parse rows = new Parse(text, tags).at(0, 0, 2);
+ Row result[] = new Row[rows.size()];
+ for (int i=0; i<result.length; i++) {
+ result[i] = new Row(rows);
+ rows = rows.more;
+ }
+ return result;
+ }
+
+ public class Row {
+ Parse cells;
+
+ Row(Parse row) {
+ this.cells = row.parts;
+ }
+
+ public String numerator() {
+ return cells.at(0).text();
+ }
+
+ public String denominator() {
+ return cells.at(1).text();
+ }
+
+ public String quotient() {
+ return cells.at(2).text();
+ }
+ }
+
+
+ // utilities ////////////////////////////////
+
+ private String get(URL url) throws IOException {
+ Page.url = url;
+ InputStream stream = (InputStream) url.getContent();
+ BufferedReader reader = new BufferedReader(new InputStreamReader(stream));
+ StringBuffer buffer = new StringBuffer(10000);
+ for (String line; (line = reader.readLine()) != null; ) {
+ buffer.append(line);
+ buffer.append('\n');
+ }
+ return buffer.toString();
+ }
+
+
+
+}
\ No newline at end of file

Added: trunk/fit-1.1/examples/eg/Sqrt.java
==============================================================================
--- (empty file)
+++ trunk/fit-1.1/examples/eg/Sqrt.java Mon Mar 17 08:33:57 2008
@@ -0,0 +1,15 @@
+package eg;
+
+// Copyright (c) 2002 Cunningham & Cunningham, Inc.
+// Released under the terms of the GNU General Public License version 2 or later.
+
+import fit.ColumnFixture;
+
+public class Sqrt extends ColumnFixture {
+ public double value;
+ public double sqrt() throws Exception {
+ if (value < 0) throw new Exception("netagive sqrt");
+ return Math.sqrt(value);
+ }
+}
+

Added: trunk/fit-1.1/examples/eg/music/Browser.java
==============================================================================
--- (empty file)
+++ trunk/fit-1.1/examples/eg/music/Browser.java Mon Mar 17 08:33:57 2008
@@ -0,0 +1,99 @@
+// Copyright (c) 2002 Cunningham & Cunningham, Inc.
+// Released under the terms of the GNU General Public License version 2 or later.
+
+package eg.music;
+
+import fit.*;
+
+public class Browser extends Fixture {
+
+
+ // Library //////////////////////////////////
+
+ public void library (String path) throws Exception {
+ MusicLibrary.load(path);
+ }
+
+ public int totalSongs() {
+ return MusicLibrary.library.length;
+ }
+
+ // Select Detail ////////////////////////////
+
+ public String playing () {
+ return MusicPlayer.playing.title;
+ }
+
+ public void select (int i) {
+ MusicLibrary.select(MusicLibrary.library[i-1]);
+ }
+
+ public String title() {
+ return MusicLibrary.looking.title;
+ }
+
+ public String artist() {
+ return MusicLibrary.looking.artist;
+ }
+
+ public String album() {
+ return MusicLibrary.looking.album;
+ }
+
+ public int year() {
+ return MusicLibrary.looking.year;
+ }
+
+ public double time() {
+ return MusicLibrary.looking.time();
+ }
+
+ public String track() {
+ return MusicLibrary.looking.track();
+ }
+
+ // Search Buttons ///////////////////////////
+
+ public void sameAlbum() {
+ MusicLibrary.findAlbum(MusicLibrary.looking.album);
+ }
+
+ public void sameArtist() {
+ MusicLibrary.findArtist(MusicLibrary.looking.artist);
+ }
+
+ public void sameGenre() {
+ MusicLibrary.findGenre(MusicLibrary.looking.genre);
+ }
+
+ public void sameYear() {
+ MusicLibrary.findYear(MusicLibrary.looking.year);
+ }
+
+ public int selectedSongs() {
+ return MusicLibrary.displayCount();
+ }
+
+ public void showAll() {
+ MusicLibrary.findAll();
+ }
+
+ // Play Buttons /////////////////////////////
+
+ public void play() {
+ MusicPlayer.play(MusicLibrary.looking);
+ }
+
+ public void pause() {
+ MusicPlayer.pause();
+ }
+
+ public String status() {
+ return Music.status;
+ }
+
+ public double remaining() {
+ return MusicPlayer.minutesRemaining();
+ }
+
+}

Added: trunk/fit-1.1/examples/eg/music/Dialog.java
==============================================================================
--- (empty file)
+++ trunk/fit-1.1/examples/eg/music/Dialog.java Mon Mar 17 08:33:57 2008
@@ -0,0 +1,26 @@
+// Copyright (c) 2002 Cunningham & Cunningham, Inc.
+// Read license.txt in this directory.
+
+package eg.music;
+
+import fit.*;
+
+public class Dialog extends Fixture {
+ String message;
+ Fixture caller;
+
+ Dialog (String message, Fixture caller) {
+ this.message = message;
+ this.caller = caller;
+ }
+
+ public String message() {
+ return message;
+ }
+
+ public void ok () {
+ if (message.equals("load jamed")) {MusicPlayer.stop();}
+ ActionFixture.actor = caller;
+ }
+
+}

Added: trunk/fit-1.1/examples/eg/music/Display.java
==============================================================================
--- (empty file)
+++ trunk/fit-1.1/examples/eg/music/Display.java Mon Mar 17 08:33:57 2008
@@ -0,0 +1,23 @@
+// Copyright (c) 2002 Cunningham & Cunningham, Inc.
+// Released under the terms of the GNU General Public License version 2 or later.
+
+package eg.music;
+
+import java.util.Date;
+
+public class Display extends fit.RowFixture {
+
+ public Class getTargetClass() {
+ return Music.class;
+ }
+
+ public Object[] query() {
+ return MusicLibrary.displayContents();
+ }
+
+ public Object parse (String s, Class type) throws Exception {
+ if (type.equals(Date.class)) {return Music.dateFormat.parse(s);}
+ return super.parse (s, type);
+ }
+
+}

Added: trunk/fit-1.1/examples/eg/music/Music.java
==============================================================================
--- (empty file)
+++ trunk/fit-1.1/examples/eg/music/Music.java Mon Mar 17 08:33:57 2008
@@ -0,0 +1,67 @@
+// Copyright (c) 2002 Cunningham & Cunningham, Inc.
+// Released under the terms of the GNU General Public License version 2 or later.
+
+package eg.music;
+
+import java.util.*;
+import java.text.*;
+
+
+public class Music {
+
+ static String status = "ready";
+
+ public String title;
+ public String artist;
+ public String album;
+ public String genre;
+ public long size;
+ public int seconds;
+ public int trackNumber;
+ public int trackCount;
+ public int year;
+ public Date date;
+ public transient boolean selected = false;
+
+
+ // Accessors ////////////////////////////////
+
+ public String track() {
+ return trackNumber + " of " + trackCount;
+ }
+
+ public double time() {
+ return Math.round(seconds / 0.6) / 100.0;
+ }
+
+ public String toString() {
+ if (title != null) {
+ return title;
+ } else {
+ return super.toString();
+ }
+ }
+
+
+ // Factory //////////////////////////////////
+
+ static DateFormat dateFormat = new SimpleDateFormat("M/d/yy h:mm a");
+
+ static Music parse(String string) throws ParseException {
+ Music m = new Music();
+ StringTokenizer t = new StringTokenizer(string,"\t");
+ m.title = t.nextToken();
+ m.artist = t.nextToken();
+ m.album = t.nextToken();
+ m.genre = t.nextToken();
+ m.size = Long.parseLong(t.nextToken());
+ m.seconds = Integer.parseInt(t.nextToken());
+ m.trackNumber = Integer.parseInt(t.nextToken());
+ m.trackCount = Integer.parseInt(t.nextToken());
+ m.year = Integer.parseInt(t.nextToken());
+ m.date = dateFormat.parse(t.nextToken());
+ return m;
+ }
+
+
+}

Added: trunk/fit-1.1/examples/eg/music/Music.txt
==============================================================================
--- (empty file)
+++ trunk/fit-1.1/examples/eg/music/Music.txt Mon Mar 17 08:33:57 2008
@@ -0,0 +1,38 @@
+Name Artist Album Genre Size Time Track Number Track Count Year Date
+Akila Toure Kunda The Toure Kunda Collection World 5306074 265 9 10 1996 9/9/02 9:01 AM
+American Tango Weather Report Mysterious Traveller Jazz 4446151 222 2 7 1974 9/7/02 9:26 PM
+Ananas James Taylor Hourglass Pop 6897450 344 5 13 1997 9/7/02 11:47 PM
+Another Grey Morning James Taylor JT Pop 3284199 164 4 12 1977 9/7/02 11:32 PM
+Cellohachi Part 1 Gideon Freudmann Sound Of Distant Deer New Age 4893909 244 4 9 1998 9/8/02 1:27 AM
+Cellohachi Part 2 Gideon Freudmann Sound Of Distant Deer New Age 4303019 215 5 9 1998 9/8/02 1:27 AM
+Cellohachi Part 3 Gideon Freudmann Sound Of Distant Deer New Age 2500570 124 6 9 1998 9/8/02 1:27 AM
+Coolsville Laurie Anderson Strange Angels Alternative 5542243 277 3 10 1989 9/9/02 8:30 AM
+Copperline James Taylor New Moon Shine Pop 5248087 262 1 12 1991 9/7/02 9:52 PM
+Dice Are Rolling Andrew Lloyd Webber Evita Soundtrack 6161383 307 10 13 1979 9/7/02 5:51 PM
+El Vals De Tomas Pepe & The Bottle Blondes Latenight Betty Latin 4889706 244 7 12 2000 9/9/02 12:23 AM
+Guerrilla Toure Kunda The Toure Kunda Collection World 6097588 304 3 10 1996 9/9/02 9:01 AM
+Handy Man James Taylor JT Pop 3976956 198 7 12 1977 9/7/02 11:36 PM
+Hiawatha Laurie Anderson Strange Angels Alternative 8248005 412 10 10 1989 9/9/02 8:30 AM
+High Flying, Adored Andrew Lloyd Webber Evita Soundtrack 4492160 224 2 13 1979 9/7/02 5:30 PM
+I've Got The Blues Lyle Lovett I Love Everybody Country 4272161 213 16 18 1994 9/8/02 8:02 PM
+Licorice Particleboard Gideon Freudmann Hologram Crackers New Age 3306675 165 14 17 1999 9/8/02 12:24 AM
+Mhaire Bruineall Clannad Clannad In Concert Celtic 1656778 82 4 8 1987 9/9/02 1:15 AM
+Muddy River Laurie Anderson Bright Red Alternative 3733522 186 7 14 1994 9/7/02 8:29 PM
+Night In Baghdad Laurie Anderson Bright Red Alternative 4064760 203 12 14 1994 9/7/02 8:38 PM
+Nil Se'n La Clannad Clannad In Concert Celtic 13821475 690 8 8 1987 9/9/02 1:15 AM
+No Woman No Cry Bob Marley Legend Reggae 8552070 427 2 14 1984 9/9/02 12:06 AM
+1. Allegro ma non troppo Emerson Quartet Dvorak Op. 96 Classical 10956970 547 1 8 1986 9/9/02 8:34 AM
+2. Lento Emerson Quartet Dvorak Op. 96 Classical 9336790 466 2 8 1986 9/8/02 12:38 AM
+3. Molto vivace Emerson Quartet Dvorak Op. 96 Classical 4383458 219 3 8 1986 9/8/02 12:38 AM
+4. Finale. Vivace, ma non troppo Emerson Quartet Dvorak Op. 96 Classical 6476928 323 4 8 1986 9/8/02 12:38 AM
+Penguins Lyle Lovett I Love Everybody Country 3025066 151 10 18 1994 9/8/02 7:54 PM
+Rainbow Country Ziggy Marley Jahmekya Reggae 4068927 203 3 16 1991 9/8/02 10:32 PM
+Redemption Song Bob Marley Legend Reggae 4589289 229 11 14 1984 9/9/02 12:23 AM
+Robin Hood Changes His Oil Gideon Freudmann Hologram Crackers New Age 5236082 261 3 17 1999 9/8/02 12:24 AM
+Rumba De 5 Kilos Pepe & The Bottle Blondes Latenight Betty Latin 3661951 182 1 12 2000 9/9/02 12:23 AM
+Sailing To Philadelphia James Taylor October Rose Pop 6581911 328 3 3 2001 9/7/02 10:45 PM
+Scarlet Woman Weather Report Mysterious Traveller Jazz 6880762 343 6 7 1974 9/7/02 9:44 PM
+Sing Sing Sing Pepe & The Bottle Blondes Latenight Betty Latin 4425770 221 11 12 2000 9/9/02 12:23 AM
+Slippery Lettuce Gideon Freudmann Sound Of Distant Deer New Age 5731393 286 2 9 1998 9/8/02 1:27 AM
+Ti Mon Bo Tito Puente Mondobeat World 7878131 393 2 12 1998 9/9/02 8:52 AM
+Zahrafat A Sa'ld Musicians Of The Nile Mondobeat World 8546887 427 6 12 1998 9/9/02 8:54 AM
\ No newline at end of file

Added: trunk/fit-1.1/examples/eg/music/MusicLibrary.java
==============================================================================
--- (empty file)
+++ trunk/fit-1.1/examples/eg/music/MusicLibrary.java Mon Mar 17 08:33:57 2008
@@ -0,0 +1,90 @@
+// Copyright (c) 2002 Cunningham & Cunningham, Inc.
+// Read license.txt in this directory.
+
+package eg.music;
+
+import java.io.*;
+import java.util.*;
+
+public class MusicLibrary {
+ static Music looking = null;
+ static Music library[] = {};
+
+ static void load(String name) throws Exception {
+ List music = new ArrayList();
+ BufferedReader in = new BufferedReader(new FileReader(name));
+ in.readLine(); // skip column headings
+ while(in.ready()) {
+ music.add(Music.parse(in.readLine()));
+ }
+ in.close();
+ library = (Music[])music.toArray(library);
+ }
+
+ static void select(Music m) {
+ looking = m;
+ }
+
+ static void search(double seconds){
+ Music.status = "searching";
+ Simulator.nextSearchComplete = Simulator.schedule(seconds);
+ }
+
+ static void searchComplete() {
+ Music.status = MusicPlayer.playing == null ? "ready" : "playing";
+ }
+
+ static void findAll() {
+ search(3.2);
+ for (int i=0; i<library.length; i++) {
+ library[i].selected = true;
+ }
+ }
+
+ static void findArtist(String a) {
+ search(2.3);
+ for (int i=0; i<library.length; i++) {
+ library[i].selected = library[i].artist.equals(a);
+ }
+ }
+
+ static void findAlbum(String a) {
+ search(1.1);
+ for (int i=0; i<library.length; i++) {
+ library[i].selected = library[i].album.equals(a);
+ }
+ }
+
+ static void findGenre(String a) {
+ search(0.2);
+ for (int i=0; i<library.length; i++) {
+ library[i].selected = library[i].genre.equals(a);
+ }
+ }
+
+ static void findYear(int a) {
+ search(0.8);
+ for (int i=0; i<library.length; i++) {
+ library[i].selected = library[i].year == a;
+ }
+ }
+
+ static int displayCount() {
+ int count = 0;
+ for (int i=0; i<library.length; i++) {
+ count += (library[i].selected ? 1 : 0);
+ }
+ return count;
+ }
+
+ static Music[] displayContents () {
+ Music displayed[] = new Music[displayCount()];
+ for (int i=0, j=0; i<library.length; i++) {
+ if (library[i].selected) {
+ displayed[j++] = library[i];
+ }
+ }
+ return displayed;
+ }
+
+}

Added: trunk/fit-1.1/examples/eg/music/MusicPlayer.java
==============================================================================
--- (empty file)
+++ trunk/fit-1.1/examples/eg/music/MusicPlayer.java Mon Mar 17 08:33:57 2008
@@ -0,0 +1,67 @@
+// Copyright (c) 2002 Cunningham & Cunningham, Inc.
+// Read license.txt in this directory.
+
+package eg.music;
+
+public class MusicPlayer {
+
+ static Music playing = null;
+ static double paused = 0;
+
+ // Controls /////////////////////////////////
+
+ static void play(Music m) {
+ if (paused == 0) {
+ Music.status = "loading";
+ double seconds = m == playing ? 0.3 : 2.5 ;
+ Simulator.nextPlayStarted = Simulator.schedule(seconds);
+ } else {
+ Music.status = "playing";
+ Simulator.nextPlayComplete = Simulator.schedule(paused);
+ paused = 0;
+ }
+ }
+
+ static void pause() {
+ Music.status = "pause";
+ if (playing != null && paused == 0) {
+ paused = (Simulator.nextPlayComplete - Simulator.time) / 1000.0;
+ Simulator.nextPlayComplete = 0;
+ }
+ }
+
+ static void stop() {
+ Simulator.nextPlayStarted = 0;
+ Simulator.nextPlayComplete = 0;
+ playComplete();
+ }
+
+ // Status ///////////////////////////////////
+
+ static double secondsRemaining() {
+ if (paused != 0) {
+ return paused;
+ } else if (playing != null) {
+ return (Simulator.nextPlayComplete - Simulator.time) / 1000.0;
+ } else {
+ return 0;
+ }
+ }
+
+ static double minutesRemaining() {
+ return Math.round(secondsRemaining() / .6) / 100.0;
+ }
+
+ // Events ///////////////////////////////////
+
+ static void playStarted() {
+ Music.status = "playing";
+ playing = MusicLibrary.looking;
+ Simulator.nextPlayComplete = Simulator.schedule(playing.seconds);
+ }
+
+ static void playComplete() {
+ Music.status = "ready";
+ playing = null;
+ }
+}

Added: trunk/fit-1.1/examples/eg/music/Realtime.java
==============================================================================
--- (empty file)
+++ trunk/fit-1.1/examples/eg/music/Realtime.java Mon Mar 17 08:33:57 2008
@@ -0,0 +1,49 @@
+// Copyright (c) 2002 Cunningham & Cunningham, Inc.
+// Released under the terms of the GNU General Public License version 2 or later.
+
+package eg.music;
+
+import fit.*;
+import java.util.Date;
+
+public class Realtime extends TimedActionFixture {
+
+ Simulator system = Simulator.system;
+
+ public Date time () {
+ return new Date(Simulator.time);
+ }
+
+ public void pause () {
+ double seconds = Double.parseDouble(cells.more.text());
+ system.delay(seconds);
+ }
+
+ public void await () throws Exception {
+ system("wait", cells.more);
+ }
+
+ public void fail () throws Exception {
+ system("fail", cells.more);
+ }
+
+ public void enter() throws Exception {
+ system.delay(0.8);
+ super.enter();
+ }
+
+ public void press() throws Exception {
+ system.delay(1.2);
+ super.press();
+ }
+
+ private void system(String prefix, Parse cell) throws Exception {
+ String method = camel(prefix+" "+cell.text());
+ Class[] empty = {};
+ try {
+ system.getClass().getMethod(method,empty).invoke(system,empty);
+ } catch (Exception e) {
+ exception (cell, e);
+ }
+ }
+}

Added: trunk/fit-1.1/examples/eg/music/Simulator.java
==============================================================================
--- (empty file)
+++ trunk/fit-1.1/examples/eg/music/Simulator.java Mon Mar 17 08:33:57 2008
@@ -0,0 +1,71 @@
+// Copyright (c) 2002 Cunningham & Cunningham, Inc.
+// Released under the terms of the GNU General Public License version 2 or later.
+
+package eg.music;
+
+import fit.*;
+import java.util.Date;
+
+public class Simulator {
+
+ // This discrete event simulator supports three events
+ // each of which is open coded in the body of the simulator.
+
+ static Simulator system = new Simulator();
+ static long time = new Date().getTime();
+
+ public static long nextSearchComplete = 0;
+ public static long nextPlayStarted = 0;
+ public static long nextPlayComplete = 0;
+
+ long nextEvent(long bound) {
+ long result = bound;
+ result = sooner(result, nextSearchComplete);
+ result = sooner(result, nextPlayStarted);
+ result = sooner(result, nextPlayComplete);
+ return result;
+ }
+
+ long sooner (long soon, long event) {
+ return event > time && event < soon ? event : soon;
+ }
+
+ void perform() {
+ if (time == nextSearchComplete) {MusicLibrary.searchComplete();}
+ if (time == nextPlayStarted) {MusicPlayer.playStarted();}
+ if (time == nextPlayComplete) {MusicPlayer.playComplete();}
+ }
+
+ void advance (long future) {
+ while (time < future) {
+ time = nextEvent(future);
+ perform();
+ }
+ }
+
+ static long schedule(double seconds){
+ return time + (long)(1000 * seconds);
+ }
+
+ void delay (double seconds) {
+ advance(schedule(seconds));
+ }
+
+ public void waitSearchComplete() {
+ advance(nextSearchComplete);
+ }
+
+ public void waitPlayStarted() {
+ advance(nextPlayStarted);
+ }
+
+ public void waitPlayComplete() {
+ advance(nextPlayComplete);
+ }
+
+ public void failLoadJam() {
+ ActionFixture.actor = new Dialog("load jamed", ActionFixture.actor);
+ }
+
+
+}

Added: trunk/fit-1.1/examples/eg/net/GeoCoordinate.java
==============================================================================
--- (empty file)
+++ trunk/fit-1.1/examples/eg/net/GeoCoordinate.java Mon Mar 17 08:33:57 2008
@@ -0,0 +1,59 @@
+package eg.net;
+
+// Copyright (c) 2002 Cunningham & Cunningham, Inc.
+// Released under the terms of the GNU General Public License version 2 or later.
+
+// import java.util.regex.*;
+
+import java.util.StringTokenizer;
+import java.text.DecimalFormat;
+
+public class GeoCoordinate {
+
+ float lat;
+ float lon;
+
+ public GeoCoordinate (float lat, float lon) {
+ this.lat = lat;
+ this.lon = lon;
+ }
+
+ public static GeoCoordinate parse (String string) {
+ StringTokenizer t = new StringTokenizer (string, "nNsSeEwW \'\",", true);
+ float n[] = {0,0,0,0,0,0};
+ boolean north=true, east=true;
+ for (int i=0; i<6 && t.hasMoreTokens(); ) {
+ String token = t.nextToken().toLowerCase();
+ char ch = token.charAt(0);
+ if (Character.isDigit(ch) || ch == '-') {n[i++] = Float.parseFloat(token);}
+ if (ch == 's') {north = false;}
+ if (ch == 'w') {east = false;}
+ if (i>0 && "nsew".indexOf(ch)>=0) {i = 3;}
+ }
+ float lat = n[0] + n[1]/60 + n[2]/3600;
+ float lon = n[3] + n[4]/60 + n[5]/3600;
+ return new GeoCoordinate(north?lat:-lat, east?lon:-lon);
+ }
+
+ static double precision = 0.00001;
+
+ public boolean equals(Object arg) {
+ if (!getClass().isInstance(arg)) return false;
+ GeoCoordinate coord = (GeoCoordinate)arg;
+ return
+ ((long)(lat/precision)) == ((long)(coord.lat/precision)) &&
+ ((long)(lon/precision)) == ((long)(coord.lon/precision));
+ }
+
+ public long hash() {
+ return ((long)(lat/precision)) + ((long)(lon/precision));
+ }
+
+ public String toString () {
+ DecimalFormat coord = new DecimalFormat();
+ coord.setMaximumFractionDigits(4);
+ return
+ coord.format(Math.abs(lat)) + (lat>=0 ? "N " : "S ") +
+ coord.format(Math.abs(lon)) + (lon>=0 ? "E " : "W ");
+ }
+}

Added: trunk/fit-1.1/examples/eg/net/Simulator.java
==============================================================================
--- (empty file)
+++ trunk/fit-1.1/examples/eg/net/Simulator.java Mon Mar 17 08:33:57 2008
@@ -0,0 +1,55 @@
+package eg.net;
+
+// Copyright (c) 2002 Cunningham & Cunningham, Inc.
+// Released under the terms of the GNU General Public License version 2 or later.
+
+import fit.Fixture;
+
+public class Simulator extends Fixture {
+ int zip[];
+ GeoCoordinate coord;
+ int nodes=0;
+
+ public void newCity() {
+ }
+
+ public void ok() {
+ nodes++;
+ }
+
+ public void cancel() {
+ }
+
+ public void name(String n) {
+ }
+
+ public void zip(int[] z) {
+ zip = z;
+ }
+
+ public int[] zip() {
+ return zip;
+ }
+
+ public void population (Float p) {
+ }
+
+ public void coord (GeoCoordinate c) {
+ coord = c;
+ }
+
+ public GeoCoordinate coord () {
+ return coord;
+ }
+
+
+ public int nodes() {
+ return nodes;
+ }
+
+ public Object parse (String string, Class type) throws Exception {
+ if (type.equals(GeoCoordinate.class)) {return GeoCoordinate.parse(string);}
+ return super.parse (string, type);
+ }
+
+}

Added: trunk/fit-1.1/examples/input/AllCombinations.html
==============================================================================
--- (empty file)
+++ trunk/fit-1.1/examples/input/AllCombinations.html Mon Mar 17 08:33:57 2008
@@ -0,0 +1,55 @@
+<html>
+<head>
+ <title>Wiki: All Combinations</title>
+<head>
+<body bgcolor=#FFFFFF link=#d06040 vlink=#806040>
+ <h1>All Combinations</h1>
+ <wiki>This is the second of a suite of fixtures that make up the AllPairsExample. Like with AllFiles, we expand wildcard characters in path specifications to get lists of tests. But this time we run all combinations of the tests. This is another warmup for AllPairs testing.
+<p><p><hr>
+<p>A project can expect to have dozens or hundreds of files testing specific features in a stand-alone way. We may wonder if there are any interactions between features that will cause any of these tests to fail. AllCombinations explores this. It is a fixture that enumerates cases by drawing one file at a time from each of a number of lists; running each in turn, and then repeating the drawing and running for all possible combinations.
+<p>For the purpose of illustration we've created a number of files that contain small tests of the CalculatorExample. We've categorized the files as <em>magnitudes, signs</em> and <em>functions,</em> which enter values, changes signs, and compute functions, respectivly.
+<p><UL>
+<li> <a href="Release/Documents/AllPairs/">http:Release/Documents/AllPairs/</a>
+<p></UL>
+This table runs all possible sequences of magnitude, sign and function. Try it with <a href="run.cgi">http:run.cgi</a>.
+<p><table BORDER CELLSPACING=0 CELLPADDING=3>
+<tr><td ColSpan=2> eg.AllCombinations </td></tr>
+<tr><td> Documents/AllPairs/magnitude/*.html </td><td>&nbsp;</td></tr>
+<tr><td> Documents/AllPairs/sign/*.html </td><td>&nbsp;</td></tr>
+<tr><td> Documents/AllPairs/function/*.html </td><td>&nbsp;</td></tr>
+</table>
+<p>The number of cases will as large as the product of the size of each list of tests. The searches in the table find four magnitues, three signs and two functions.
+<p><UL>
+<li> 4 magnitudes X 3 signs X 2 functions = 24 cases
+<p></UL>
+Any file of any case can fail. We save the results from failed tests only. A single file can fail different ways in different cases. Look for differences in the counts or examine each FileFootnote.
+<p>If the tests are intended to interact, as ours are here, then some care is required to be sure that checks in the tests are independent of this interaction. No checks at all my be suitable if we are only testing that there are no exceptions thrown. Or the simplest checks may be adaquate so long as features are tested well in isolation. It may be convenient to run a simulation, a so called <em>oracale</em>, along side the application to generate expected results.
+<p><hr>
+<p><strong>Implementation</strong>
+<p>The fixture inherits path expansion from AllFiles, but captures these by overrinding <em>doRows(Parse, List)</em> and saving the list of files in a list of lists. Then, at the end of <em>doTable</em>, the fixture gets to work computing and running combinations.
+<p>See source.
+<p><UL>
+<li> <a href="Release/Source/eg/AllCombinations.java">http:Release/Source/eg/AllCombinations.java</a>
+<p></UL>
+We had a little trouble setting up the test data for this example so we wrote this little <em>Trigonometry Refresher</em>.
+<p><table BORDER CELLSPACING=0 CELLPADDING=3>
+<tr><td ColSpan=3> eg.ArithmeticColumnFixture </td></tr>
+<tr><td> x </td><td> sin() </td><td> cos() </td></tr>
+<tr><td> 0 </td><td> 0.0000 </td><td> 1.0000 </td></tr>
+<tr><td> 30 </td><td> 0.5000 </td><td> 0.8660 </td></tr>
+<tr><td> 60 </td><td> 0.8660 </td><td> 0.5000 </td></tr>
+<tr><td> 90 </td><td> 1.0000 </td><td> 0.0000 </td></tr>
+<tr><td> 120 </td><td> 0.8660 </td><td> -0.5000 </td></tr>
+<tr><td> 150 </td><td> 0.5000 </td><td> -.8660 </td></tr>
+<tr><td> 180 </td><td> 0.0000 </td><td> -1.0000 </td></tr>
+</table>
+<p><hr>
+<p><p><table BORDER CELLSPACING=0 CELLPADDING=3>
+<tr><td ColSpan=2> fit.Summary </td></tr>
+</table>
+<p></wiki>
+<hr>
+ Last edited November 4, 2002
+</body>
+</html>
+

Added: trunk/fit-1.1/examples/input/AllFiles.html
==============================================================================
--- (empty file)
+++ trunk/fit-1.1/examples/input/AllFiles.html Mon Mar 17 08:33:57 2008
@@ -0,0 +1,60 @@
+<html>
+<head>
+ <title>Wiki: All Files</title>
+<head>
+<body bgcolor=#FFFFFF link=#d06040 vlink=#806040>
+ <h1>All Files</h1>
+ <wiki>This is the first of a suite of fixtures that make up the AllPairsExample. It and AllCombinations are warmups for AllPairs testing.
+<p><hr>
+<p>A project can expect to have dozens to hundreds of files filled with specifications, explainations and associated tests. The AllFiles fixture seeks out these files and runs them all, one after another, and reports a "rolled-up" accounting of their results.
+<p>Like the ExampleTests fixture, the AllFiles fixture will take as its tabular input a list of files to be run. But here, unlike that fixture, we will expand wildcard characters in order to find all the tests in a particular place, whether we know what they are now or not.
+<p>Here are wildcard path expressions that find lots of other tests. Try runing them with <a href="run.cgi">http:run.cgi</a>.
+<p><table BORDER CELLSPACING=0 CELLPADDING=3>
+<tr><td ColSpan=2> eg.AllFiles </td></tr>
+<tr><td> Documents/*Example.html </td><td>&nbsp;</td></tr>
+<tr><td> Documents/Music*.html </td><td>&nbsp;</td></tr>
+</table>
+<p>The AllFiles fixture adds rows to this table for each of the files it finds. The first column is the expanded file name, the second, the resulting counts for that run. We mark the results "wrong" if there are any wrongs or exceptions. That means the above tests will never pass because we have intentional errors in these files.
+<p>Use AllFiles when you expect all your tests to pass and only want to know when this expectation is unfounded. AllFiles does not create output files for the tests it runs unless there is a problem. Problem run results are saved and cited along with the counts in a FileFootnote that looks like [1], [2], and so on.
+<p>Test counts can sore when we start running files over and over. LessonsLearned advise us to not take big "right" counts too seriously so we don't. In fact a file with 100 right and no wrong counts as 1 right from this fixtures perspective. You can see this in the <em>counts</em> reported in the summary:
+<p><table BORDER CELLSPACING=0 CELLPADDING=3>
+<tr><td ColSpan=2> fit.Summary </td></tr>
+</table>
+<p>(Note: See more complete summary below.)
+<p>You will also note that the fixture reports total counts for the files it runs under <em>counts run</em> in the summary because, lessons not withstanding, we like to know.
+<p><hr>
+<p><strong>Implementation</strong>
+<p>The fixture distinguishes expandings the path specifications (doRow) from running the list of files produced (doFiles). This fixture does the files as they are expanded. The AllCombinations and AllPairs refinements expand all rows before they start doing.
+<p>The path expansion only expands one wildcard character, star (*), which means <em>any characters</em> here. The star can appear anywhere in a name and in any or all names that make up a path. But the expansion we've coded has the restriction that only one star is expanded in any component of the path.
+<p>The expanded file names will refer to files that may or may not use the &lt;wiki&gt; tag convention (See WikiRunner). This fixture is happy to run either file format and lets the presence of a &lt;wiki&gt; tag in the file indicate the need for its processing.
+<p>See the source.
+<p><UL>
+<li> <a href="Release/Source/eg/AllFiles.java">http:Release/Source/eg/AllFiles.java</a>
+<p></UL>
+This class includes an implementation of FileFootnote that is discussed on that page.
+<p><hr>
+<p><table BORDER CELLSPACING=0 CELLPADDING=3>
+<tr><td ColSpan=2> eg.AllFiles$Expand </td></tr>
+<tr><td> path </td><td> expansion() </td></tr>
+<tr><td> Documents/*Example.html </td><td> CalculatorExample.html,MusicExample.html,NetworkExample.html,WebPageExample.html </td></tr>
+<tr><td> Documents/Music*.html </td><td> MusicExample.html,MusicExampleWithErrors.html </td></tr>
+<tr><td> Documents/AllPairs/magnitude/*.html </td><td> 180+30.html,30.html,360+30.html,90-30.html </td></tr>
+<tr><td> Documents/AllPairs/sign/*.html </td><td> change-sign.html,multiply.html,no-change.html </td></tr>
+<tr><td> Documents/AllPairs/function/*.html </td><td> cosine.html,sine.html </td></tr>
+<tr><td> Documents/AllPairs/function/*sine.html </td><td> cosine.html,sine.html </td></tr>
+<tr><td> Documents/AllPairs/function/*.xml </td><td>&nbsp;</td></tr>
+<tr><td> Documents/AllPairs/func* </td><td>&nbsp;</td></tr>
+<tr><td> Documents/AllPairs/* </td><td>&nbsp;</td></tr>
+<tr><td> Documents/AllPairs* </td><td>&nbsp;</td></tr>
+<tr><td> Documents/* </td><td>&nbsp;</td></tr>
+</table>
+<p>We've added some more tests to this document so the totals in the summary increase.
+<p><table BORDER CELLSPACING=0 CELLPADDING=3>
+<tr><td ColSpan=2> fit.Summary </td></tr>
+</table>
+<p></wiki>
+<hr>
+ Last edited April 20, 2003
+</body>
+</html>
+

Added: trunk/fit-1.1/examples/input/AllPairs.html
==============================================================================
--- (empty file)
+++ trunk/fit-1.1/examples/input/AllPairs.html Mon Mar 17 08:33:57 2008
@@ -0,0 +1,51 @@
+<html>
+<head>
+ <title>Wiki: All Pairs</title>
+<head>
+<body bgcolor=#FFFFFF link=#d06040 vlink=#806040>
+ <h1>All Pairs</h1>
+ <wiki>This is the third and final fixture of a suite that make up the AllPairsExample. Like with AllFiles, we expand wildcard characters in path specifications to get lists of tests. And, like in AllCombinations, we enumerate cases drawing from these lists one test at a time in sequence. But here our goal is only to test all possible pairs of test, which will require fewer cases.
+<p><hr>
+<p>Here is the same specification we used to test the CalculatorExample in AllCombinations. Try it using AllPairs.
+<p><a href="run.cgi">http:run.cgi</a>
+<p><table BORDER CELLSPACING=0 CELLPADDING=3>
+<tr><td ColSpan=2> eg.AllPairs </td></tr>
+<tr><td> Documents/AllPairs/magnitude/*.html </td><td>&nbsp;</td></tr>
+<tr><td> Documents/AllPairs/sign/*.html </td><td>&nbsp;</td></tr>
+<tr><td> Documents/AllPairs/function/*.html </td><td>&nbsp;</td></tr>
+</table>
+<p>To meet the "all pairs" requirement we need at least n X m cases, where n and m are the sizes of the two largest categories. That means with only two categories all combinations and all pairs are the same. The marvel of the all pairs algorithm is that it squeezes draws from additional categories into these same cases and possibly a few more.
+<p><table BORDER CELLSPACING=0 CELLPADDING=3>
+<tr><td ColSpan=2> fit.Summary </td></tr>
+</table>
+<p><hr>
+<p><strong>Implementation</strong>
+<p>The algorithm is largely JamesBach's from the source cited on the AllPairsExample page. My implementation can be summarized as follows.
+<p><UL>
+<li> Fill test cases with tests drawn from a list of <em>most wanted</em> pairs.
+<li> Fill one case at a time. Never reexamine a case once filled.
+<li> Recirculate used pairs back to the list but as <em>less wanted</em>.
+<li> Quit filling cases when all pairs have been used at least once.
+<p></UL>
+The case currently being filled is called the <em>slug.</em> A pair will fit the slug only if the following hold.
+<p><UL>
+<li> At least one item of a pair is of a category that is not already filled.
+<li> The other item must match the slug in its category or must also be unfilled.
+<p></UL>
+The fixture uses these helper objects to represent the state of the algorithm.
+<p><UL>
+<li> Item -- A value from within a category.
+<li> Pair -- Two Items drawn from different categories.
+<li> Var -- A category, one per list of files.
+<p></UL>
+See the source.
+<p><UL>
+<li> <a href="Release/Source/eg/AllPairs.java">http:Release/Source/eg/AllPairs.java</a>
+<p></UL>
+See AllPairsAlgorithm for some tests we've written for this algorithm itself.
+</wiki>
+<hr>
+ Last edited November 9, 2002
+</body>
+</html>
+

Added: trunk/fit-1.1/examples/input/AllPairs/function/cosine.html
==============================================================================
--- (empty file)
+++ trunk/fit-1.1/examples/input/AllPairs/function/cosine.html Mon Mar 17 08:33:57 2008
@@ -0,0 +1,57 @@
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <meta name="GENERATOR" content="Mozilla/4.77C-CCK-MCD {C-UDP; EBM-APPLE} (Macintosh; U; PPC) [Netscape]">
+ <title>change-sign.html</title>
+</head>
+<body>
+Check cosine function.
+<br>&nbsp;
+<table BORDER CELLSPACING=0 CELLPADDING=3 >
+<tr>
+<td>eg.Calculator</td>
+
+<td>&nbsp;</td>
+</tr>
+
+<tr>
+<td>key</td>
+
+<td>x()</td>
+</tr>
+
+<tr>
+<td>enter</td>
+
+<td></td>
+</tr>
+
+<tr>
+<td>cos</td>
+
+<td></td>
+</tr>
+
+<tr>
+<td>enter</td>
+
+<td></td>
+</tr>
+
+<tr>
+<td>*</td>
+
+<td></td>
+</tr>
+
+<tr>
+<td>sqrt</td>
+
+<td>0.8660</td>
+</tr>
+</table>
+
+<p>See <a href="http://fit.c2.com/wiki.cgi?AllPairsExample">AllPairsExample</a>.
+</body>
+</html>
\ No newline at end of file

Added: trunk/fit-1.1/examples/input/AllPairs/function/sine.html
==============================================================================
--- (empty file)
+++ trunk/fit-1.1/examples/input/AllPairs/function/sine.html Mon Mar 17 08:33:57 2008
@@ -0,0 +1,57 @@
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <meta name="GENERATOR" content="Mozilla/4.77C-CCK-MCD {C-UDP; EBM-APPLE} (Macintosh; U; PPC) [Netscape]">
+ <title>change-sign.html</title>
+</head>
+<body>
+Check sine function.
+<br>&nbsp;
+<table BORDER CELLSPACING=0 CELLPADDING=3 >
+<tr>
+<td>eg.Calculator</td>
+
+<td>&nbsp;</td>
+</tr>
+
+<tr>
+<td>key</td>
+
+<td>x()</td>
+</tr>
+
+<tr>
+<td>enter</td>
+
+<td></td>
+</tr>
+
+<tr>
+<td>sin</td>
+
+<td></td>
+</tr>
+
+<tr>
+<td>enter</td>
+
+<td></td>
+</tr>
+
+<tr>
+<td>*</td>
+
+<td></td>
+</tr>
+
+<tr>
+<td>sqrt</td>
+
+<td>0.5000</td>
+</tr>
+</table>
+
+<p>See <a href="http://fit.c2.com/wiki.cgi?AllPairsExample">AllPairsExample</a>.
+</body>
+</html>
\ No newline at end of file

Added: trunk/fit-1.1/examples/input/AllPairs/magnitude/180+30.html
==============================================================================
--- (empty file)
+++ trunk/fit-1.1/examples/input/AllPairs/magnitude/180+30.html Mon Mar 17 08:33:57 2008
@@ -0,0 +1,45 @@
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <meta name="GENERATOR" content="Mozilla/4.77C-CCK-MCD {C-UDP; EBM-APPLE} (Macintosh; U; PPC) [Netscape]">
+ <title>change-sign.html</title>
+</head>
+<body>
+Enter 180+30 degrees.
+<br>&nbsp;
+<table BORDER CELLSPACING=0 CELLPADDING=3 >
+<tr>
+<td>eg.Calculator</td>
+
+<td></td>
+</tr>
+
+<tr>
+<td>key</td>
+
+<td>x()</td>
+</tr>
+
+<tr>
+<td>180</td>
+
+<td>&nbsp;</td>
+</tr>
+
+<tr>
+<td>30</td>
+
+<td>&nbsp;</td>
+</tr>
+
+<tr>
+<td>+</td>
+
+<td>&nbsp;210.000</td>
+</tr>
+</table>
+
+<p>See <a href="http://fit.c2.com/wiki.cgi?AllPairsExample">AllPairsExample</a>.
+</body>
+</html>
\ No newline at end of file

Added: trunk/fit-1.1/examples/input/AllPairs/magnitude/30.html
==============================================================================
--- (empty file)
+++ trunk/fit-1.1/examples/input/AllPairs/magnitude/30.html Mon Mar 17 08:33:57 2008
@@ -0,0 +1,33 @@
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <meta name="GENERATOR" content="Mozilla/4.77C-CCK-MCD {C-UDP; EBM-APPLE} (Macintosh; U; PPC) [Netscape]">
+ <title>change-sign.html</title>
+</head>
+<body>
+Enter thirty degrees.
+<br>&nbsp;
+<table BORDER CELLSPACING=0 CELLPADDING=3 >
+<tr>
+<td>eg.Calculator</td>
+
+<td>&nbsp;</td>
+</tr>
+
+<tr>
+<td>key</td>
+
+<td>x()</td>
+</tr>
+
+<tr>
+<td>30</td>
+
+<td>30.0000</td>
+</tr>
+</table>
+
+<p>See <a href="http://fit.c2.com/wiki.cgi?AllPairsExample">AllPairsExample</a>.
+</body>
+</html>
\ No newline at end of file

Added: trunk/fit-1.1/examples/input/AllPairs/magnitude/360+30.html
==============================================================================
--- (empty file)
+++ trunk/fit-1.1/examples/input/AllPairs/magnitude/360+30.html Mon Mar 17 08:33:57 2008
@@ -0,0 +1,45 @@
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <meta name="GENERATOR" content="Mozilla/4.77C-CCK-MCD {C-UDP; EBM-APPLE} (Macintosh; U; PPC) [Netscape]">
+ <title>change-sign.html</title>
+</head>
+<body>
+Enter 360+30 degrees.
+<br>&nbsp;
+<table BORDER CELLSPACING=0 CELLPADDING=3 >
+<tr>
+<td>eg.Calculator</td>
+
+<td>&nbsp;</td>
+</tr>
+
+<tr>
+<td>key</td>
+
+<td>x()</td>
+</tr>
+
+<tr>
+<td>360</td>
+
+<td>&nbsp;</td>
+</tr>
+
+<tr>
+<td>30</td>
+
+<td>&nbsp;</td>
+</tr>
+
+<tr>
+<td>+</td>
+
+<td>390.0000</td>
+</tr>
+</table>
+
+<p>See <a href="http://fit.c2.com/wiki.cgi?AllPairsExample">AllPairsExample</a>.
+</body>
+</html>
\ No newline at end of file

Added: trunk/fit-1.1/examples/input/AllPairs/magnitude/90-30.html
==============================================================================
--- (empty file)
+++ trunk/fit-1.1/examples/input/AllPairs/magnitude/90-30.html Mon Mar 17 08:33:57 2008
@@ -0,0 +1,45 @@
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <meta name="GENERATOR" content="Mozilla/4.77C-CCK-MCD {C-UDP; EBM-APPLE} (Macintosh; U; PPC) [Netscape]">
+ <title>change-sign.html</title>
+</head>
+<body>
+Enter 90-30 degrees.
+<br>&nbsp;
+<table BORDER CELLSPACING=0 CELLPADDING=3 >
+<tr>
+<td>eg.Calculator</td>
+
+<td>&nbsp;&nbsp;</td>
+</tr>
+
+<tr>
+<td>key</td>
+
+<td>x()</td>
+</tr>
+
+<tr>
+<td>90</td>
+
+<td>&nbsp;</td>
+</tr>
+
+<tr>
+<td>30</td>
+
+<td>&nbsp;</td>
+</tr>
+
+<tr>
+<td>-</td>
+
+<td>60.0000</td>
+</tr>
+</table>
+
+<p>See <a href="http://fit.c2.com/wiki.cgi?AllPairsExample">AllPairsExample</a>.
+</body>
+</html>
\ No newline at end of file

Added: trunk/fit-1.1/examples/input/AllPairs/sign/change-sign.html
==============================================================================
--- (empty file)
+++ trunk/fit-1.1/examples/input/AllPairs/sign/change-sign.html Mon Mar 17 08:33:57 2008
@@ -0,0 +1,27 @@
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <meta name="GENERATOR" content="Mozilla/4.77C-CCK-MCD {C-UDP; EBM-APPLE} (Macintosh; U; PPC) [Netscape]">
+ <title>change-sign.html</title>
+</head>
+<body>
+Change sign using the <b>ch s</b> key.
+<br>&nbsp;
+<table BORDER CELLSPACING=0 CELLPADDING=3 >
+<tr>
+<td>eg.Calculator</td>
+</tr>
+
+<tr>
+<td>key</td>
+</tr>
+
+<tr>
+<td>ch s</td>
+</tr>
+</table>
+
+<p>See <a href="http://fit.c2.com/wiki.cgi?AllPairsExample">AllPairsExample</a>.
+</body>
+</html>
\ No newline at end of file

Added: trunk/fit-1.1/examples/input/AllPairs/sign/multiply.html
==============================================================================
--- (empty file)
+++ trunk/fit-1.1/examples/input/AllPairs/sign/multiply.html Mon Mar 17 08:33:57 2008
@@ -0,0 +1,31 @@
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <meta name="GENERATOR" content="Mozilla/4.77C-CCK-MCD {C-UDP; EBM-APPLE} (Macintosh; U; PPC) [Netscape]">
+ <title>change-sign.html</title>
+</head>
+<body>
+Change sign by multiplying.
+<br>&nbsp;
+<table BORDER CELLSPACING=0 CELLPADDING=3 >
+<tr>
+<td>eg.Calculator</td>
+</tr>
+
+<tr>
+<td>key</td>
+</tr>
+
+<tr>
+<td>-1</td>
+</tr>
+
+<tr>
+<td>*</td>
+</tr>
+</table>
+
+<p>See <a href="http://fit.c2.com/wiki.cgi?AllPairsExample">AllPairsExample</a>.
+</body>
+</html>
\ No newline at end of file

Added: trunk/fit-1.1/examples/input/AllPairs/sign/no-change.html
==============================================================================
--- (empty file)
+++ trunk/fit-1.1/examples/input/AllPairs/sign/no-change.html Mon Mar 17 08:33:57 2008
@@ -0,0 +1,23 @@
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <meta name="GENERATOR" content="Mozilla/4.77C-CCK-MCD {C-UDP; EBM-APPLE} (Macintosh; U; PPC) [Netscape]">
+ <title>change-sign.html</title>
+</head>
+<body>
+Don't change sign
+<br>&nbsp;
+<table BORDER CELLSPACING=0 CELLPADDING=3 >
+<tr>
+<td>eg.Calculator</td>
+</tr>
+
+<tr>
+<td>key</td>
+</tr>
+</table>
+
+<p>See <a href="http://fit.c2.com/wiki.cgi?AllPairsExample">AllPairsExample</a>.
+</body>
+</html>
\ No newline at end of file

Added: trunk/fit-1.1/examples/input/BasicEmployeeCompensation.html
==============================================================================
--- (empty file)
+++ trunk/fit-1.1/examples/input/BasicEmployeeCompensation.html Mon Mar 17 08:33:57 2008
@@ -0,0 +1,263 @@
+<html xmlns:o="urn:schemas-microsoft-com:office:office"
+xmlns:w="urn:schemas-microsoft-com:office:word"
+xmlns:st1="urn:schemas-microsoft-com:office:smarttags"
+xmlns="http://www.w3.org/TR/REC-html40">
+
+<head>
+<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
+<meta name=ProgId content=Word.Document>
+<meta name=Generator content="Microsoft Word 10">
+<meta name=Originator content="Microsoft Word 10">
+<link rel=File-List href="BasicEmployeeCompensation_files/filelist.xml">
+<title>Basic Employee Compensation</title>
+<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
+ name="PersonName"/>
+<!--[if gte mso 9]><xml>
+ <o:DocumentProperties>
+ <o:Author>Jim Little</o:Author>
+ <o:LastAuthor>Jim Little</o:LastAuthor>
+ <o:Revision>2</o:Revision>
+ <o:TotalTime>3</o:TotalTime>
+ <o:Created>2005-03-13T00:09:00Z</o:Created>
+ <o:LastSaved>2005-03-13T00:09:00Z</o:LastSaved>
+ <o:Pages>1</o:Pages>
+ <o:Words>62</o:Words>
+ <o:Characters>358</o:Characters>
+ <o:Company>Titanium I.T. LLC</o:Company>
+ <o:Lines>2</o:Lines>
+ <o:Paragraphs>1</o:Paragraphs>
+ <o:CharactersWithSpaces>419</o:CharactersWithSpaces>
+ <o:Version>10.6626</o:Version>
+ </o:DocumentProperties>
+</xml><![endif]--><!--[if gte mso 9]><xml>
+ <w:WordDocument>
+ <w:SpellingState>Clean</w:SpellingState>
+ <w:GrammarState>Clean</w:GrammarState>
+ <w:Compatibility>
+ <w:BreakWrappedTables/>
+ <w:SnapToGridInCell/>
+ <w:WrapTextWithPunct/>
+ <w:UseAsianBreakRules/>
+ </w:Compatibility>
+ <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
+ </w:WordDocument>
+</xml><![endif]--><!--[if !mso]><object
+ classid="clsid:38481807-CA0E-42D2-BF39-B33AF135CC4D" id=ieooui></object>
+<style>
+st1\:*{behavior:url(#ieooui) }
+</style>
+<![endif]-->
+<style>
+<!--
+ /* Style Definitions */
+ p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ font-family:"Times New Roman";
+ mso-fareast-font-family:"Times New Roman";}
+span.SpellE
+ {mso-style-name:"";
+ mso-spl-e:yes;}
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+-->
+</style>
+<!--[if gte mso 10]>
+<style>
+ /* Style Definitions */
+ table.MsoNormalTable
+ {mso-style-name:"Table Normal";
+ mso-tstyle-rowband-size:0;
+ mso-tstyle-colband-size:0;
+ mso-style-noshow:yes;
+ mso-style-parent:"";
+ mso-padding-alt:0in 5.4pt 0in 5.4pt;
+ mso-para-margin:0in;
+ mso-para-margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:10.0pt;
+ font-family:"Times New Roman";}
+table.MsoTableGrid
+ {mso-style-name:"Table Grid";
+ mso-tstyle-rowband-size:0;
+ mso-tstyle-colband-size:0;
+ border:solid windowtext 1.0pt;
+ mso-border-alt:solid windowtext .5pt;
+ mso-padding-alt:0in 5.4pt 0in 5.4pt;
+ mso-border-insideh:.5pt solid windowtext;
+ mso-border-insidev:.5pt solid windowtext;
+ mso-para-margin:0in;
+ mso-para-margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:10.0pt;
+ font-family:"Times New Roman";}
+</style>
+<![endif]-->
+</head>
+
+<body lang=EN-US style='tab-interval:.5in'>
+
+<div class=Section1>
+
+<p class=MsoNormal><b style='mso-bidi-font-weight:normal'>Basi</b><st1:PersonName><b
+ style='mso-bidi-font-weight:normal'>c</b></st1:PersonName><b style='mso-bidi-font-weight:
+normal'> Employee Compensation<o:p></o:p></b></p>
+
+<p class=MsoNormal><b style='mso-bidi-font-weight:normal'><o:p>&nbsp;</o:p></b></p>
+
+<p class=MsoNormal>For ea<st1:PersonName>c</st1:PersonName>h week, hourly
+employees are a paid a standard wage per hour for the first 40 hours worked,
+1.5 times their wage for ea<st1:PersonName>c</st1:PersonName>h hour after the
+first 40 hours, and 2 times their wage for ea<st1:PersonName>c</st1:PersonName>h
+hour worked on Sundays and holidays.</p>
+
+<p class=MsoNormal><o:p>&nbsp;</o:p></p>
+
+<p class=MsoNormal>Here are some typi<st1:PersonName>c</st1:PersonName>al
+examples of this:</p>
+
+<p class=MsoNormal><o:p>&nbsp;</o:p></p>
+
+<table class=MsoTableGrid border=1 cellspacing=0 cellpadding=0
+ style='border-collapse:collapse;border:none;mso-border-alt:solid windowtext .5pt;
+ mso-yfti-tbllook:480;mso-padding-alt:0in 5.4pt 0in 5.4pt;mso-border-insideh:
+ .5pt solid windowtext;mso-border-insidev:.5pt solid windowtext'>
+ <tr style='mso-yfti-irow:0'>
+ <td width=148 valign=top style='width:110.7pt;border:solid windowtext 1.0pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal><span class=SpellE>Payroll.Fixtures.WeeklyCompensation</span></p>
+ </td>
+ <td width=148 valign=top style='width:110.7pt;border:solid windowtext 1.0pt;
+ border-left:none;mso-border-left-alt:solid windowtext .5pt;mso-border-alt:
+ solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=148 valign=top style='width:110.7pt;border:solid windowtext 1.0pt;
+ border-left:none;mso-border-left-alt:solid windowtext .5pt;mso-border-alt:
+ solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=148 valign=top style='width:110.7pt;border:solid windowtext 1.0pt;
+ border-left:none;mso-border-left-alt:solid windowtext .5pt;mso-border-alt:
+ solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:1'>
+ <td width=148 valign=top style='width:110.7pt;border:solid windowtext 1.0pt;
+ border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal><span class=SpellE>StandardHours</span></p>
+ </td>
+ <td width=148 valign=top style='width:110.7pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal><span class=SpellE>HolidayHours</span></p>
+ </td>
+ <td width=148 valign=top style='width:110.7pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal>Wage</p>
+ </td>
+ <td width=148 valign=top style='width:110.7pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal>Pay()</p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:2'>
+ <td width=148 valign=top style='width:110.7pt;border:solid windowtext 1.0pt;
+ border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal>40</p>
+ </td>
+ <td width=148 valign=top style='width:110.7pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal>0</p>
+ </td>
+ <td width=148 valign=top style='width:110.7pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal>20</p>
+ </td>
+ <td width=148 valign=top style='width:110.7pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal>800</p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:3'>
+ <td width=148 valign=top style='width:110.7pt;border:solid windowtext 1.0pt;
+ border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal>45</p>
+ </td>
+ <td width=148 valign=top style='width:110.7pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal>0</p>
+ </td>
+ <td width=148 valign=top style='width:110.7pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal>20</p>
+ </td>
+ <td width=148 valign=top style='width:110.7pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal>950</p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:4;mso-yfti-lastrow:yes'>
+ <td width=148 valign=top style='width:110.7pt;border:solid windowtext 1.0pt;
+ border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal>48</p>
+ </td>
+ <td width=148 valign=top style='width:110.7pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal>8</p>
+ </td>
+ <td width=148 valign=top style='width:110.7pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal>20</p>
+ </td>
+ <td width=148 valign=top style='width:110.7pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal>1360</p>
+ </td>
+ </tr>
+</table>
+
+<p class=MsoNormal><o:p>&nbsp;</o:p></p>
+
+</div>
+
+</body>
+
+</html>

Added: trunk/fit-1.1/examples/input/BinaryChop.html
==============================================================================
--- (empty file)
+++ trunk/fit-1.1/examples/input/BinaryChop.html Mon Mar 17 08:33:57 2008
@@ -0,0 +1,89 @@
+<html>
+<head>
+ <title>Wiki: Binary Chop</title>
+<head>
+<body bgcolor=#FFFFFF link=#d06040 vlink=#806040>
+ <h1>Binary Chop</h1>
+ <wiki><em>DaveThomas suggests practicing programming and offers 'Kata' (practice problems) to encourage the activity. Here is a recent Kata.</em>
+<p><UL>
+<li> <a href="//pragprog.com/pragdave/Practices/Kata/KataTwo.rdoc,v">http://pragprog.com/prag ... a/KataTwo.rdoc,v</a>
+<p></UL>
+<em>The Kata is to write a binary chop, often called binary search. Dave offered the following specification and included test data which I've converted to tables.</em>
+<p><hr>
+<p>Write a binary chop method that takes an integer search target and a sorted array of integers. It should return the integer index of the target in the array, or -1 if the target is not in the array. The signature will logically be:
+<p><p><PRE>
+ chop(int, array_of_int) -&gt; int
+<p></PRE>
+You can assume that the array has less than 100,000 elements. For the purposes of this Kata, time and memory performance are not issues (assuming the chop terminates before you get bored and kill it, and that you have enough RAM to run it).
+<p>Here is the test data I used when developing my methods. Feel free to add to it. The tests assume that array indices start at zero.
+<p><em>The table has been modifed to run all of Ward's versions. Try this yourself with <a href="run.cgi">http:run.cgi</a>.</em>
+<p><table BORDER CELLSPACING=0 CELLPADDING=3>
+<tr><td ColSpan=7> eg.BinaryChop </td></tr>
+<tr><td> key </td><td> array </td><td> mon() </td><td> tue() </td><td> wed() </td><td> thr() </td><td> fri() </td></tr>
+<tr><td> 3 </td><td>&nbsp;</td><td> -1 </td><td> -1 </td><td> -1 </td><td> -1 </td><td> -1 </td></tr>
+<tr><td> 3 </td><td> 1 </td><td> -1 </td><td> -1 </td><td> -1 </td><td> -1 </td><td> -1 </td></tr>
+<tr><td> 1 </td><td> 1 </td><td> 0 </td><td> 0 </td><td> 0 </td><td> 0 </td><td> 0 </td></tr>
+<tr><td> 1 </td><td> 1, 3, 5 </td><td> 0 </td><td> 0 </td><td> 0 </td><td> 0 </td><td> 0 </td></tr>
+<tr><td> 3 </td><td> 1, 3, 5 </td><td> 1 </td><td> 1 </td><td> 1 </td><td> 1 </td><td> 1 </td></tr>
+<tr><td> 5 </td><td> 1, 3, 5 </td><td> 2 </td><td> 2 </td><td> 2 </td><td> 2 </td><td> 2 </td></tr>
+<tr><td> 0 </td><td> 1, 3, 5 </td><td> -1 </td><td> -1 </td><td> -1 </td><td> -1 </td><td> -1 </td></tr>
+<tr><td> 2 </td><td> 1, 3, 5 </td><td> -1 </td><td> -1 </td><td> -1 </td><td> -1 </td><td> -1 </td></tr>
+<tr><td> 4 </td><td> 1, 3, 5 </td><td> -1 </td><td> -1 </td><td> -1 </td><td> -1 </td><td> -1 </td></tr>
+<tr><td> 6 </td><td> 1, 3, 5 </td><td> -1 </td><td> -1 </td><td> -1 </td><td> -1 </td><td> -1 </td></tr>
+<tr><td> 1 </td><td> 1, 3, 5, 7 </td><td> 0 </td><td> 0 </td><td> 0 </td><td> 0 </td><td> 0 </td></tr>
+<tr><td> 3 </td><td> 1, 3, 5, 7 </td><td> 1 </td><td> 1 </td><td> 1 </td><td> 1 </td><td> 1 </td></tr>
+<tr><td> 5 </td><td> 1, 3, 5, 7 </td><td> 2 </td><td> 2 </td><td> 2 </td><td> 2 </td><td> 2 </td></tr>
+<tr><td> 7 </td><td> 1, 3, 5, 7 </td><td> 3 </td><td> 3 </td><td> 3 </td><td> 3 </td><td> 3 </td></tr>
+<tr><td> 0 </td><td> 1, 3, 5, 7 </td><td> -1 </td><td> -1 </td><td> -1 </td><td> -1 </td><td> -1 </td></tr>
+<tr><td> 2 </td><td> 1, 3, 5, 7 </td><td> -1 </td><td> -1 </td><td> -1 </td><td> -1 </td><td> -1 </td></tr>
+<tr><td> 4 </td><td> 1, 3, 5, 7 </td><td> -1 </td><td> -1 </td><td> -1 </td><td> -1 </td><td> -1 </td></tr>
+<tr><td> 6 </td><td> 1, 3, 5, 7 </td><td> -1 </td><td> -1 </td><td> -1 </td><td> -1 </td><td> -1 </td></tr>
+<tr><td> 8 </td><td> 1, 3, 5, 7 </td><td> -1 </td><td> -1 </td><td> -1 </td><td> -1 </td><td> -1 </td></tr>
+</table>
+<p><hr>
+<p>Dave suggests writing this program differently every day for a week. For a week. I've done that. He also suggests keeping track of errors, which I did and summarize as follows.
+<p><p><UL>
+<li> Monday
+<UL>
+<li> off by one
+<li> sense of test
+<li> operator precedence
+<li> leading blanks (in fit)
+<li> null value (in fit)
+</UL>
+<li> Tuesday
+<UL>
+<li> type incompatibility
+<li> sense of test
+</UL>
+<li> Wednesday
+<UL>
+<li> off by one
+<li> offset
+<li> sense of test
+<li> case analysis
+</UL>
+<li> Thursday
+<UL>
+<li> interface
+</UL>
+<li> Friday
+<UL>
+<li> no errors
+<p><p></UL>
+</UL>
+Wednesday was a tough day. Here are the kind of results I was getting while working on my third implementation which was the first to use recursion.
+<p><UL>
+<li> <a href="files/BinaryChop/wednesday.html">http:files/BinaryChop/wednesday.html</a>
+<p></UL>
+Notice that fit kept on running even as I repeatedly exhausted the runtime stack. This allowed me to study the distribution of errors and go directly to the source of my error. Then it worked perfectly.
+<p>See the source.
+<p><UL>
+<li> <a href="Release/Source/eg/BinaryChop.java">http:Release/Source/eg/BinaryChop.java</a>
+</UL>
+</wiki>
+<hr>
+ Last edited April 22, 2003
+</body>
+</html>
+

Added: trunk/fit-1.1/examples/input/CalculatorExample.html
==============================================================================
--- (empty file)
+++ trunk/fit-1.1/examples/input/CalculatorExample.html Mon Mar 17 08:33:57 2008
@@ -0,0 +1,108 @@
+<html>
+<head>
+ <title>Wiki: Calculator Example</title>
+<head>
+<body bgcolor=#FFFFFF link=#d06040 vlink=#806040>
+ <h1>Calculator Example</h1>
+ <wiki>The HP-35 was HP's first pocket calculator. It was introduced at a time when most calculators had only the four basic functions. The HP-35 was the first pocket calculator with transcendental functions, and the first with RPN.
+<p>The following specifications have been derived from the instructions printed on the back of the calculator. (Image from <a href="//www.hpmuseum.org/hp35.htm">http://www.hpmuseum.org/hp35.htm</a>.)
+<p><img src="files/hp35bk.jpg">
+<p><p>Low battery lights all decimal points.
+<p><table BORDER CELLSPACING=0 CELLPADDING=3>
+<tr><td ColSpan=3>eg.Calculator</td></tr>
+<tr><td>volts</td><td>watts()</td><td>points()</td></tr>
+<tr><td>3.75</td><td>.500</td><td>false</td></tr>
+<tr><td>3.60</td><td>.500</td><td>false</td></tr>
+<tr><td>3.45</td><td>.500</td><td>false</td></tr>
+<tr><td>3.30</td><td>.500</td><td>true</td></tr>
+</table>
+<p>Improper operations flash display. Press <strong>clx</strong>.
+<p><table BORDER CELLSPACING=0 CELLPADDING=3>
+<tr><td ColSpan=3>eg.Calculator</td></tr>
+<tr><td>key</td><td>x()</td><td>flash()</td></tr>
+<tr><td>100</td><td>100</td><td>false</td></tr>
+<tr><td>enter</td><td>100</td><td>false</td></tr>
+<tr><td>0</td><td>0</td><td>false</td></tr>
+<tr><td>/</td><td>0</td><td>true</td></tr>
+<tr><td>clx</td><td>0</td><td>false</td></tr>
+</table>
+<p><strong>clx</strong> clears the display.
+<p><table BORDER CELLSPACING=0 CELLPADDING=3>
+<tr><td ColSpan=5>eg.Calculator</td></tr>
+<tr><td>key</td><td>x()</td><td>y()</td><td>z()</td><td>t()</td></tr>
+<tr><td>100</td><td>100</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>
+<tr><td>enter</td><td>100</td><td>100</td><td>&nbsp;</td><td>&nbsp;</td></tr>
+<tr><td>enter</td><td>100</td><td>100</td><td>100</td><td>&nbsp;</td></tr>
+<tr><td>enter</td><td>100</td><td>100</td><td>100</td><td>100</td></tr>
+<tr><td>clx</td><td>0</td><td>100</td><td>100</td><td>100</td></tr>
+</table>
+<p><strong>clr</strong> clears all registers.
+<p><table BORDER CELLSPACING=0 CELLPADDING=3>
+<tr><td ColSpan=5>eg.Calculator</td></tr>
+<tr><td>key</td><td>x()</td><td>y()</td><td>z()</td><td>t()</td></tr>
+<tr><td>100</td><td>100</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>
+<tr><td>enter</td><td>100</td><td>100</td><td>&nbsp;</td><td>&nbsp;</td></tr>
+<tr><td>enter</td><td>100</td><td>100</td><td>100</td><td>&nbsp;</td></tr>
+<tr><td>enter</td><td>100</td><td>100</td><td>100</td><td>100</td></tr>
+<tr><td>clr</td><td>0</td><td>0</td><td>0</td><td>0</td></tr>
+</table>
+<p><strong>chs</strong> changes sign of display. May be used as the first entry when entering negative numbers.
+<p><table BORDER CELLSPACING=0 CELLPADDING=3>
+<tr><td ColSpan=3>eg.Calculator</td></tr>
+<tr><td>key</td><td>x()</td><td>y()</td></tr>
+<tr><td>100</td><td>100</td><td>0</td></tr>
+<tr><td>chs</td><td>-100</td><td>0</td></tr>
+<tr><td>chs</td><td>100</td><td>0</td></tr>
+<tr><td>enter</td><td>100</td><td>100</td></tr>
+<tr><td>chs</td><td>-0</td><td>100</td></tr>
+<tr><td>100</td><td>-100</td><td>100</td></tr>
+</table>
+<p><strong>eex</strong> causes next entries to become the exponent of x. For negative expoinents <strong>chs</strong> must precede digits.
+<p>The operational stack consistes of four registers (x, y, z and t). A fifth register (s) is used for constant storage.
+<p>The stack is automatically raised by an entry into x or by <strong>rcl</strong> unless the entry or <strong>rcl</strong> immediately follows <strong>clx</strong>, <strong>sto</strong> or <strong>enter</strong>.
+<p>Follwing any trig function z is duplicated into register t.
+<p>All angles are in degrees.
+<p>Example (2+3) * (4/5) / sin(30) * (4^-1.5) = 1.0000
+<p><table BORDER CELLSPACING=0 CELLPADDING=3>
+<tr><td ColSpan=3> eg.Calculator </td></tr>
+<tr><td>key</td><td>x()</td><td>y()</td></tr>
+<tr><td>2</td><td>2</td><td>&nbsp;</td></tr>
+<tr><td>enter</td><td>2</td><td>2</td></tr>
+<tr><td>3</td><td>3</td><td>2</td></tr>
+<tr><td>+</td><td>5</td><td>&nbsp;</td></tr>
+<tr><td>4</td><td>4</td><td>5</td></tr>
+<tr><td>*</td><td>20</td><td>&nbsp;</td></tr>
+<tr><td>5</td><td>5</td><td>20</td></tr>
+<tr><td>/</td><td>4</td><td>&nbsp;</td></tr>
+<tr><td>30</td><td>30</td><td>4</td></tr>
+<tr><td>sin</td><td>.5</td><td>4</td></tr>
+<tr><td>/</td><td>6</td><td>&nbsp;</td></tr>
+<tr><td>-1.5</td><td>-1.5</td><td>8</td></tr>
+<tr><td>enter</td><td>-1.5</td><td>-1.5</td></tr>
+<tr><td>4</td><td>4</td><td>-1.5</td></tr>
+<tr><td>x^y</td><td>.125</td><td>8</td></tr>
+<tr><td>*</td><td>1.0000</td><td>&nbsp;</td></tr>
+</table>
+<p><hr>
+<table BORDER CELLSPACING=0 CELLPADDING=3>
+<tr><td>fit.Summary</td></tr>
+</table>
+<hr>
+<p>You can run this document as it stands right now against a calculator implemented at c2.com using the RunScript below. You will find that that the tests, the fixture and the calculator code are all not yet complete. Failing tests turn a cell red. There are two values in the cell. The top one is the expected result. The bottom is the actual result.
+<p><UL>
+<li> <a href="run.cgi">http:run.cgi</a> -- invoke on c2.com and view results here
+<li> <a href="hp35.cgi">http:hp35.cgi</a> -- model constrained generated test data
+<li> <a href="Release/Source/eg/Calculator.java">http:Release/Source/eg/Calculator.java</a> -- the HP35 calculator and its fixture
+<p></UL>
+<hr>
+<p>I'd like to see a manual interface to this calculator. It would provide keys and a display of the x value, just like a regular calculator. Doing this would point out some interesting differences between the programming and manual interfaces. One issue i'm curious about would be that keys would be digits, not complete numbers. So some mechanism would need to be created to convert. A manual interface would help to illustrate the concept of how you can test by going under the GUI. This is a hard concept for testers to understand.
+<p>I have some comments on the perl hp35 simulator. I'm realizing that they'd be easier to make if i could cite tests. But that is hard, because they are random. Thus my first suggestion: Random tests should log the seed they used to generate them. And the script should be able to take a seed as an argument to regenerate the same test. This is a general rule for random tests, that i didn't get around to including in LessonsLearned. And, this would allow me to create a URL to a specific instance of a randomly generated test -- which would help me make my next suggestion.
+<p>Second suggestion. Many of the tests using the hp35 simulator fail because of differences in precision. I would think that you'd want your fixture to be able to accept differences beyond a certain precision. Perhaps by setting a tolerance or something. Any tester who reported a bug simply because the implementation was calculating to a different level of precision than the oracle would be dismissed as wasting people's time. The fixtures need to have more sensitivity here. -- Oh i see i see that you (claim to) have addressed this in ScientificPrecision. Then why am i still seeing these problems?
+<p>Hey. I'm seeing something strange with the calculator model. I generate a test (more) and then run it (run). And the test that is run is NOT THE SAME as the test that i just generated. This might be easier to track down if i could specify seeds.
+<p>-- BretPettichord
+<p><p><p></wiki>
+<hr>
+ Last edited November 23, 2002
+</body>
+</html>
+

Added: trunk/fit-1.1/examples/input/ExampleTests.html
==============================================================================
--- (empty file)
+++ trunk/fit-1.1/examples/input/ExampleTests.html Mon Mar 17 08:33:57 2008
@@ -0,0 +1,43 @@
+<html>
+<head>
+ <title>Wiki: Example Tests</title>
+<head>
+<body bgcolor=#FFFFFF link=#d06040 vlink=#806040>
+ <h1>Example Tests</h1>
+ <wiki>These are examples that you can view and run from this site right now.
+<p><UL>
+<li> SimpleExample -- Start here. This test checks floating-point division using a five-line fixture.
+<p><li> CalculatorExample -- This test checks an HP-35 calculator simulator with assorted tables, all using the same column fixture. This includes a model based test generator.
+<p><li> MusicExample -- Iinspired by Apple's iTunes, we test browsing of a music library using a combination of ActionFixture and RowFixture.
+<p><li> WebPageExample -- We use a fixture to browse the web. The Page fixture hosts actions for ActionFixture and produces rows as a RowFixture.
+<p><li> AllPairsExample -- These fixtures find and run other tests. Wildcard searches produce lists which are run in order, run in all combinations and run in all pair-wise combinations.
+<p></UL>
+These are examples that are still in development.
+<p><UL>
+<li> NetworkExample -- This tests a simulated radio network using action fixtures.
+<p><li> TimeClockJobStatusExample -- This tests a GUI application with action and row fixtures. Compare this with ruby script tests for the same application.
+<p></UL>
+<hr>
+<p>We use these examples for testing new implementations. Here is an example that runs the other examples. Click <a href="run.cgi">http:run.cgi</a> to perform this test.
+<p><table BORDER CELLSPACING=0 CELLPADDING=3>
+<tr><td ColSpan=6> eg.ExampleTests </td></tr>
+<tr><td> file </td><td> wiki </td><td> right() </td><td> wrong() </td><td> ignores() </td><td> exceptions() </td></tr>
+<tr><td> arithmetic.html </td><td> false </td><td> 37 </td><td> 10 </td><td> 0 </td><td> 2 </td></tr>
+<tr><td> CalculatorExample.html </td><td> true </td><td> 75 </td><td> 9 </td><td> 0 </td><td> 0 </td></tr>
+<tr><td> MusicExample.html </td><td> true </td><td> 95 </td><td> 0 </td><td> 0 </td><td> 0 </td></tr>
+<tr><td> MusicExampleWithErrors.html </td><td> true </td><td> 54 </td><td> 10 </td><td> 0 </td><td> 0 </td></tr>
+<tr><td> NetworkExample.html </td><td> true </td><td> 5 </td><td> 0 </td><td> 0 </td><td> 0 </td></tr>
+<tr><td> AllFiles.html </td><td> true </td><td> 9 </td><td> 3 </td><td> 0 </td><td> 0 </td></tr>
+<tr><td> AllCombinations.html </td><td> true </td><td> 80 </td><td> 6 </td><td> 0 </td><td> 0 </td></tr>
+<tr><td> AllPairs.html </td><td> true </td><td> 45 </td><td> 3 </td><td> 0 </td><td> 0 </td></tr>
+</table>
+<p>We are only testing that we get the expected counts of right and wrong. There are twenty of these count comparisions above. But there are actually many more tests preformed. This fixture adds an extra line to the summary so that we can feel good even though LessonsLearned advises us not to base our confidence on test counts which are easily inflated.
+<p><table BORDER CELLSPACING=0 CELLPADDING=3>
+<tr><td ColSpan=2> fit.Summary </td></tr>
+</table>
+<p>See the fixture: <a href="Release/Source/eg/ExampleTests.java">http:Release/Source/eg/ExampleTests.java</a></wiki>
+<hr>
+ Last edited April 20, 2003
+</body>
+</html>
+

Added: trunk/fit-1.1/examples/input/FitAcceptanceTests.html
==============================================================================
--- (empty file)
+++ trunk/fit-1.1/examples/input/FitAcceptanceTests.html Mon Mar 17 08:33:57 2008
@@ -0,0 +1,53 @@
+<html>
+<head>
+ <title>Wiki: Fit Acceptance Tests</title>
+<head>
+<body bgcolor=#FFFFFF link=#d06040 vlink=#806040>
+ <h1>Fit Acceptance Tests</h1>
+ <wiki>These are the tests that we expect any implementation of fit to pass. Run these tests with the following command. Be patient. This can take some time.
+<p><UL>
+<li> <a href="run.cgi">http:run.cgi</a>
+<p></UL>
+First we define the various framework implementations we will be testing. Each implementation provides a RunScript that will return and annotated version of the test pages listed below.
+<p><p><table BORDER CELLSPACING=0 CELLPADDING=3>
+<tr><td ColSpan=3> fat.Frameworks </td></tr>
+<tr><td> language </td><td> page </td><td> runscript </td></tr>
+<tr><td> java </td><td> JavaPlatform </td><td> <a href="//fit.c2.com/fatJava.cgi">http://fit.c2.com/fatJava.cgi</a>? </td></tr>
+<tr><td> c# </td><td> DotNetPlatform </td><td>&nbsp;</td></tr>
+<tr><td> clisp </td><td> LispPlatform </td><td> <a href="//fit.c2.com/fatLisp.cgi">http://fit.c2.com/fatLisp.cgi</a>? </td></tr>
+<tr><td> scheme </td><td> LispPlatform </td><td> <a href="//fit.c2.com/fatScheme.cgi">http://fit.c2.com/fatScheme.cgi</a>? </td></tr>
+</table>
+<p><p>Then we list the tests that we expect them to pass. For each test and each language we run the test with that language's runscrip and report the the wrong and exception counts. 0/0 means all tests passed.
+<p>We will group tests into categories. We begin with the two examples from fit.c2.com that are expected to be free of errors. These are the 'tests' recommended in TipsForCoreImplementors.
+<p><table BORDER CELLSPACING=0 CELLPADDING=3>
+<tr><td ColSpan=5> fat.Tests </td></tr>
+<tr><td> page </td><td> java </td><td> c# </td><td> clisp </td><td> scheme </td></tr>
+<tr><td> SimpleExample </td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>
+<tr><td> MusicExample </td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>
+</table>
+<p>Now we proceed with more through specification and testing of exactly what an implementation must do to be a version 1.0 implementation.
+<p><table BORDER CELLSPACING=0 CELLPADDING=3>
+<tr><td ColSpan=5> fat.Tests </td></tr>
+<tr><td> page </td><td> java </td><td> c# </td><td> clisp </td><td> scheme </td></tr>
+</table>
+<p><em>(Nothing hear yet. This is an active area of development.)</em>
+<p>Some implementations have capabilities beyond that currently considered part of the fit core. These are under consideration as core pending positive experience in real testing and support from a majority of implementations.
+<p><table BORDER CELLSPACING=0 CELLPADDING=3>
+<tr><td ColSpan=5> fat.Tests </td></tr>
+<tr><td> page </td><td> java </td><td> c# </td><td> clisp </td><td> scheme </td></tr>
+</table>
+<p><em>(Nothing hear yet. This is an active area of development.)</em>
+<p><hr>
+<p>These fixtures are really test runners written as fixtures. The <strong>Frameworks</strong> fixture collects information about the framework implementations to be tested. The <strong>Tests</strong> fixture combines this information with a list of test pages and reports run results in the remaining blank cells of the table.
+<p>The actual running of the tests is delegated to cgi scripts that can be scattered around the internet. Not all implementations need be hosted here at fit.c2.com. We ask that implementors provide a cgi specifically for running these tests that doesn't exploit the HttpReferer trick common with RunScript. This makes tracking down test failures much simpler.
+<p>The interaction with these cgi scripts is model on the fixture used in the WebPageExample. The td tags present in the cgi output are classified as red, green, yellow or gray based on the presence of bgcolor attributes in the tags. The various colors are counted and selected totals reported.
+<p>See the source.
+<p><UL>
+<li> <a href="Release/Source/fat/Frameworks.java">http:Release/Source/fat/Frameworks.java</a>
+<li> <a href="Release/Source/fat/Tests.java">http:Release/Source/fat/Tests.java</a></UL>
+</wiki>
+<hr>
+ Last edited April 22, 2003
+</body>
+</html>
+

Added: trunk/fit-1.1/examples/input/MusicExample.html
==============================================================================
--- (empty file)
+++ trunk/fit-1.1/examples/input/MusicExample.html Mon Mar 17 08:33:57 2008
@@ -0,0 +1,143 @@
+<html>
+<head>
+ <title>Wiki: Music Example</title>
+<head>
+<body bgcolor=#FFFFFF link=#d06040 vlink=#806040>
+ <h1>Music Example</h1>
+ <wiki>In this example we describe a music player as if we were operating it. We will see two kinds of tables in use, action and row. The action tables list things actions to be performed, step-by-step, one row at a time. Some actions will involve searching for music. We will check to be sure we've found the right music using a second kind of table, a row table. In the row table we will simply list each song, one per row, with columns showing different attributes of each song. We'll use these fixtures.
+<p>We'll write the remainder of this page as if it were describing stories for the music library/player. We'll use italics when we want to point out features of the framework. You might as well run the example now before you continue reading.
+<p><UL>
+<li> <a href="run.cgi">http:run.cgi</a>
+<p></UL>
+This is our most realistic example short of the SampleApplications. See the MusicExampleObjectModel to understand all of the objects in play here.
+<p><hr>
+<p><strong>Browsing Music</strong>
+<p>The music browser starts up looking at the whole library of songs. We specify the library (an advanced feature) so that we know what we are talking about in this document.
+<p><table BORDER CELLSPACING=0 CELLPADDING=3>
+<tr><td ColSpan=3> fit.ActionFixture </td></tr>
+<tr><td> start </td><td> eg.music.Browser </td><td>&nbsp;</td></tr>
+<tr><td> enter </td><td> library </td><td> src/eg/music/Music.txt </td></tr>
+<tr><td> check </td><td> total songs </td><td> 37 </td></tr>
+</table>
+<p><em>This is a the file that library reads. It is tab separated text. Try downloading it and looking at it with a spreadsheet. <a href="Release/Source/eg/music/Music.txt">http:Release/Source/eg/music/Music.txt</a></em>
+<p>We can pick songs and see details of our selection as we go.
+<p><table BORDER CELLSPACING=0 CELLPADDING=3>
+<tr><td ColSpan=3> fit.ActionFixture </td></tr>
+<tr><td> enter </td><td> select </td><td> 1 </td></tr>
+<tr><td> check </td><td> title </td><td> Akila </td></tr>
+<tr><td> check </td><td> artist </td><td> Toure Kunda </td></tr>
+<tr><td> enter </td><td> select </td><td> 2 </td></tr>
+<tr><td> check </td><td> title </td><td> American Tango </td></tr>
+<tr><td> check </td><td> artist </td><td> Weather Report </td></tr>
+<tr><td> check </td><td> album </td><td> Mysterious Traveller </td></tr>
+<tr><td> check </td><td> year </td><td> 1974 </td></tr>
+<tr><td> check </td><td> time </td><td> 3.70 </td></tr>
+<tr><td> check </td><td> track </td><td> 2 of 7 </td></tr>
+</table>
+<p><em>ActionFixture interprets the words in the first column. The actions operate on fields and buttons on the </em>Browser<em> screen we started in the first table. The Browser (or what ever other Fixtures we start) interprets the names in the second column. Each name maps to a method of the Browser. The third column provides data that are pass as arguments to Browser methods or compared with Browser method results. See MusicExampleWithErrors to see how errors are reported.</em>
+<p><hr>
+<p><strong>Playing Music</strong>
+<p>Once we've picked a song, we can play it. We can continue operating the Brower while music is playing. Since this sequence is long, we'll explain what we are doing in an unused column.
+<p><table BORDER CELLSPACING=0 CELLPADDING=3>
+<tr><td ColSpan=4> eg.music.Realtime </td></tr>
+<tr><td> press </td><td> play </td><td>&nbsp;</td><td> play this song </td></tr>
+<tr><td> check </td><td> status </td><td> loading </td><td>&nbsp;</td></tr>
+<tr><td> pause </td><td> 2 </td><td>&nbsp;</td><td>&nbsp;</td></tr>
+<tr><td> check </td><td> status </td><td> loading </td><td> watch it load </td></tr>
+<tr><td> pause </td><td> 2 </td><td>&nbsp;</td><td>&nbsp;</td></tr>
+<tr><td> check </td><td> status </td><td> playing </td><td>&nbsp;</td></tr>
+<tr><td> check </td><td> playing </td><td> American Tango </td><td>&nbsp;</td></tr>
+<tr><td> check </td><td> time </td><td> 3.70 </td><td>&nbsp;</td></tr>
+<tr><td> press </td><td> pause </td><td>&nbsp;</td><td> make it stop </td></tr>
+<tr><td> check </td><td> status </td><td> pause </td><td>&nbsp;</td></tr>
+<tr><td> check </td><td> remaining </td><td> 3.66 </td><td>&nbsp;</td></tr>
+<tr><td> pause </td><td> 60 </td><td>&nbsp;</td><td>&nbsp;</td></tr>
+<tr><td> check </td><td> remaining </td><td> 3.66 </td><td>&nbsp;</td></tr>
+<tr><td> press </td><td> play </td><td>&nbsp;</td><td> make it go </td></tr>
+<tr><td> check </td><td> status </td><td> playing </td><td>&nbsp;</td></tr>
+<tr><td> pause </td><td> 60 </td><td>&nbsp;</td><td>&nbsp;</td></tr>
+<tr><td> check </td><td> remaining </td><td> 2.66 </td><td>&nbsp;</td></tr>
+<tr><td> await </td><td> play complete </td><td>&nbsp;</td><td> enjoy the music </td></tr>
+<tr><td> check </td><td> status </td><td> ready </td><td>&nbsp;</td></tr>
+<tr><td> enter </td><td> select </td><td> 4 </td><td> try another </td></tr>
+<tr><td> press </td><td> play </td><td>&nbsp;</td><td>&nbsp;</td></tr>
+<tr><td> pause </td><td> 1 </td><td>&nbsp;</td><td>&nbsp;</td></tr>
+<tr><td> fail </td><td> load jam </td><td>&nbsp;</td><td> uh oh </td></tr>
+<tr><td> check </td><td> message </td><td> load jamed </td><td>&nbsp;</td></tr>
+<tr><td> press </td><td> ok </td><td>&nbsp;</td><td> dispatch the notifier </td></tr>
+<tr><td> check </td><td> status </td><td> ready </td><td>&nbsp;</td></tr>
+</table>
+<p><p><em>This table is interpreted by Realtime, a Fixture that adds actions having to do with realtime operation of the music player. This fixture calls on a simulator to keep track of system events. We do so here only because the application we are testing isn't a real music player. Our toy application cooperates with the simulator to keep track of time. A real player would do things that take real time and it would use the computer's realtime clock to keep track of time. We could still use a fixture with actions like </em>pause<em> and </em>await<em> but there wouldn't need to be a simulator too.</em>
+<p><hr>
+<p><strong>Searching for Music</strong>
+<p>There are buttons on the browser to find more songs like the one we have picked.
+<p><table BORDER CELLSPACING=0 CELLPADDING=3>
+<tr><td ColSpan=4> eg.music.Realtime </td></tr>
+<tr><td> enter </td><td> select </td><td> 2 </td><td> pick an album </td></tr>
+<tr><td> press </td><td> same album </td><td>&nbsp;</td><td> find more like it </td></tr>
+<tr><td> check </td><td> status </td><td> searching </td><td>&nbsp;</td></tr>
+<tr><td> await </td><td> search complete </td><td>&nbsp;</td><td>&nbsp;</td></tr>
+<tr><td> check </td><td> status </td><td> ready </td><td>&nbsp;</td></tr>
+<tr><td> check </td><td> selected songs </td><td> 2 </td><td>&nbsp;</td></tr>
+</table>
+<p><em>Our searches take a few seconds to complete. Eventually we will want to try mashing buttons faster than the computer can respond. For now we will be polite and </em>await<em> completion of our searches.</em>
+<p>The selected songs are displayed in a table.
+<p><table BORDER CELLSPACING=0 CELLPADDING=3>
+<tr><td ColSpan=6> eg.music.Display </td></tr>
+<tr><td> title </td><td> artist </td><td> album </td><td> year </td><td> time() </td><td> track() </td></tr>
+<tr><td> Scarlet Woman </td><td> Weather Report </td><td> Mysterious Traveller </td><td> 1974 </td><td> 5.72 </td><td> 6 of 7 </td></tr>
+<tr><td> American Tango </td><td> Weather Report </td><td> Mysterious Traveller </td><td> 1974 </td><td>3.70 </td><td> 2 of 7 </td></tr>
+</table>
+<p><em>Here we use Display (a RowFixture) to directly examine the Music object found by our search. Things like </em>artist<em> and </em>track()<em> are fields and methods of the domain objects.</em>
+<p>We can find songs related in different ways. Each new way produces a (possibly) different list of songs. <em>Show all</em> restores the display to the initial conditions.
+<p><table BORDER CELLSPACING=0 CELLPADDING=3>
+<tr><td ColSpan=4> eg.music.Realtime </td></tr>
+<tr><td> press </td><td> show all </td><td>&nbsp;</td><td> recall all the songs </td></tr>
+<tr><td> await </td><td> search complete </td><td>&nbsp;</td><td>&nbsp;</td></tr>
+<tr><td> check </td><td> selected songs </td><td> 37 </td><td>&nbsp;</td></tr>
+<tr><td> enter </td><td> select </td><td> 3 </td><td> pick a James Taylor song</td></tr>
+<tr><td> check </td><td> artist </td><td> James Taylor </td><td>&nbsp;</td></tr>
+<tr><td> press </td><td> same artist </td><td>&nbsp;</td><td> find more by him </td></tr>
+<tr><td> await </td><td> search complete </td><td>&nbsp;</td><td>&nbsp;</td></tr>
+<tr><td> check </td><td> selected songs </td><td> 5 </td><td>&nbsp;</td></tr>
+</table>
+<p>Yielding the display:
+<p><table BORDER CELLSPACING=0 CELLPADDING=3>
+<tr><td ColSpan=6> eg.music.Display </td></tr>
+<tr><td> title </td><td> artist </td><td> album </td><td> year </td><td> time() </td><td> track() </td></tr>
+<tr><td> Handy Man </td><td> James Taylor </td><td> JT </td><td> 1977 </td><td> 3.30 </td><td> 7 of 12 </td></tr>
+<tr><td> Sailing To Philadelphia </td><td> James Taylor </td><td> October Rose </td><td> 2001 </td><td> 5.47 </td><td> 3 of 3 </td></tr>
+<tr><td> Ananas </td><td> James Taylor </td><td> Hourglass </td><td> 1997 </td><td> 5.73 </td><td> 5 of 13 </td></tr>
+<tr><td> Another Grey Morning </td><td> James Taylor </td><td> JT </td><td> 1977 </td><td> 2.73 </td><td> 4 of 12 </td></tr>
+<tr><td> Copperline </td><td> James Taylor </td><td> New Moon Shine </td><td> 1991 </td><td> 4.37</td><td> 1 of 12 </td></tr>
+</table>
+<p><em>Domain objects typically have lots more fields and methods than we can conveniently look at in a single table. We compose a table specific to our needs by choosing column headings of interest. Here is another look at the results of the previous search.</em>
+<p><table BORDER CELLSPACING=0 CELLPADDING=3>
+<tr><td ColSpan=6> eg.music.Display </td></tr>
+<tr><td> title </td><td> album </td><td> genre </td><td> size </td><td> date </td></tr>
+<tr><td> Another Grey Morning </td><td> JT </td><td> Pop </td><td> 3284199 </td><td> 9/7/02 11:32 PM </td></tr>
+<tr><td> Ananas </td><td> Hourglass </td><td> Pop </td><td> 6897450 </td><td> 9/7/02 11:47 PM </td></tr>
+<tr><td> Copperline </td><td> New Moon Shine </td><td> Pop </td><td> 5248087 </td><td> 9/7/02 9:52 PM </td></tr>
+<tr><td> Handy Man </td><td> JT </td><td> Pop </td><td> 3976956 </td><td> 9/7/02 11:36 PM </td></tr>
+<tr><td> Sailing To Philadelphia </td><td> October Rose </td><td> Pop </td><td> 6581911 </td><td> 9/7/02 10:45 PM </td></tr>
+</table>
+<p><em>Notice that the songs in the two tables are not in the same order. That is because we didn't type the tables in the same order, and the order we type is preserved. RowFixture(s) use the left hand columns to line up the search results with the table values. Check out MusicExampleWithErrors to see how this works when the rows don't match up.</em>
+<p><em>The kaffe jvm/library has trouble with date formatting so you may see errors when running this from wiki.</em>
+<p><em>This completes the MusicExample.</em>
+<p><hr>
+<p>We've run quite a few test. We'll call up one more Fixture that will add a summary to the end of our document.
+<p><table BORDER CELLSPACING=0 CELLPADDING=3>
+<tr><td ColSpan=2> fit.Summary </td></tr>
+</table>
+<p><hr>
+<p>This is our most complete standard example. You can run it against more than one fit implementation by choosing any one of these specialized RunScript.
+<p><UL>
+<li> <a href="files/LispPlatform/runScheme.cgi">http:files/LispPlatform/runScheme.cgi</a>
+<li> <a href="files/LispPlatform/runLisp.cgi">http:files/LispPlatform/runLisp.cgi</a>
+<p></UL>
+(Caution: these scripts can't login. Run them from the public wiki pages.)</wiki>
+<hr>
+ Last edited May 28, 2003
+</body>
+</html>
+

Added: trunk/fit-1.1/examples/input/MusicExampleWithErrors.html
==============================================================================
--- (empty file)
+++ trunk/fit-1.1/examples/input/MusicExampleWithErrors.html Mon Mar 17 08:33:57 2008
@@ -0,0 +1,128 @@
+<html>
+<head>
+ <title>Wiki: Music Example With Errors</title>
+<head>
+<body bgcolor=#FFFFFF link=#d06040 vlink=#806040>
+ <h1>Music Example With Errors</h1>
+ <wiki>In this example we describe a music player as if we were operating it. This is an intentionally corrupted version of the MusicExample that shows how various errors are reported.
+<p>We'll write the remainder of this page as if it were describing stories for the music player. We'll use italics when we want to point out features of the framework. You might as well run the example now before you continue reading.
+<p><UL>
+<li> <a href="run.cgi">http:run.cgi</a>
+<p><p><p></UL>
+<hr>
+<p><strong>Browsing Music</strong>
+<p>The music browser starts up looking at the whole library of songs. We specify the library (an advanced feature) so that we know what we are talking about in this document.
+<p><table BORDER CELLSPACING=0 CELLPADDING=3>
+<tr><td ColSpan=3> fit.ActionFixture </td></tr>
+<tr><td> start </td><td> eg.music.Browser </td><td>&nbsp;</td></tr>
+<tr><td> enter </td><td> library </td><td> Source/eg/music/Music.txt </td></tr>
+<tr><td> check </td><td> total songs </td><td> 36 </td></tr>
+</table>
+<p><em>This is a the file that library reads. It is tab separated text. Try downloading it and looking at it with a spreadsheet. <a href="Release/Source/eg/music/Music.txt">http:Release/Source/eg/music/Music.txt</a></em>
+<p>We can pick songs and see details of our selection as we go.
+<p><table BORDER CELLSPACING=0 CELLPADDING=3>
+<tr><td ColSpan=3> fit.ActionFixture </td></tr>
+<tr><td> enter </td><td> select </td><td> 1 </td></tr>
+<tr><td> check </td><td> title </td><td> Akila </td></tr>
+<tr><td> check </td><td> artist </td><td> Toure Kunda </td></tr>
+<tr><td> enter </td><td> select </td><td> 2 </td></tr>
+<tr><td> check </td><td> title </td><td> American Tango </td></tr>
+<tr><td> check </td><td> artist </td><td> Weather Report </td></tr>
+<tr><td> check </td><td> album </td><td> Mysterious Traveller </td></tr>
+<tr><td> check </td><td> year </td><td> 1975 </td></tr>
+<tr><td> check </td><td> time </td><td> 3.70 </td></tr>
+<tr><td> check </td><td> track </td><td> 2 of 7 </td></tr>
+</table>
+<p><em>ActionFixture interprets the words in the first column. The </em>check<em> action leads to a comparison of </em>expected<em> values from the table with </em>actual<em> values from the music program.</em>
+<p><hr>
+<p><strong>Playing Music</strong>
+<p>Once we've picked a song, we can play it. We can continue operating the Brower while music is playing.
+<p><table BORDER CELLSPACING=0 CELLPADDING=3>
+<tr><td ColSpan=3> eg.music.Realtime </td></tr>
+<tr><td> press </td><td> play </td><td>&nbsp;</td></tr>
+<tr><td> check </td><td> status </td><td> loading </td></tr>
+<tr><td> pause </td><td> 2 </td><td>&nbsp;</td></tr>
+<tr><td> check </td><td> status </td><td> playing </td></tr>
+<tr><td> pause </td><td> 2 </td><td>&nbsp;</td></tr>
+<tr><td> check </td><td> status </td><td> playing </td></tr>
+<tr><td> check </td><td> time </td><td> 3.70 </td></tr>
+<tr><td> press </td><td> pause </td><td>&nbsp;</td></tr>
+<tr><td> check </td><td> status </td><td> pause </td></tr>
+<tr><td> check </td><td> remaining </td><td> 3.66 </td></tr>
+<tr><td> pause </td><td> 60 </td><td>&nbsp;</td></tr>
+<tr><td> check </td><td> remaining </td><td> 3.66 </td></tr>
+<tr><td> press </td><td> play </td><td>&nbsp;</td></tr>
+<tr><td> check </td><td> status </td><td> playing </td></tr>
+<tr><td> pause </td><td> 60 </td><td>&nbsp;</td></tr>
+<tr><td> check </td><td> remaining </td><td> 2.66 </td></tr>
+<tr><td> await </td><td> play complete </td><td>&nbsp;</td></tr>
+<tr><td> check </td><td> status </td><td> ready </td></tr>
+</table>
+<p><em>The RealtimeActionFixture is a Fixture that adds actions having to do with realtime operation of the music player. We start by pressing </em>play<em> and then waiting for the </em>status<em> to show that it is playing. This music takes 2.5 seconds to start playing so it still says </em>loading<em> after our 2 second pause.</em>
+<p><em>Warning: Don't confuse the </em>pause<em> action with the </em>pause<em> button. The pause action appears in column one where it is interpreted by the Simulator as if the user hesitates for a specified number of seconds. The pause button is a button on the music player part of the Browser screen. The </em>press<em> action activates the pause button which causes the currently playing song to stop temporarily.</em>
+<p><hr>
+<p><strong>Searching for Music</strong>
+<p>There are buttons on the browser to find more songs like the one we have picked.
+<p>We can find songs related in different ways. Each new way produces a (possibly) different list of songs. <em>Show all</em> restores the display to the initial conditions.
+<p><table BORDER CELLSPACING=0 CELLPADDING=3>
+<tr><td ColSpan=3> eg.music.Realtime </td></tr>
+<tr><td> press </td><td> show all </td><td>&nbsp;</td></tr>
+<tr><td> check </td><td> selected songs </td><td> 37 </td></tr>
+<tr><td> enter </td><td> select </td><td> 3 </td></tr>
+<tr><td> check </td><td> artist </td><td> James Taylor </td></tr>
+<tr><td> press </td><td> same artist </td><td>&nbsp;</td></tr>
+<tr><td> check </td><td> selected songs </td><td> 5 </td></tr>
+</table>
+<p><em>We left out the </em>await<em> actions so we are mashing buttons every second or so, faster than the searches complete. We're still getting the music we wanted because the search routines don't yet do a very good job of simulating being slow.</em>
+<p>Yielding the display:
+<p><table BORDER CELLSPACING=0 CELLPADDING=3>
+<tr><td ColSpan=6> eg.music.Display </td></tr>
+<tr><td> title </td><td> artist </td><td> album </td><td> year </td><td> time() </td><td> track() </td></tr>
+<tr><td> Handy Man </td><td> James Taylor </td><td> JT </td><td> 1977 </td><td> 3.30 </td><td> 7 of 12 </td></tr>
+<tr><td> Scarlet Woman </td><td> Weather Report </td><td> Mysterious Traveller </td><td> 1974 </td><td> 5.72 </td><td> 6 of 7 </td></tr>
+<tr><td> Sailing To Philadelphia </td><td> James Taylor </td><td> October Rose </td><td> 2000 </td><td> 5.47 </td><td> 3 of 3 </td></tr>
+<tr><td> Ananas </td><td> James Taylor </td><td> Hourglass </td><td> 1997 </td><td> 5.73 </td><td> 5 of 13 </td></tr>
+<tr><td> Another Gray Morning </td><td> James Taylor </td><td> JT </td><td> 1977 </td><td> 2.73 </td><td> 4 of 12 </td></tr>
+</table>
+<p><em>The song Scarlet Woman is marked as missing because our search did not return this row. It really is missing, and rightfully so, because it isn't a James Taylor song.</em>
+<p><em>The song Another Gray Morning is marked as missing because there is no song spelt that way in the result set. When left hand columns (the keys) disagree then we don't get a chance to compare the remaining columns.</em>
+<p><em>The song Copperline wasn't expected in the result set so it is marked as </em>surplus.<em> The framework adds all the surplus songs to the table so that they can be seen. The show up with printing in light gray as a reminder that they are not a part of the original document.</em>
+<p><p><em>This completes the MusicExample.</em>
+<p><hr>
+<p><p>Now we consider some degenerate cases just to be sure that they work. Suppose we did not uniquely identify rows. We have two songs from JT. What happens when there are surplus (only one expected) ? When there are missing (three expelcted)?
+<p><table BORDER CELLSPACING=0 CELLPADDING=3>
+<tr><td ColSpan=6> eg.music.Display </td></tr>
+<tr><td> album </td><td> genre </td></tr>
+<tr><td> October Rose </td><td> Pop </td></tr>
+<tr><td> Hourglass </td><td> Pop </td></tr>
+<tr><td> New Moon Shine </td><td> Pop </td></tr>
+<tr><td> JT </td><td> Pop </td></tr>
+</table>
+<p><table BORDER CELLSPACING=0 CELLPADDING=3>
+<tr><td ColSpan=6> eg.music.Display </td></tr>
+<tr><td> album </td><td> genre </td></tr>
+<tr><td> JT </td><td> Pop </td></tr>
+<tr><td> October Rose </td><td> Pop </td></tr>
+<tr><td> JT </td><td> Pop </td></tr>
+<tr><td> Hourglass </td><td> Pop </td></tr>
+<tr><td> JT </td><td> Pop </td></tr>
+<tr><td> New Moon Shine </td><td> Pop </td></tr>
+</table>
+<p><hr>
+<p>We've run quite a few test. We'll call up one more Fixture that will add a summary to the end of our document.
+<p><table BORDER CELLSPACING=0 CELLPADDING=3>
+<tr><td ColSpan=2> fit.Summary </td></tr>
+</table>
+<p>This is our most complete standard example. You can run it against more than one fit implementation by choosing any one of these specialized RunScript.
+<p><UL>
+<li> <a href="files/LispPlatform/runScheme.cgi">http:files/LispPlatform/runScheme.cgi</a>
+<li> <a href="files/LispPlatform/runLisp.cgi">http:files/LispPlatform/runLisp.cgi</a>
+<p></UL>
+(Caution: these scripts can't login. Run them from the public wiki pages.)
+<p>�
+</wiki>
+<hr>
+ Last edited April 21, 2003
+</body>
+</html>
+

Added: trunk/fit-1.1/examples/input/NetworkExample.html
==============================================================================
--- (empty file)
+++ trunk/fit-1.1/examples/input/NetworkExample.html Mon Mar 17 08:33:57 2008
@@ -0,0 +1,47 @@
+<html>
+<head>
+ <title>Wiki: Network Example</title>
+<head>
+<body bgcolor=#FFFFFF link=#d06040 vlink=#806040>
+ <h1>Network Example</h1>
+ <wiki><em>We will be experimenting with acceptance testing technique using radio network routing algorithms as a sufficiently complicated example. Our testbed will be a recently reincarnated simulation which we have described briefly elsewhere. <a href="//c2.com/~ward/morse/SimNet/SimView.html">http://c2.com/~ward/mors ... Net/SimView.html</a>. -- WardCunningham</em>
+<p>The simulator starts with no nodes. The <em>new city</em> button pops up a dialog for city information. Try <a href="run.cgi">http:run.cgi</a>.
+<p><table BORDER CELLSPACING=0 CELLPADDING=3>
+<tr><td ColSpan=3>fit.ActionFixture</td></tr>
+<tr><td>start</td><td>eg.net.Simulator</td><td>&nbsp;</td></tr>
+<tr><td>check</td><td>nodes</td><td>0</td></tr>
+<tr><td>press</td><td>new city</td><td>&nbsp;</td></tr>
+<tr><td>enter</td><td>name</td><td>Portland</td></tr>
+<tr><td>enter</td><td>zip</td><td>1,1,1</td></tr>
+<tr><td>enter</td><td>population</td><td>1.5e6</td></tr>
+<tr><td>enter</td><td>coord</td><td>45 30.0 n 122 45.0 w</td></tr>
+<tr><td>check</td><td>coord</td><td>N45.5 W122.75</td></tr>
+<tr><td>press</td><td>ok</td><td>&nbsp;</td></tr>
+<tr><td>check</td><td>nodes</td><td>1</td></tr>
+<tr><td>press</td><td>new city</td><td>&nbsp;</td></tr>
+<tr><td>enter</td><td>name</td><td>Salem</td></tr>
+<tr><td>enter</td><td>population</td><td>.6e6</td></tr>
+<tr><td>enter</td><td>zip</td><td>1,1,2</td></tr>
+<tr><td>enter</td><td>coord</td><td>44 59' 22" n 122 28' 59" w</td></tr>
+<tr><td>press</td><td>ok</td><td>&nbsp;</td></tr>
+<tr><td>check</td><td>nodes</td><td>2</td></tr>
+<tr><td>press</td><td>new city</td><td>&nbsp;</td></tr>
+<tr><td>enter</td><td>name</td><td>Seattle</td></tr>
+<tr><td>press</td><td>cancel</td><td>&nbsp;</td></tr>
+<tr><td>check</td><td>nodes</td><td>2</td></tr>
+</table>
+<p><p><hr>
+<p>An ActionFixture delegates much of its work to other fixtures (actors). See the source for the actor(s) in use here.
+<p><UL>
+<li> <a href="Release/Source/eg/net/Simulator.java">http:Release/Source/eg/net/Simulator.java</a>
+<p></UL>
+This fixture employs a domain specific ValueObject called a GeoCoordinate. The framework goes to some lenght to make sure such objects can be parsed and printed within the framework. Actual parsing and printing are easily delegated to the domain object, as they are here by GeoCoordinate, which accepts a wide variety of coordinate notations.
+<p><UL>
+<li> <a href="Release/Source/eg/net/GeoCoordinate.java">http:Release/Source/eg/n ... oCoordinate.java</a>
+<p></UL>
+</wiki>
+<hr>
+ Last edited September 10, 2002
+</body>
+</html>
+

Added: trunk/fit-1.1/examples/input/WebPageExample.html
==============================================================================
--- (empty file)
+++ trunk/fit-1.1/examples/input/WebPageExample.html Mon Mar 17 08:33:57 2008
@@ -0,0 +1,92 @@
+<html>
+<head>
+ <title>Wiki: Web Page Example</title>
+<head>
+<body bgcolor=#FFFFFF link=#d06040 vlink=#806040>
+ <h1>Web Page Example</h1>
+ <wiki>We will look around the fit website.
+<p>Oops. This doesn't work yet because the java HTTP object doesn't seem to send along the Host field on a HTTP GET so c2.com's web server can route the request to the correct virtual server. Bummer.
+<p><p><a href="run.cgi">http:run.cgi</a>
+<p>For now we look around Google instead.
+<p><table BORDER CELLSPACING=0 CELLPADDING=3>
+<tr><td ColSpan=3> fit.ActionFixture </td></tr>
+<tr><td> start </td><td> eg.Page </td><td>&nbsp;</td></tr>
+<tr><td> enter </td><td> location </td><td> <a href="//google.com">http://google.com</a> </td></tr>
+<tr><td> check </td><td> title </td><td> Google </td></tr>
+<tr><td> enter </td><td> link </td><td> Jobs </td></tr>
+<tr><td> check </td><td> title </td><td> About Google </td></tr>
+<tr><td> enter </td><td> link </td><td> Press </td></tr>
+<tr><td> enter </td><td> link </td><td> Review </td></tr>
+<tr><td> check </td><td> title </td><td> Google Press Room </td></tr>
+</table>
+<p>Here is what this page is suppose to look like.
+<p><UL>
+<li> <a href="files/WebPageExample/page.pdf">http:files/WebPageExample/page.pdf</a>
+<p></UL>
+See the source.
+<p><UL>
+<li> <a href="Release/Source/eg/Page.java">http:Release/Source/eg/Page.java</a>
+<p></UL>
+<hr>
+<p><em>Java gurus suggest that the problem is related to weak libraries in the kaffe implementation and that either sun or ibm jvm will make problems go away.</em>
+<p>Testing server side java ...
+<p><table BORDER CELLSPACING=0 CELLPADDING=3>
+<tr><td ColSpan=3> fit.ActionFixture </td></tr>
+<tr><td> start </td><td> eg.Page </td><td>&nbsp;</td></tr>
+<tr><td> enter </td><td> location </td><td> <a href="//fit.c2.com">http://fit.c2.com</a> </td></tr>
+<tr><td> check </td><td> title </td><td> Wiki: Welcome Visitors </td></tr>
+</table>
+<p><hr>
+<p>I wrote this example to help get WilkesJoiner and JimWeaver started with our framework. They didn't seem to need it. While I'm still debuging they are distributing a similar fixture exploiting their jwebunit facade to HttpUnit. Nice work guys. -- WardCunningham
+<p><p><hr>
+<p>In this example we will use a fixture to look around the web. Developers of web applications often get the idea that this is a good universal interface to their programs. We don't think so. You are far better off testing your server site objects from fixturing running on the server. But you will probably want to do some testing over http so we show here how it can be done.
+<p>You can run this test on the fit.c2.com server with the usual run.cgi command. This will have c2.com acting as a client on your behalf.
+<p><a href="run.cgi">http:run.cgi</a>
+<p>We use actions to start eg.Page, our web browser like fixture. We can enter location, a web address, or link, which follows a link on the page to a new location. When we enter a link, the fixture searches the current page for an anchor that starts with the entered text. You only have to enter enough to be unique. Then it retrieves that page.
+<p><table BORDER CELLSPACING=0 CELLPADDING=3>
+<tr><td ColSpan=3> fit.ActionFixture </td></tr>
+<tr><td> start </td><td> eg.Page </td><td>&nbsp;</td></tr>
+<tr><td> enter </td><td> location </td><td> <a href="//fit.c2.com">http://fit.c2.com</a> </td></tr>
+<tr><td> check </td><td> title </td><td> Wiki: Welcome Visitors </td></tr>
+<tr><td> enter </td><td> link </td><td> Example </td></tr>
+<tr><td> check </td><td> title </td><td> Wiki: Example Tests </td></tr>
+<tr><td> enter </td><td> link </td><td> Simple </td></tr>
+<tr><td> check </td><td> title </td><td> Wiki: Simple Example </td></tr>
+</table>
+<p>The eg.Page fixture is also a row fixture. Here we use it that way to check on the rows of the SimpleExample.
+<p><table BORDER CELLSPACING=0 CELLPADDING=3>
+<tr><td ColSpan=2> eg.Page </td></tr>
+<tr><td> numerator() </td><td> denominator() </td></tr>
+<tr><td> 1000 </td><td> 10 </td></tr>
+<tr><td> 1000 </td><td> 7 </td></tr>
+<tr><td> 1000 </td><td> 0 </td></tr>
+<tr><td> 1000 </td><td> .001 </td></tr>
+<tr><td> -1000 </td><td> 10 </td></tr>
+<tr><td> 0 </td><td> 0 </td></tr>
+</table>
+<p>We left out the pentium bug values on purpose just so you would know we really are reading from that page. We will follow the pentium bug reference just to show that we can read from other servers.
+<p><table BORDER CELLSPACING=0 CELLPADDING=3>
+<tr><td ColSpan=3> fit.ActionFixture </td></tr>
+<tr><td> enter </td><td> link </td><td> <a href="//www.cs.earlham">http://www.cs.earlham</a> </td></tr>
+<tr><td> check </td><td> title </td><td> Bugs in the Intel Microprocessors </td></tr>
+<tr><td> enter </td><td> link </td><td> Main </td></tr>
+<tr><td> enter </td><td> link </td><td> Dusko </td></tr>
+<tr><td> enter </td><td> link </td><td> web </td></tr>
+<tr><td> check </td><td> title </td><td> WebDB - Version 3.1 </td></tr>
+</table>
+<p>There are a couple of things that are not quite right about this example.
+<p><UL>
+<li> It seems odd to say | enter | link | foo | when we want to click a link. The reflection that ActionFixture is doing for us isn't really helping us out much.
+<p><li> Our fixture only knows one query and that assumes we are on a page with a very specific table.
+<p></UL>
+See source.
+<p><UL>
+<li> <a href="Release/Source/eg/Page.java">http:Release/Source/eg/Page.java</a>
+<p><p><p></UL>
+<hr>
+<p>It would be neat to see some tests of an XML interface. Google has one.</wiki>
+<hr>
+ Last edited November 13, 2002
+</body>
+</html>
+

Added: trunk/fit-1.1/examples/input/arithmetic.html
==============================================================================
--- (empty file)
+++ trunk/fit-1.1/examples/input/arithmetic.html Mon Mar 17 08:33:57 2008
@@ -0,0 +1,211 @@
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <meta name="Author" content="Ward Cunningham">
+ <meta name="GENERATOR" content="Mozilla/4.5 [en]C-CCK-MCD compaq (Win98; U) [Netscape]">
+ <title>Arithmetic</title>
+</head>
+<body>
+
+<h1>
+Integer Arithmetic</h1>
+
+<p>The computer relies on arithmetic. Here we test a variety of arithmetic
+operations expressed as 32 bit two's complement binary numbers (Java's
+int).
+<br>&nbsp;
+<table BORDER COLS=6 CELLSPACING=0 CELLPADDING=3 >
+<tr>
+<td COLSPAN="6">eg.ArithmeticFixture</td>
+</tr>
+
+<tr>
+<td>x</td>
+
+<td>y</td>
+
+<td>+</td>
+
+<td>-</td>
+
+<td>*</td>
+
+<td>/</td>
+</tr>
+
+<tr>
+<td>0</td>
+
+<td>0</td>
+
+<td>0</td>
+
+<td>0</td>
+
+<td>0</td>
+
+<td>0</td>
+</tr>
+
+
+<tr>
+<td>1</td>
+
+<td>2</td>
+
+<td>3</td>
+
+<td>-1</td>
+
+<td>2</td>
+
+<td>0.5</td>
+</tr>
+
+<tr>
+<td>1</td>
+
+<td>-1</td>
+
+<td>0</td>
+
+<td>2</td>
+
+<td>-1</td>
+
+<td>-1</td>
+</tr>
+
+<tr>
+<td>10000</td>
+
+<td>10000</td>
+
+<td>20000</td>
+
+<td>0</td>
+
+<td>100000000</td>
+
+<td>1</td>
+</tr>
+
+<tr>
+<td>100000</td>
+
+<td>100000</td>
+
+<td>200000</td>
+
+<td>0</td>
+
+<td>10000000000</td>
+
+<td>1</td>
+</tr>
+
+<tr>
+<td>1000000</td>
+
+<td>1000000</td>
+
+<td>2000000</td>
+
+<td>0</td>
+
+<td>1000000000000</td>
+
+<td>1</td>
+</tr>
+</table>
+
+<br><br>
+Now we try something similar using automatic type conversion offered by ColumnFixtures (BFL1).
+<br><br>
+
+<table BORDER CELLSPACING=0 CELLPADDING=3>
+ <tr>
+ <td colspan=5>eg.ArithmeticColumnFixture</td>
+ </tr>
+ <tr>
+ <td>x</td>
+ <td>y</td>
+ <td>plus()</td>
+ <td>times()</td>
+ <td>divide()</td>
+ <td>floating()</td>
+ </tr>
+ <tr>
+ <td>2</td>
+ <td>3</td>
+ <td>5</td>
+ <td>6</td>
+ <td>0</td>
+ <td>0.6666667</td>
+ </tr>
+ <tr>
+ <td>0</td>
+ <td>0</td>
+ <td>0</td>
+ <td>0</td>
+ <td>error</td>
+ <td>error</td>
+ </tr>
+ <tr>
+ <td>0</td>
+ <td>0</td>
+ <td>0</td>
+ <td>0</td>
+ <td></td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>200</td>
+ <td>300</td>
+ <td>500</td>
+ <td>60000</td>
+ <td>0</td>
+ <td>0.6666667</td>
+ </tr>
+ <tr>
+ <td>2</td>
+ <td>3</td>
+ <td>10</td>
+ <td>10</td>
+ <td>10</td>
+ </tr>
+ <tr>
+ <td>200</td>
+ <td>3</td>
+ <td>5</td>
+ <td>6</td>
+ <td>0</td>
+ <td>0.6666667</td>
+ </tr>
+ <tr>
+ <td>2</td>
+ <td>-3</td>
+ <td>-1</td>
+ <td>-6</td>
+ <td>-0</td>
+ <td>-0.6666667</td>
+ </tr>
+</table>
+
+<br><br>
+
+
+<table BORDER CELLSPACING=0 CELLPADDING=3>
+<tr>
+<td COLSPAN="2">fit.Summary</td>
+</tr>
+</table>
+
+
+
+<p>Document prepaired by Ward Cunningham
+<br>First Version July 11, 2002
+<br>Last Update August 17, 2002
+</body>
+</html>

Added: trunk/fit-1.1/examples/input/files/hp35bk.jpg
==============================================================================
Binary file. No diff available.

Added: trunk/fit-1.1/examples/input/logo.gif
==============================================================================
Binary file. No diff available.

Added: trunk/fit-1.1/examples/output/CalculatorExample.html
==============================================================================
--- (empty file)
+++ trunk/fit-1.1/examples/output/CalculatorExample.html Mon Mar 17 08:33:57 2008
@@ -0,0 +1,125 @@
+<html>
+<head>
+ <title>Wiki: Calculator Example</title>
+<head>
+<body bgcolor=#FFFFFF link=#d06040 vlink=#806040>
+ <h1>Calculator Example</h1>
+ <wiki>The HP-35 was HP's first pocket calculator. It was introduced at a time when most calculators had only the four basic functions. The HP-35 was the first pocket calculator with transcendental functions, and the first with RPN.
+<p>The following specifications have been derived from the instructions printed on the back of the calculator. (Image from <a href="//www.hpmuseum.org/hp35.htm">http://www.hpmuseum.org/hp35.htm</a>.)
+<p><img src="files/hp35bk.jpg">
+<p><p>Low battery lights all decimal points.
+<p><table BORDER CELLSPACING=0 CELLPADDING=3>
+<tr><td ColSpan=3>eg.Calculator</td></tr>
+<tr><td>volts</td><td>watts()</td><td>points()</td></tr>
+<tr><td>3.75</td><td bgcolor="#cfffcf">.500</td><td bgcolor="#cfffcf">false</td></tr>
+<tr><td>3.60</td><td bgcolor="#cfffcf">.500</td><td bgcolor="#cfffcf">false</td></tr>
+<tr><td>3.45</td><td bgcolor="#cfffcf">.500</td><td bgcolor="#cfffcf">false</td></tr>
+<tr><td>3.30</td><td bgcolor="#cfffcf">.500</td><td bgcolor="#ffcfcf">true <font size=-1 color="#c08080"><i>expected</i></font><hr>false <font size=-1 color="#c08080"><i>actual</i></font></td></tr>
+</table>
+<p>Improper operations flash display. Press <strong>clx</strong>.
+<p><table BORDER CELLSPACING=0 CELLPADDING=3>
+<tr><td ColSpan=3>eg.Calculator</td></tr>
+<tr><td>key</td><td>x()</td><td>flash()</td></tr>
+<tr><td>100</td><td bgcolor="#cfffcf">100</td><td bgcolor="#cfffcf">false</td></tr>
+<tr><td>enter</td><td bgcolor="#cfffcf">100</td><td bgcolor="#cfffcf">false</td></tr>
+<tr><td>0</td><td bgcolor="#cfffcf">0</td><td bgcolor="#cfffcf">false</td></tr>
+<tr><td>/</td><td bgcolor="#ffcfcf">0 <font size=-1 color="#c08080"><i>expected</i></font><hr>Infinity <font size=-1 color="#c08080"><i>actual</i></font></td><td bgcolor="#ffcfcf">true <font size=-1 color="#c08080"><i>expected</i></font><hr>false <font size=-1 color="#c08080"><i>actual</i></font></td></tr>
+<tr><td>clx</td><td bgcolor="#cfffcf">0</td><td bgcolor="#cfffcf">false</td></tr>
+</table>
+<p><strong>clx</strong> clears the display.
+<p><table BORDER CELLSPACING=0 CELLPADDING=3>
+<tr><td ColSpan=5>eg.Calculator</td></tr>
+<tr><td>key</td><td>x()</td><td>y()</td><td>z()</td><td>t()</td></tr>
+<tr><td>100</td><td bgcolor="#cfffcf">100</td><td>&nbsp; <font color="#808080">0.0</font></td><td>&nbsp; <font color="#808080">100.0</font></td><td>&nbsp; <font color="#808080">0.0</font></td></tr>
+<tr><td>enter</td><td bgcolor="#cfffcf">100</td><td bgcolor="#cfffcf">100</td><td>&nbsp; <font color="#808080">0.0</font></td><td>&nbsp; <font color="#808080">100.0</font></td></tr>
+<tr><td>enter</td><td bgcolor="#cfffcf">100</td><td bgcolor="#cfffcf">100</td><td bgcolor="#cfffcf">100</td><td>&nbsp; <font color="#808080">0.0</font></td></tr>
+<tr><td>enter</td><td bgcolor="#cfffcf">100</td><td bgcolor="#cfffcf">100</td><td bgcolor="#cfffcf">100</td><td bgcolor="#cfffcf">100</td></tr>
+<tr><td>clx</td><td bgcolor="#cfffcf">0</td><td bgcolor="#cfffcf">100</td><td bgcolor="#cfffcf">100</td><td bgcolor="#cfffcf">100</td></tr>
+</table>
+<p><strong>clr</strong> clears all registers.
+<p><table BORDER CELLSPACING=0 CELLPADDING=3>
+<tr><td ColSpan=5>eg.Calculator</td></tr>
+<tr><td>key</td><td>x()</td><td>y()</td><td>z()</td><td>t()</td></tr>
+<tr><td>100</td><td bgcolor="#cfffcf">100</td><td>&nbsp; <font color="#808080">0.0</font></td><td>&nbsp; <font color="#808080">100.0</font></td><td>&nbsp; <font color="#808080">100.0</font></td></tr>
+<tr><td>enter</td><td bgcolor="#cfffcf">100</td><td bgcolor="#cfffcf">100</td><td>&nbsp; <font color="#808080">0.0</font></td><td>&nbsp; <font color="#808080">100.0</font></td></tr>
+<tr><td>enter</td><td bgcolor="#cfffcf">100</td><td bgcolor="#cfffcf">100</td><td bgcolor="#cfffcf">100</td><td>&nbsp; <font color="#808080">0.0</font></td></tr>
+<tr><td>enter</td><td bgcolor="#cfffcf">100</td><td bgcolor="#cfffcf">100</td><td bgcolor="#cfffcf">100</td><td bgcolor="#cfffcf">100</td></tr>
+<tr><td>clr</td><td bgcolor="#cfffcf">0</td><td bgcolor="#cfffcf">0</td><td bgcolor="#cfffcf">0</td><td bgcolor="#cfffcf">0</td></tr>
+</table>
+<p><strong>chs</strong> changes sign of display. May be used as the first entry when entering negative numbers.
+<p><table BORDER CELLSPACING=0 CELLPADDING=3>
+<tr><td ColSpan=3>eg.Calculator</td></tr>
+<tr><td>key</td><td>x()</td><td>y()</td></tr>
+<tr><td>100</td><td bgcolor="#cfffcf">100</td><td bgcolor="#cfffcf">0</td></tr>
+<tr><td>chs</td><td bgcolor="#cfffcf">-100</td><td bgcolor="#cfffcf">0</td></tr>
+<tr><td>chs</td><td bgcolor="#cfffcf">100</td><td bgcolor="#cfffcf">0</td></tr>
+<tr><td>enter</td><td bgcolor="#cfffcf">100</td><td bgcolor="#cfffcf">100</td></tr>
+<tr><td>chs</td><td bgcolor="#ffcfcf">-0 <font size=-1 color="#c08080"><i>expected</i></font><hr>-100.0 <font size=-1 color="#c08080"><i>actual</i></font></td><td bgcolor="#cfffcf">100</td></tr>
+<tr><td>100</td><td bgcolor="#ffcfcf">-100 <font size=-1 color="#c08080"><i>expected</i></font><hr>100.0 <font size=-1 color="#c08080"><i>actual</i></font></td><td bgcolor="#ffcfcf">100 <font size=-1 color="#c08080"><i>expected</i></font><hr>-100.0 <font size=-1 color="#c08080"><i>actual</i></font></td></tr>
+</table>
+<p><strong>eex</strong> causes next entries to become the exponent of x. For negative expoinents <strong>chs</strong> must precede digits.
+<p>The operational stack consistes of four registers (x, y, z and t). A fifth register (s) is used for constant storage.
+<p>The stack is automatically raised by an entry into x or by <strong>rcl</strong> unless the entry or <strong>rcl</strong> immediately follows <strong>clx</strong>, <strong>sto</strong> or <strong>enter</strong>.
+<p>Follwing any trig function z is duplicated into register t.
+<p>All angles are in degrees.
+<p>Example (2+3) * (4/5) / sin(30) * (4^-1.5) = 1.0000
+<p><table BORDER CELLSPACING=0 CELLPADDING=3>
+<tr><td ColSpan=3> eg.Calculator </td></tr>
+<tr><td>key</td><td>x()</td><td>y()</td></tr>
+<tr><td>2</td><td bgcolor="#cfffcf">2</td><td>&nbsp; <font color="#808080">100.0</font></td></tr>
+<tr><td>enter</td><td bgcolor="#cfffcf">2</td><td bgcolor="#cfffcf">2</td></tr>
+<tr><td>3</td><td bgcolor="#cfffcf">3</td><td bgcolor="#cfffcf">2</td></tr>
+<tr><td>+</td><td bgcolor="#cfffcf">5</td><td>&nbsp; <font color="#808080">2.0</font></td></tr>
+<tr><td>4</td><td bgcolor="#cfffcf">4</td><td bgcolor="#cfffcf">5</td></tr>
+<tr><td>*</td><td bgcolor="#cfffcf">20</td><td>&nbsp; <font color="#808080">2.0</font></td></tr>
+<tr><td>5</td><td bgcolor="#cfffcf">5</td><td bgcolor="#cfffcf">20</td></tr>
+<tr><td>/</td><td bgcolor="#cfffcf">4</td><td>&nbsp; <font color="#808080">2.0</font></td></tr>
+<tr><td>30</td><td bgcolor="#cfffcf">30</td><td bgcolor="#cfffcf">4</td></tr>
+<tr><td>sin</td><td bgcolor="#cfffcf">.5</td><td bgcolor="#cfffcf">4</td></tr>
+<tr><td>/</td><td bgcolor="#ffcfcf">6 <font size=-1 color="#c08080"><i>expected</i></font><hr>8.000000000000002 <font size=-1 color="#c08080"><i>actual</i></font></td><td>&nbsp; <font color="#808080">2.0</font></td></tr>
+<tr><td>-1.5</td><td bgcolor="#cfffcf">-1.5</td><td bgcolor="#cfffcf">8</td></tr>
+<tr><td>enter</td><td bgcolor="#cfffcf">-1.5</td><td bgcolor="#cfffcf">-1.5</td></tr>
+<tr><td>4</td><td bgcolor="#cfffcf">4</td><td bgcolor="#cfffcf">-1.5</td></tr>
+<tr><td>x^y</td><td bgcolor="#cfffcf">.125</td><td bgcolor="#ffcfcf">8 <font size=-1 color="#c08080"><i>expected</i></font><hr>-1.5 <font size=-1 color="#c08080"><i>actual</i></font></td></tr>
+<tr><td>*</td><td bgcolor="#ffcfcf">1.0000 <font size=-1 color="#c08080"><i>expected</i></font><hr>-0.18750000000000006 <font size=-1 color="#c08080"><i>actual</i></font></td><td>&nbsp; <font color="#808080">8.000000000000002</font></td></tr>
+</table>
+<p><hr>
+<table BORDER CELLSPACING=0 CELLPADDING=3>
+<tr><td>fit.Summary</td></tr>
+<tr>
+<td> <font color="#808080">counts</font></td>
+<td bgcolor="#ffcfcf">75 right, 9 wrong, 0 ignored, 0 exceptions</td></tr>
+<tr>
+<td> <font color="#808080">input file</font></td>
+<td> <font color="#808080">C:\projects\fit\imp\java\..\..\examples\CalculatorExample.html</font></td></tr>
+<tr>
+<td> <font color="#808080">input update</font></td>
+<td> <font color="#808080">Tue Sep 16 17:43:29 PDT 2003</font></td></tr>
+<tr>
+<td> <font color="#808080">output file</font></td>
+<td> <font color="#808080">C:\projects\fit\imp\java\output\examples\CalculatorExample.html</font></td></tr>
+<tr>
+<td> <font color="#808080">run date</font></td>
+<td> <font color="#808080">Thu Apr 07 23:25:17 PDT 2005</font></td></tr>
+<tr>
+<td> <font color="#808080">run elapsed time</font></td>
+<td> <font color="#808080">0:00.14</font></td></tr></table>
+<hr>
+<p>You can run this document as it stands right now against a calculator implemented at c2.com using the RunScript below. You will find that that the tests, the fixture and the calculator code are all not yet complete. Failing tests turn a cell red. There are two values in the cell. The top one is the expected result. The bottom is the actual result.
+<p><UL>
+<li> <a href="run.cgi">http:run.cgi</a> -- invoke on c2.com and view results here
+<li> <a href="hp35.cgi">http:hp35.cgi</a> -- model constrained generated test data
+<li> <a href="Release/Source/eg/Calculator.java">http:Release/Source/eg/Calculator.java</a> -- the HP35 calculator and its fixture
+<p></UL>
+<hr>
+<p>I'd like to see a manual interface to this calculator. It would provide keys and a display of the x value, just like a regular calculator. Doing this would point out some interesting differences between the programming and manual interfaces. One issue i'm curious about would be that keys would be digits, not complete numbers. So some mechanism would need to be created to convert. A manual interface would help to illustrate the concept of how you can test by going under the GUI. This is a hard concept for testers to understand.
+<p>I have some comments on the perl hp35 simulator. I'm realizing that they'd be easier to make if i could cite tests. But that is hard, because they are random. Thus my first suggestion: Random tests should log the seed they used to generate them. And the script should be able to take a seed as an argument to regenerate the same test. This is a general rule for random tests, that i didn't get around to including in LessonsLearned. And, this would allow me to create a URL to a specific instance of a randomly generated test -- which would help me make my next suggestion.
+<p>Second suggestion. Many of the tests using the hp35 simulator fail because of differences in precision. I would think that you'd want your fixture to be able to accept differences beyond a certain precision. Perhaps by setting a tolerance or something. Any tester who reported a bug simply because the implementation was calculating to a different level of precision than the oracle would be dismissed as wasting people's time. The fixtures need to have more sensitivity here. -- Oh i see i see that you (claim to) have addressed this in ScientificPrecision. Then why am i still seeing these problems?
+<p>Hey. I'm seeing something strange with the calculator model. I generate a test (more) and then run it (run). And the test that is run is NOT THE SAME as the test that i just generated. This might be easier to track down if i could specify seeds.
+<p>-- BretPettichord
+<p><p><p></wiki>
+<hr>
+ Last edited November 23, 2002
+</body>
+</html>
+

Added: trunk/fit-1.1/examples/output/MusicExample.html
==============================================================================
--- (empty file)
+++ trunk/fit-1.1/examples/output/MusicExample.html Mon Mar 17 08:33:57 2008
@@ -0,0 +1,246 @@
+<html>
+<head>
+ <title>Wiki: Music Example</title>
+<head>
+<body bgcolor=#FFFFFF link=#d06040 vlink=#806040>
+ <h1>Music Example</h1>
+ <wiki>In this example we describe a music player as if we were operating it. We will see two kinds of tables in use, action and row. The action tables list things actions to be performed, step-by-step, one row at a time. Some actions will involve searching for music. We will check to be sure we've found the right music using a second kind of table, a row table. In the row table we will simply list each song, one per row, with columns showing different attributes of each song. We'll use these fixtures.
+<p>We'll write the remainder of this page as if it were describing stories for the music library/player. We'll use italics when we want to point out features of the framework. You might as well run the example now before you continue reading.
+<p><UL>
+<li> <a href="run.cgi">http:run.cgi</a>
+<p></UL>
+This is our most realistic example short of the SampleApplications. See the MusicExampleObjectModel to understand all of the objects in play here.
+<p><hr>
+<p><strong>Browsing Music</strong>
+<p>The music browser starts up looking at the whole library of songs. We specify the library (an advanced feature) so that we know what we are talking about in this document.
+<p><table BORDER CELLSPACING=0 CELLPADDING=3>
+<tr><td ColSpan=3> fit.ActionFixture </td></tr>
+<tr><td> start </td><td> eg.music.Browser </td><td>&nbsp;</td></tr>
+<tr><td> enter </td><td> library </td><td> src/eg/music/Music.txt </td></tr>
+<tr><td> check </td><td> total songs </td><td bgcolor="#cfffcf"> 37 </td></tr>
+</table>
+<p><em>This is a the file that library reads. It is tab separated text. Try downloading it and looking at it with a spreadsheet. <a href="Release/Source/eg/music/Music.txt">http:Release/Source/eg/music/Music.txt</a></em>
+<p>We can pick songs and see details of our selection as we go.
+<p><table BORDER CELLSPACING=0 CELLPADDING=3>
+<tr><td ColSpan=3> fit.ActionFixture </td></tr>
+<tr><td> enter </td><td> select </td><td> 1 </td></tr>
+<tr><td> check </td><td> title </td><td bgcolor="#cfffcf"> Akila </td></tr>
+<tr><td> check </td><td> artist </td><td bgcolor="#cfffcf"> Toure Kunda </td></tr>
+<tr><td> enter </td><td> select </td><td> 2 </td></tr>
+<tr><td> check </td><td> title </td><td bgcolor="#cfffcf"> American Tango </td></tr>
+<tr><td> check </td><td> artist </td><td bgcolor="#cfffcf"> Weather Report </td></tr>
+<tr><td> check </td><td> album </td><td bgcolor="#cfffcf"> Mysterious Traveller </td></tr>
+<tr><td> check </td><td> year </td><td bgcolor="#cfffcf"> 1974 </td></tr>
+<tr><td> check </td><td> time </td><td bgcolor="#cfffcf"> 3.70 </td></tr>
+<tr><td> check </td><td> track </td><td bgcolor="#cfffcf"> 2 of 7 </td></tr>
+</table>
+<p><em>ActionFixture interprets the words in the first column. The actions operate on fields and buttons on the </em>Browser<em> screen we started in the first table. The Browser (or what ever other Fixtures we start) interprets the names in the second column. Each name maps to a method of the Browser. The third column provides data that are pass as arguments to Browser methods or compared with Browser method results. See MusicExampleWithErrors to see how errors are reported.</em>
+<p><hr>
+<p><strong>Playing Music</strong>
+<p>Once we've picked a song, we can play it. We can continue operating the Brower while music is playing. Since this sequence is long, we'll explain what we are doing in an unused column.
+<p><table BORDER CELLSPACING=0 CELLPADDING=3>
+<tr><td ColSpan=4> eg.music.Realtime </td>
+<td> <font color="#808080">time</font></td>
+<td> <font color="#808080">split</font></td></tr>
+<tr><td> press </td><td> play </td><td>&nbsp;</td><td> play this song </td>
+<td> <font color="#808080">11:25:17</font></td>
+<td> <font color="#808080">1.2</font></td></tr>
+<tr><td> check </td><td> status </td><td bgcolor="#cfffcf"> loading </td><td>&nbsp;</td>
+<td> <font color="#808080">11:25:18</font></td>
+<td> <font color="#808080">&amp;nbsp;</font></td></tr>
+<tr><td> pause </td><td> 2 </td><td>&nbsp;</td><td>&nbsp;</td>
+<td> <font color="#808080">11:25:18</font></td>
+<td> <font color="#808080">2.0</font></td></tr>
+<tr><td> check </td><td> status </td><td bgcolor="#cfffcf"> loading </td><td> watch it load </td>
+<td> <font color="#808080">11:25:20</font></td>
+<td> <font color="#808080">&amp;nbsp;</font></td></tr>
+<tr><td> pause </td><td> 2 </td><td>&nbsp;</td><td>&nbsp;</td>
+<td> <font color="#808080">11:25:20</font></td>
+<td> <font color="#808080">2.0</font></td></tr>
+<tr><td> check </td><td> status </td><td bgcolor="#cfffcf"> playing </td><td>&nbsp;</td>
+<td> <font color="#808080">11:25:22</font></td>
+<td> <font color="#808080">&amp;nbsp;</font></td></tr>
+<tr><td> check </td><td> playing </td><td bgcolor="#cfffcf"> American Tango </td><td>&nbsp;</td>
+<td> <font color="#808080">11:25:22</font></td>
+<td> <font color="#808080">&amp;nbsp;</font></td></tr>
+<tr><td> check </td><td> time </td><td bgcolor="#cfffcf"> 3.70 </td><td>&nbsp;</td>
+<td> <font color="#808080">11:25:22</font></td>
+<td> <font color="#808080">&amp;nbsp;</font></td></tr>
+<tr><td> press </td><td> pause </td><td>&nbsp;</td><td> make it stop </td>
+<td> <font color="#808080">11:25:22</font></td>
+<td> <font color="#808080">1.2</font></td></tr>
+<tr><td> check </td><td> status </td><td bgcolor="#cfffcf"> pause </td><td>&nbsp;</td>
+<td> <font color="#808080">11:25:24</font></td>
+<td> <font color="#808080">&amp;nbsp;</font></td></tr>
+<tr><td> check </td><td> remaining </td><td bgcolor="#cfffcf"> 3.66 </td><td>&nbsp;</td>
+<td> <font color="#808080">11:25:24</font></td>
+<td> <font color="#808080">&amp;nbsp;</font></td></tr>
+<tr><td> pause </td><td> 60 </td><td>&nbsp;</td><td>&nbsp;</td>
+<td> <font color="#808080">11:25:24</font></td>
+<td> <font color="#808080">60.0</font></td></tr>
+<tr><td> check </td><td> remaining </td><td bgcolor="#cfffcf"> 3.66 </td><td>&nbsp;</td>
+<td> <font color="#808080">11:26:24</font></td>
+<td> <font color="#808080">&amp;nbsp;</font></td></tr>
+<tr><td> press </td><td> play </td><td>&nbsp;</td><td> make it go </td>
+<td> <font color="#808080">11:26:24</font></td>
+<td> <font color="#808080">1.2</font></td></tr>
+<tr><td> check </td><td> status </td><td bgcolor="#cfffcf"> playing </td><td>&nbsp;</td>
+<td> <font color="#808080">11:26:25</font></td>
+<td> <font color="#808080">&amp;nbsp;</font></td></tr>
+<tr><td> pause </td><td> 60 </td><td>&nbsp;</td><td>&nbsp;</td>
+<td> <font color="#808080">11:26:25</font></td>
+<td> <font color="#808080">60.0</font></td></tr>
+<tr><td> check </td><td> remaining </td><td bgcolor="#cfffcf"> 2.66 </td><td>&nbsp;</td>
+<td> <font color="#808080">11:27:25</font></td>
+<td> <font color="#808080">&amp;nbsp;</font></td></tr>
+<tr><td> await </td><td> play complete </td><td>&nbsp;</td><td> enjoy the music </td>
+<td> <font color="#808080">11:27:25</font></td>
+<td> <font color="#808080">159.3</font></td></tr>
+<tr><td> check </td><td> status </td><td bgcolor="#cfffcf"> ready </td><td>&nbsp;</td>
+<td> <font color="#808080">11:30:04</font></td>
+<td> <font color="#808080">&amp;nbsp;</font></td></tr>
+<tr><td> enter </td><td> select </td><td> 4 </td><td> try another </td>
+<td> <font color="#808080">11:30:04</font></td>
+<td> <font color="#808080">&amp;nbsp;</font></td></tr>
+<tr><td> press </td><td> play </td><td>&nbsp;</td><td>&nbsp;</td>
+<td> <font color="#808080">11:30:05</font></td>
+<td> <font color="#808080">1.2</font></td></tr>
+<tr><td> pause </td><td> 1 </td><td>&nbsp;</td><td>&nbsp;</td>
+<td> <font color="#808080">11:30:06</font></td>
+<td> <font color="#808080">1.0</font></td></tr>
+<tr><td> fail </td><td> load jam </td><td>&nbsp;</td><td> uh oh </td>
+<td> <font color="#808080">11:30:07</font></td>
+<td> <font color="#808080">&amp;nbsp;</font></td></tr>
+<tr><td> check </td><td> message </td><td bgcolor="#cfffcf"> load jamed </td><td>&nbsp;</td>
+<td> <font color="#808080">11:30:07</font></td>
+<td> <font color="#808080">&amp;nbsp;</font></td></tr>
+<tr><td> press </td><td> ok </td><td>&nbsp;</td><td> dispatch the notifier </td>
+<td> <font color="#808080">11:30:07</font></td>
+<td> <font color="#808080">1.2</font></td></tr>
+<tr><td> check </td><td> status </td><td bgcolor="#cfffcf"> ready </td><td>&nbsp;</td>
+<td> <font color="#808080">11:30:08</font></td>
+<td> <font color="#808080">&amp;nbsp;</font></td></tr>
+</table>
+<p><p><em>This table is interpreted by Realtime, a Fixture that adds actions having to do with realtime operation of the music player. This fixture calls on a simulator to keep track of system events. We do so here only because the application we are testing isn't a real music player. Our toy application cooperates with the simulator to keep track of time. A real player would do things that take real time and it would use the computer's realtime clock to keep track of time. We could still use a fixture with actions like </em>pause<em> and </em>await<em> but there wouldn't need to be a simulator too.</em>
+<p><hr>
+<p><strong>Searching for Music</strong>
+<p>There are buttons on the browser to find more songs like the one we have picked.
+<p><table BORDER CELLSPACING=0 CELLPADDING=3>
+<tr><td ColSpan=4> eg.music.Realtime </td>
+<td> <font color="#808080">time</font></td>
+<td> <font color="#808080">split</font></td></tr>
+<tr><td> enter </td><td> select </td><td> 2 </td><td> pick an album </td>
+<td> <font color="#808080">11:30:08</font></td>
+<td> <font color="#808080">&amp;nbsp;</font></td></tr>
+<tr><td> press </td><td> same album </td><td>&nbsp;</td><td> find more like it </td>
+<td> <font color="#808080">11:30:09</font></td>
+<td> <font color="#808080">1.2</font></td></tr>
+<tr><td> check </td><td> status </td><td bgcolor="#cfffcf"> searching </td><td>&nbsp;</td>
+<td> <font color="#808080">11:30:10</font></td>
+<td> <font color="#808080">&amp;nbsp;</font></td></tr>
+<tr><td> await </td><td> search complete </td><td>&nbsp;</td><td>&nbsp;</td>
+<td> <font color="#808080">11:30:10</font></td>
+<td> <font color="#808080">1.1</font></td></tr>
+<tr><td> check </td><td> status </td><td bgcolor="#cfffcf"> ready </td><td>&nbsp;</td>
+<td> <font color="#808080">11:30:11</font></td>
+<td> <font color="#808080">&amp;nbsp;</font></td></tr>
+<tr><td> check </td><td> selected songs </td><td bgcolor="#cfffcf"> 2 </td><td>&nbsp;</td>
+<td> <font color="#808080">11:30:11</font></td>
+<td> <font color="#808080">&amp;nbsp;</font></td></tr>
+</table>
+<p><em>Our searches take a few seconds to complete. Eventually we will want to try mashing buttons faster than the computer can respond. For now we will be polite and </em>await<em> completion of our searches.</em>
+<p>The selected songs are displayed in a table.
+<p><table BORDER CELLSPACING=0 CELLPADDING=3>
+<tr><td ColSpan=6> eg.music.Display </td></tr>
+<tr><td> title </td><td> artist </td><td> album </td><td> year </td><td> time() </td><td> track() </td></tr>
+<tr><td bgcolor="#cfffcf"> Scarlet Woman </td><td bgcolor="#cfffcf"> Weather Report </td><td bgcolor="#cfffcf"> Mysterious Traveller </td><td bgcolor="#cfffcf"> 1974 </td><td bgcolor="#cfffcf"> 5.72 </td><td bgcolor="#cfffcf"> 6 of 7 </td></tr>
+<tr><td bgcolor="#cfffcf"> American Tango </td><td bgcolor="#cfffcf"> Weather Report </td><td bgcolor="#cfffcf"> Mysterious Traveller </td><td bgcolor="#cfffcf"> 1974 </td><td bgcolor="#cfffcf">3.70 </td><td bgcolor="#cfffcf"> 2 of 7 </td></tr>
+</table>
+<p><em>Here we use Display (a RowFixture) to directly examine the Music object found by our search. Things like </em>artist<em> and </em>track()<em> are fields and methods of the domain objects.</em>
+<p>We can find songs related in different ways. Each new way produces a (possibly) different list of songs. <em>Show all</em> restores the display to the initial conditions.
+<p><table BORDER CELLSPACING=0 CELLPADDING=3>
+<tr><td ColSpan=4> eg.music.Realtime </td>
+<td> <font color="#808080">time</font></td>
+<td> <font color="#808080">split</font></td></tr>
+<tr><td> press </td><td> show all </td><td>&nbsp;</td><td> recall all the songs </td>
+<td> <font color="#808080">11:30:11</font></td>
+<td> <font color="#808080">1.2</font></td></tr>
+<tr><td> await </td><td> search complete </td><td>&nbsp;</td><td>&nbsp;</td>
+<td> <font color="#808080">11:30:13</font></td>
+<td> <font color="#808080">3.2</font></td></tr>
+<tr><td> check </td><td> selected songs </td><td bgcolor="#cfffcf"> 37 </td><td>&nbsp;</td>
+<td> <font color="#808080">11:30:16</font></td>
+<td> <font color="#808080">&amp;nbsp;</font></td></tr>
+<tr><td> enter </td><td> select </td><td> 3 </td><td> pick a James Taylor song</td>
+<td> <font color="#808080">11:30:16</font></td>
+<td> <font color="#808080">&amp;nbsp;</font></td></tr>
+<tr><td> check </td><td> artist </td><td bgcolor="#cfffcf"> James Taylor </td><td>&nbsp;</td>
+<td> <font color="#808080">11:30:17</font></td>
+<td> <font color="#808080">&amp;nbsp;</font></td></tr>
+<tr><td> press </td><td> same artist </td><td>&nbsp;</td><td> find more by him </td>
+<td> <font color="#808080">11:30:17</font></td>
+<td> <font color="#808080">1.2</font></td></tr>
+<tr><td> await </td><td> search complete </td><td>&nbsp;</td><td>&nbsp;</td>
+<td> <font color="#808080">11:30:18</font></td>
+<td> <font color="#808080">2.3</font></td></tr>
+<tr><td> check </td><td> selected songs </td><td bgcolor="#cfffcf"> 5 </td><td>&nbsp;</td>
+<td> <font color="#808080">11:30:20</font></td>
+<td> <font color="#808080">&amp;nbsp;</font></td></tr>
+</table>
+<p>Yielding the display:
+<p><table BORDER CELLSPACING=0 CELLPADDING=3>
+<tr><td ColSpan=6> eg.music.Display </td></tr>
+<tr><td> title </td><td> artist </td><td> album </td><td> year </td><td> time() </td><td> track() </td></tr>
+<tr><td bgcolor="#cfffcf"> Handy Man </td><td bgcolor="#cfffcf"> James Taylor </td><td bgcolor="#cfffcf"> JT </td><td bgcolor="#cfffcf"> 1977 </td><td bgcolor="#cfffcf"> 3.30 </td><td bgcolor="#cfffcf"> 7 of 12 </td></tr>
+<tr><td bgcolor="#cfffcf"> Sailing To Philadelphia </td><td bgcolor="#cfffcf"> James Taylor </td><td bgcolor="#cfffcf"> October Rose </td><td bgcolor="#cfffcf"> 2001 </td><td bgcolor="#cfffcf"> 5.47 </td><td bgcolor="#cfffcf"> 3 of 3 </td></tr>
+<tr><td bgcolor="#cfffcf"> Ananas </td><td bgcolor="#cfffcf"> James Taylor </td><td bgcolor="#cfffcf"> Hourglass </td><td bgcolor="#cfffcf"> 1997 </td><td bgcolor="#cfffcf"> 5.73 </td><td bgcolor="#cfffcf"> 5 of 13 </td></tr>
+<tr><td bgcolor="#cfffcf"> Another Grey Morning </td><td bgcolor="#cfffcf"> James Taylor </td><td bgcolor="#cfffcf"> JT </td><td bgcolor="#cfffcf"> 1977 </td><td bgcolor="#cfffcf"> 2.73 </td><td bgcolor="#cfffcf"> 4 of 12 </td></tr>
+<tr><td bgcolor="#cfffcf"> Copperline </td><td bgcolor="#cfffcf"> James Taylor </td><td bgcolor="#cfffcf"> New Moon Shine </td><td bgcolor="#cfffcf"> 1991 </td><td bgcolor="#cfffcf"> 4.37</td><td bgcolor="#cfffcf"> 1 of 12 </td></tr>
+</table>
+<p><em>Domain objects typically have lots more fields and methods than we can conveniently look at in a single table. We compose a table specific to our needs by choosing column headings of interest. Here is another look at the results of the previous search.</em>
+<p><table BORDER CELLSPACING=0 CELLPADDING=3>
+<tr><td ColSpan=6> eg.music.Display </td></tr>
+<tr><td> title </td><td> album </td><td> genre </td><td> size </td><td> date </td></tr>
+<tr><td bgcolor="#cfffcf"> Another Grey Morning </td><td bgcolor="#cfffcf"> JT </td><td bgcolor="#cfffcf"> Pop </td><td bgcolor="#cfffcf"> 3284199 </td><td bgcolor="#cfffcf"> 9/7/02 11:32 PM </td></tr>
+<tr><td bgcolor="#cfffcf"> Ananas </td><td bgcolor="#cfffcf"> Hourglass </td><td bgcolor="#cfffcf"> Pop </td><td bgcolor="#cfffcf"> 6897450 </td><td bgcolor="#cfffcf"> 9/7/02 11:47 PM </td></tr>
+<tr><td bgcolor="#cfffcf"> Copperline </td><td bgcolor="#cfffcf"> New Moon Shine </td><td bgcolor="#cfffcf"> Pop </td><td bgcolor="#cfffcf"> 5248087 </td><td bgcolor="#cfffcf"> 9/7/02 9:52 PM </td></tr>
+<tr><td bgcolor="#cfffcf"> Handy Man </td><td bgcolor="#cfffcf"> JT </td><td bgcolor="#cfffcf"> Pop </td><td bgcolor="#cfffcf"> 3976956 </td><td bgcolor="#cfffcf"> 9/7/02 11:36 PM </td></tr>
+<tr><td bgcolor="#cfffcf"> Sailing To Philadelphia </td><td bgcolor="#cfffcf"> October Rose </td><td bgcolor="#cfffcf"> Pop </td><td bgcolor="#cfffcf"> 6581911 </td><td bgcolor="#cfffcf"> 9/7/02 10:45 PM </td></tr>
+</table>
+<p><em>Notice that the songs in the two tables are not in the same order. That is because we didn't type the tables in the same order, and the order we type is preserved. RowFixture(s) use the left hand columns to line up the search results with the table values. Check out MusicExampleWithErrors to see how this works when the rows don't match up.</em>
+<p><em>The kaffe jvm/library has trouble with date formatting so you may see errors when running this from wiki.</em>
+<p><em>This completes the MusicExample.</em>
+<p><hr>
+<p>We've run quite a few test. We'll call up one more Fixture that will add a summary to the end of our document.
+<p><table BORDER CELLSPACING=0 CELLPADDING=3>
+<tr><td ColSpan=2> fit.Summary </td></tr>
+<tr>
+<td> <font color="#808080">counts</font></td>
+<td bgcolor="#cfffcf"> <font color="#808080">95 right, 0 wrong, 0 ignored, 0 exceptions</font></td></tr>
+<tr>
+<td> <font color="#808080">input file</font></td>
+<td> <font color="#808080">C:\projects\fit\imp\java\..\..\examples\MusicExample.html</font></td></tr>
+<tr>
+<td> <font color="#808080">input update</font></td>
+<td> <font color="#808080">Tue Sep 16 22:01:26 PDT 2003</font></td></tr>
+<tr>
+<td> <font color="#808080">output file</font></td>
+<td> <font color="#808080">C:\projects\fit\imp\java\output\examples\MusicExample.html</font></td></tr>
+<tr>
+<td> <font color="#808080">run date</font></td>
+<td> <font color="#808080">Thu Apr 07 23:25:17 PDT 2005</font></td></tr>
+<tr>
+<td> <font color="#808080">run elapsed time</font></td>
+<td> <font color="#808080">0:00.17</font></td></tr></table>
+<p><hr>
+<p>This is our most complete standard example. You can run it against more than one fit implementation by choosing any one of these specialized RunScript.
+<p><UL>
+<li> <a href="files/LispPlatform/runScheme.cgi">http:files/LispPlatform/runScheme.cgi</a>
+<li> <a href="files/LispPlatform/runLisp.cgi">http:files/LispPlatform/runLisp.cgi</a>
+<p></UL>
+(Caution: these scripts can't login. Run them from the public wiki pages.)</wiki>
+<hr>
+ Last edited May 28, 2003
+</body>
+</html>
+

Added: trunk/fit-1.1/examples/output/arithmetic.html
==============================================================================
--- (empty file)
+++ trunk/fit-1.1/examples/output/arithmetic.html Mon Mar 17 08:33:57 2008
@@ -0,0 +1,228 @@
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <meta name="Author" content="Ward Cunningham">
+ <meta name="GENERATOR" content="Mozilla/4.5 [en]C-CCK-MCD compaq (Win98; U) [Netscape]">
+ <title>Arithmetic</title>
+</head>
+<body>
+
+<h1>
+Integer Arithmetic</h1>
+
+<p>The computer relies on arithmetic. Here we test a variety of arithmetic
+operations expressed as 32 bit two's complement binary numbers (Java's
+int).
+<br>&nbsp;
+<table BORDER COLS=6 CELLSPACING=0 CELLPADDING=3 >
+<tr>
+<td COLSPAN="6">eg.ArithmeticFixture</td>
+</tr>
+
+<tr>
+<td>x</td>
+
+<td>y</td>
+
+<td>+</td>
+
+<td>-</td>
+
+<td>*</td>
+
+<td>/</td>
+</tr>
+
+<tr>
+<td>0</td>
+
+<td>0</td>
+
+<td bgcolor="#cfffcf">0</td>
+
+<td bgcolor="#cfffcf">0</td>
+
+<td bgcolor="#cfffcf">0</td>
+
+<td bgcolor="#ffffcf">0<hr><pre>java.lang.ArithmeticException: / by zero<br /> at eg.ArithmeticFixture.doCell(Unknown Source)<br /> at fit.Fixture.doCells(Unknown Source)<br /> at fit.Fixture.doRow(Unknown Source)<br /> at fit.Fixture.doRows(Unknown Source)<br /> at eg.ArithmeticFixture.doRows(Unknown Source)<br /> at fit.Fixture.doTable(Unknown Source)<br /> at fit.Fixture.interpretTables(Unknown Source)<br /> at fit.Fixture.doTables(Unknown Source)<br /> at fit.FileRunner.process(Unknown Source)<br /> at fit.FileRunner.run(Unknown Source)<br /> at fit.FileRunner.main(Unknown Source)<br /></pre></td>
+</tr>
+
+
+<tr>
+<td>1</td>
+
+<td>2</td>
+
+<td bgcolor="#cfffcf">3</td>
+
+<td bgcolor="#cfffcf">-1</td>
+
+<td bgcolor="#cfffcf">2</td>
+
+<td bgcolor="#ffffcf">0.5<hr><pre>java.lang.NumberFormatException: For input string: "0.5"<br /> at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)<br /> at java.lang.Long.parseLong(Long.java:403)<br /> at java.lang.Long.parseLong(Long.java:452)<br /> at fit.PrimitiveFixture.parseLong(Unknown Source)<br /> at fit.PrimitiveFixture.check(Unknown Source)<br /> at eg.ArithmeticFixture.doCell(Unknown Source)<br /> at fit.Fixture.doCells(Unknown Source)<br /> at fit.Fixture.doRow(Unknown Source)<br /> at fit.Fixture.doRows(Unknown Source)<br /> at eg.ArithmeticFixture.doRows(Unknown Source)<br /> at fit.Fixture.doTable(Unknown Source)<br /> at fit.Fixture.interpretTables(Unknown Source)<br /> at fit.Fixture.doTables(Unknown Source)<br /> at fit.FileRunner.process(Unknown Source)<br /> at fit.FileRunner.run(Unknown Source)<br /> at fit.FileRunner.main(Unknown Source)<br /></pre></td>
+</tr>
+
+<tr>
+<td>1</td>
+
+<td>-1</td>
+
+<td bgcolor="#cfffcf">0</td>
+
+<td bgcolor="#cfffcf">2</td>
+
+<td bgcolor="#cfffcf">-1</td>
+
+<td bgcolor="#cfffcf">-1</td>
+</tr>
+
+<tr>
+<td>10000</td>
+
+<td>10000</td>
+
+<td bgcolor="#cfffcf">20000</td>
+
+<td bgcolor="#cfffcf">0</td>
+
+<td bgcolor="#cfffcf">100000000</td>
+
+<td bgcolor="#cfffcf">1</td>
+</tr>
+
+<tr>
+<td>100000</td>
+
+<td>100000</td>
+
+<td bgcolor="#cfffcf">200000</td>
+
+<td bgcolor="#cfffcf">0</td>
+
+<td bgcolor="#ffcfcf">10000000000 <font size=-1 color="#c08080"><i>expected</i></font><hr>1410065408 <font size=-1 color="#c08080"><i>actual</i></font></td>
+
+<td bgcolor="#cfffcf">1</td>
+</tr>
+
+<tr>
+<td>1000000</td>
+
+<td>1000000</td>
+
+<td bgcolor="#cfffcf">2000000</td>
+
+<td bgcolor="#cfffcf">0</td>
+
+<td bgcolor="#ffcfcf">1000000000000 <font size=-1 color="#c08080"><i>expected</i></font><hr>-727379968 <font size=-1 color="#c08080"><i>actual</i></font></td>
+
+<td bgcolor="#cfffcf">1</td>
+</tr>
+</table>
+
+<br><br>
+Now we try something similar using automatic type conversion offered by ColumnFixtures (BFL1).
+<br><br>
+
+<table BORDER CELLSPACING=0 CELLPADDING=3>
+ <tr>
+ <td colspan=5>eg.ArithmeticColumnFixture</td>
+ </tr>
+ <tr>
+ <td>x</td>
+ <td>y</td>
+ <td>plus()</td>
+ <td>times()</td>
+ <td>divide()</td>
+ <td>floating()</td>
+ </tr>
+ <tr>
+ <td>2</td>
+ <td>3</td>
+ <td bgcolor="#cfffcf">5</td>
+ <td bgcolor="#cfffcf">6</td>
+ <td bgcolor="#cfffcf">0</td>
+ <td bgcolor="#cfffcf">0.6666667</td>
+ </tr>
+ <tr>
+ <td>0</td>
+ <t

==============================================================================
Diff truncated at 200k characters

Reply all
Reply to author
Forward
0 new messages