Keyboard

↓ ↑
move between the rows you can see
→
open a feature, then step into it
←
close a feature, or step out to the one above
Enter
go to the page in focus
Tab
the same rows, plus everything else on the page
/
search the whole report
m
open or close the navigation drawer
Esc
leave the search box, or close the drawer
?
this list

Extracts a table from a text block or a string array

All 6 scenarios hold

The formatter reads a table from either form the annotation accepts: a text block, or an array of string literals. Java and Kotlin both delimit a text block with three quotes.

The formatter reads a whole source file. It extracts every annotated table in the file, in the order the tables appear. The Table forms column names the form of each extracted table.

The layout of the array does not change what the formatter extracts, so both layouts share one row. The String array layout feature covers the layout itself.

expected outcome broken scenario
ScenarioSource linesTable forms?
Java text block
  • @TableTest("""
  • name | age
  • Alice | 30
  • """)
  • void test() {}
  • TEXT_BLOCK
Kotlin raw string, content on the opening line
  • @TableTest("""""|b
  • 1|2
  • """)
  • fun test() {}
  • TEXT_BLOCK
String array, either layout
    • @TableTest({"name|age", "Alice|30"})
    • void test() {}
    • @TableTest({
    • "name|age",
    • "Alice|30"
    • })
    • void test() {}
  • STRING_ARRAY
Two tables in one file
  • @TableTest("""
  • a | b
  • 1 | 2
  • """)
  • @TableTest({"x|y", "3|4"})
  • TEXT_BLOCK
  • STRING_ARRAY
No annotated table
  • @Test
  • void test() {}
[]