Files
JUnit_Tutorials/parameterized/docs/output/16-display-name-custom-multiply.txt
T

22 lines
862 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
Captured from a real `junit-platform-console-standalone --details=tree` run against
DisplayNameTest, compiled and executed for real.
╷
├─ JUnit Platform Suite ✔
├─ JUnit Jupiter ✔
│ └─ DisplayNameTest ✔
│ └─ shouldMultiply(int, int, int) ✔
│ ├─ [1] "3" × "4" = "12" ✔
│ ├─ [2] "0" × "5" = "0" ✔
│ └─ [3] "-2" × "3" = "-6" ✔
└─ JUnit Vintage ✔
Test run finished after 173 ms
[ 3 tests successful ]
[ 0 tests failed ]
name = "[{index}] {0} × {1} = {2}" combines the built-in {index} keyword (the invocation's
1-based position) with the three positional argument placeholders and a literal Unicode
multiplication sign, to produce a display name that reads like the actual arithmetic the test
is checking rather than a generic "[1] 3, 4, 12".