Fit do
Sin
Different implementations of Fit may use different me
Regardless of how fixtures are implemented, they have some
fat.Referen |
|
|
Des |
Lo |
Result() |
Primitive Fixture |
fixtures/primitive.html |
|
Column Fixture |
fixtures/ |
|
Row Fixture |
fixtures/row.html |
|
A |
fixtures/action.html |
|
Summary Fixture |
fixtures/summary.html |
|
The spe
fat.FixtureNameFixture |
|
Table |
FixtureName() |
[exampleFixture] |
exampleFixture |
[exampleFixture] [1] [2] [3] [4] |
exampleFixture |
[] [exampleFixture] |
blank |
[exampleFixture] [foo] |
exampleFixture |
[] [exampleFixture] |
blank |
The fixture name is a dire
fat.FixtureNameFixture |
|
Table |
ValidFixture() |
[fat.FixtureNameFixture.ExampleFixture] |
true |
[fat.FixtureNameFixture.exampleFixture] |
false |
[Fat.FixtureNameFixture.ExampleFixture] |
false |
[ExampleFixture] |
false |
[FixtureNameFixture.ExampleFixture] |
false |
[fat.ExampleFixture] |
false |
[fat.FixtureNameFixture.Example] |
false |
When the fixture isn’t valid, Fit annotates the
fat.FixtureNameFixture |
|
|
Table |
ValidFixture() |
Error() |
[fat.FixtureNameFixture.ExampleFixture] |
true |
blank |
[ExampleFixture] |
false |
The fixture
"ExampleFixture" was not found. |
[fat.FixtureNameFixture.NotAFixture] |
false |
"fat.FixtureNameFixture.NotAFixture”
was found, but it’s not a fixture. |
When a fixture interprets a table, it
·
none: Fit used the
·
right: Fit
·
wrong: Fit
·
error: Fit
·
ignore: Fit ignored the
· info: Useful information
fat.AnnotationFixture |
|
|
|
Type |
OriginalCell |
Text |
Output() |
none |
Text |
blank |
<td>Text</td> |
right |
Text |
blank |
<td bg |
wrong |
Text |
failure message |
<td bg |
error |
Text |
error message |
<td bg |
ignore |
Text |
blank |
<td bg |
info |
Text |
value |
<td>Text <font |
|
Text |
|
|
When annotating “wrong”
and “error”
fat.AnnotationFixture |
|
|
|
|
Type |
OriginalCell |
OriginalCell |
Text |
Output() |
none |
<ul><li>Text</li></ul> |
<ul><li>Text</li></ul> |
blank |
<td><ul><li>Text</li></ul></td> |
right |
<ul><li>Text</li></ul> |
<ul><li>Text</li></ul> |
blank |
<td bg |
wrong |
<ul><li>Text</li></ul> |
<ul><li>Text</li></ul> |
failure message |
<td bg |
error |
<ul><li>Text</li></ul> |
<ul><li>Text</li></ul> |
error message |
<td bg |
error |
<ul><li>Line
breaks<br />are preserved</li></ul> |
<ul><li>Line
breaks<br />are preserved</li></ul> |
error message |
<td bg |
ignore |
<ul><li>Text</li></ul> |
<ul><li>Text</li></ul> |
blank |
<td bg |
info |
<ul><li>Text</li></ul> |
<ul><li>Text</li></ul> |
value |
<td><ul><li>Text</li></ul>
<font |
In addition to the spe
fat.AnnotationFixture |
|
|
Type |
Text |
Output() |
none |
|
<td>Text</td> |
body |
New body |
<td>New body</td> |
body |
Anything <i>you</i> want! |
<td>Anything <i>you</i> want!</td> |
tag |
<new tag> |
<new tag>Text</new tag> |
tag |
<td align=" |
<td align=" |
addToBody |
<br />New body |
<td>Text<br />New body</td> |
addToTag |
bg |
<td bg |
Although the above examples use spe
Return to the beginning.
Known errors and omissions (fix me!):
fit.Summary |
The parsed tables
·
·
· additional rows
·
additional
Che
Expe
fat.Equals |
|||
type |
x |
y |
= |
boolean |
true |
TRUE |
true |
integer |
00001 |
1 |
true |
real |
1000 |
1e3 |
true |
string |
ab |
ABC |
false |
string |
a b |
a b |
true |
A sequen
fat.Equals |
|
|
|
type |
x |
y |
= |
integers |
1, 3, 5 |
01,03,05 |
true |
integers |
1, 3, 5 |
01,05,03 |
false |
booleans |
true, true, false |
true, false |
false |
strings |
a , b , |
a,b, |
true |
Domain values
fat.Equals |
|||
type |
x |
y |
= |
date |
Jan 1, 1995 |
January 1, 1995 |
true |
money |
$10000 |
$10,000.00 |
true |
Floating point numbers are
· non-zeros -- 123.45 is 5 digits
· zeros between non-zeros -- 100003 is 6 digits
·
zeros in the fra
· but not leading zeros -- 0001000 is 4 digits
· and not exponent digits -- 6.02e23 is 3 digits
·
left argument (re
fat.Equals |
|||
type |
x |
y |
= |
real |
123.45 |
123.449 |
false |
s |
123.45 |
123.449 |
true |
s |
100003 |
100003.1 |
true |
s |
100003.1 |
100003 |
false |
s |
12.20 |
12.210 |
false |
s |
12.21 |
12.210 |
true |
Improperly spe
· xyz is not an integer
· 10000000000000000000000000 may or may not be an integer
fat.Table |
|
fat.Equals |
|
type |
x |
integer |
200 |
integer |
xyz |
fat.Color |
|
white |
white |
white |
white |
white |
white |
white |
yellow |
Some
·
blank -- omit
·
error -- expe
fat.Table |
||
fat.Divide |
|
|
x |
y |
divide() |
100 |
2 |
50 |
100 |
2 |
|
100 |
0 |
error |
100 |
0 |
|
fat.Color |
||
white |
white |
white |
white |
white |
white |
white |
white |
green |
white |
white |
gray/white |
white |
white |
green |
white |
white |
gray/white |
The framework looks for parse support in different pla
· fixture
·
domain obje
· type adapter
The framework will allow fixtures to implement
· yea = true
· nay = false
Fixture
The first
·
·
pa
By default
·
doTables -- sequen
· doTable -- interpret a table
·
doRows -- sequen
· doRow -- interpret a row
·
doCells -- sequen
· doCell -- interpret a row
The default interpretation of a
Cells
·
white -- no
·
green -- right: expe
·
red -- wrong: expe
·
yellow -- ex
·
gray -- ignore: desired
Fixtures
·
·
·
runner fixtures (e.g. AllFiles)
Fixtures
· state variables
· state lifetime
· state summary
The primitive fixture does not depend on TypeAdapter. Type spe
·
·
·
·
A
· name is setter or field
· name() is getter or field
·
·
depre
A row fixture expe
· name is field or getter
· name() is getter
·
Rows are mat
·
some given, none a
·
none given, some a
·
one given, one a
·
many given, many a
Missing and surplus rows are marked as su
·
ea
· surplus rows added to table in gray
An a
· enter -- put given in setter or field
·
·
press --
·
start -- new a
An a
·
a
·
initial a
·
start with no argument spe
Start
·
·
return to an existing a
Other a
·
repla
·
repla
·
restore the previous a
Sub
·
Runner
A runner
·
top-level fixture is instan
A runner retrieves and disposes of do
· input-file only -- default output
·
input-file output-file -- spe
·
input-dire
·
input-dire
· index.html result summaries
· - is standard in/out
A runner signals the presen
·
exit status is sum of wrong and ex
·
main is fa
A runner establishes run spe
· ?AssemblyPath ???