assumeisnot_empty

September 14, 2025 ยท View on GitHub

Shows how to use xtd::tunit::assume::is_not_empty 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 4 tests from 1 test case
Run tests:
  SUCCEED unit_tests::test.test_case_collection_succeed (0 ms total)
  ABORTED test.test_case_collection_aborted (0 ms total)
    Expected: collection not <empty>
    But was:  <empty>
    Stack Trace: in |---OMITTED---|/assume_is_not_empty.cpp:13
  SUCCEED unit_tests::test.test_case_string_succeed (0 ms total)
  ABORTED test.test_case_string_aborted (0 ms total)
    Expected: collection not <empty>
    But was:  <empty>
    Stack Trace: in |---OMITTED---|/assume_is_not_empty.cpp:21

Test results:
  SUCCEED 2 tests.
  ABORTED 2 tests.
End 4 tests from 1 test case ran. (0 ms total)