How E-Code checks every program
E-Code checks its library programs by computing each answer a second way and replaying the case on a virtual calculator, with the inputs typed on its keys. 137 of the 165 programs carry oracle test cases: 778 cases making 4981 checks.
Independent oracles
Before a test case is written, a separate program in Python, the oracle, computes the expected answer. Where it can, the oracle gets there by a different method from the calculator program: equilibrium equations instead of a closed-form formula, a simulation, another algorithm, or published values.
127 programs are checked this way. For the other 10 programs no second method fits, so the oracle recomputes the same cited textbook formula, and their pages say so.
Key-by-key replays on E-Calc
Each case is then replayed on E-Calc, E-Code's virtual calculator. The inputs are typed on its keys, the program runs, and every labelled result on the screen is compared with the oracle's value. The replay also checks that the program ran cleanly and that every screen fits the calculator's display.
Checking the calculator itself
A program check is only as good as the calculator it runs on. E-Calc's screens, menus and results are compared with the examples in Texas Instruments' guidebooks for the TI-84 Plus CE and the TI-89 Titanium.
The numbers
| What | Count |
|---|---|
| Programs in the library | 165 |
| Programs with oracle test cases | 137 |
| Test cases | 778 |
| Checks those cases make on the calculator | 4981 |
| Checked against an independent method | 127 |
| Checked against the textbook formula | 10 |
The other 28 programs are checked by separate automated runs on the TI-BASIC interpreter, the engineering suite against its own oracle values. They are not counted in this table.