|
21 | 21 |
|
22 | 22 | The actual tests (generating decimal strings and feeding them to dec2flt) is |
23 | 23 | performed by a set of stand-along rust programs. This script compiles, runs, |
24 | | -and supervises them. In particular, the programs report the strings they |
25 | | -generate and the floating point numbers they converted those strings to. |
| 24 | +and supervises them. The programs report the strings they generate and the |
| 25 | +floating point numbers they converted those strings to, and this script |
| 26 | +checks that the results are correct. |
26 | 27 |
|
27 | 28 | You can run specific tests rather than all of them by giving their names |
28 | 29 | (without .rs extension) as command line parameters. |
|
64 | 65 | exit code that's not 0, the test fails. |
65 | 66 | The output on stdout is treated as (f64, f32, decimal) record, encoded thusly: |
66 | 67 |
|
67 | | -- The first eight bytes are a binary64 (native endianness). |
68 | | -- The following four bytes are a binary32 (native endianness). |
69 | | -- Then the corresponding string input follows, in ASCII (no newline). |
| 68 | +- First, the bits of the f64 encoded as an ASCII hex string. |
| 69 | +- Second, the bits of the f32 encoded as an ASCII hex string. |
| 70 | +- Then the corresponding string input, in ASCII |
70 | 71 | - The record is terminated with a newline. |
71 | 72 |
|
72 | 73 | Incomplete records are an error. Not-a-Number bit patterns are invalid too. |
|
0 commit comments