CalculateFixture is for testing calculations, like ColumnFixture. CalculateFixture was introduced to explore a few ideas.
- It's minimalistic, in the sense that there are no (default) special values, such as " " and "error", as used in ColumnFixture. Such special values can be explicitly defined in the fixture code.
- It distinguishes between the given values and the expected values by using a blank column to separate the givens on the left side and the expecteds on the right.
- It allows any characters in the second (header) row, including unicode.
- It can simplify ^WritingFixtures in some cases.
CalculatedDiscount | ||
$ | discount | |
0.00 | 0.00 | |
1000.00 | 0.00 | |
1010.00 | 50.50 | |
1100.00 | 55.00 | |
1200.00 | 60.00 | |
2000.00 | 100.00 |
- Copyright (c) 2004, 2005 Rick Mugridge, Rimu Research.
- Released under the terms of the GNU General Public License version 2 or later.
Add Child Page to CalculateFixture