assert_fail

September 14, 2025 ยท View on GitHub

Shows how to use xtd::tunit::assert::fail method.

Sources

Build and run

Open "Command Prompt" or "Terminal". Navigate to the folder that contains the project and type the following:

xtdc run

Output

Start 1 test from 1 test case
Run tests:
  FAILED  unit_tests::test.test_case_failed (0 ms total)
    Test failed
    Stack Trace: in |---OMITTED---|/assert_fail.cpp:8

Test results:
  FAILED  1 test.
End 1 test from 1 test case ran. (0 ms total)