source | test results

Frame1 2 3 4 5 6 7 8 9 10
354/X X 346/72349-4/3
8 28 51 68 75 92 101 108 117 130
Frame1 2 3 4 5 6 7 8 9 10
30 60 90 120 150 180 210 240 270 Expected '299' but got '300'

These last 2 tables use the table-table fixture. Notice the pattern table:<helper>. table indicates we want to use a table-table fixture. The bowling helper is declared in the itl.example.bowling namespace using the deftfn macro. The function it declares simply takes a list of rows and returns a list of rows. itl will parse the tables in this document into lists of rows, and call the bowling function for each. It will then read the results of your function and re-render them, inserting the new rows back into the document.

You can also read the source code for the fixture that runs these tables.

This table allows you to write a function that accepts an arbitrary table and returns a table of results. This has a similar setup to the input (except the header row will be dropped). Your function can return any number of rows back, and they will be written in place of the parsed table.

In the itl.core namespace are four status mutation functions: pass, fail, exception, and note. When you set the value of a cell to be the result of one of these functions invoked on any value, the given value will be rendered in the appropriate color and the number of pass/fail/exception counts will be incremented. That same namespace also has a fun assert-value function, which will either call pass or fail with useful output.

Be careful!

  1. If you do calculations and don't convert the results back to strings you may see failures when you shouldn't!
  2. Table cells that don't contain at least a space character are dropped by the markdown processor. This is significantly annoying, and we haven't yet figured out a way to make sure this doesn't happen.