test_the_files_own_directory_and_the_root_expand

Tests › tests/test_cmake_resolve.py

passed Passed in the packaged run.

What this test is for

Why it exists

Source-dir variables expand; the path is normalised inside the tree.

Given

  1. —
→

When

  1. resolve_argument("${CMAKE_CURRENT_SOURCE_DIR}/../scripts/gen.pl", "library", {}, True)
  2. resolve_argument("${CMAKE_CURRENT_LIST_DIR}/gen.py", "tools", {}, True)
  3. resolve_argument("${CMAKE_SOURCE_DIR}/include/a.h", "library", {}, True)
  4. resolve_argument("${PROJECT_SOURCE_DIR}/x.fmt", "", {}, True)
→

Then

  1. ✓ resolve_argument("${CMAKE_CURRENT_SOURCE_DIR}/../scripts/gen.pl", "library", {}, True) equals "scripts/gen.pl"
  2. ✓ resolve_argument("${CMAKE_CURRENT_LIST_DIR}/gen.py", "tools", {}, True) equals "tools/gen.py"
  3. ✓ resolve_argument("${CMAKE_SOURCE_DIR}/include/a.h", "library", {}, True) equals "include/a.h"
  4. ✓ resolve_argument("${PROJECT_SOURCE_DIR}/x.fmt", "", {}, True) equals "x.fmt"

tests/test_cmake_resolve.py:24 · its file's page

What it checks (4)

  1. assert ( resolve_argument("${CMAKE_CURRENT_SOURCE_DIR}/../scripts/gen.pl", "library", {}, True) == "scripts/gen.pl" ) observes resolve_argument
  2. assert resolve_argument("${CMAKE_CURRENT_LIST_DIR}/gen.py", "tools", {}, True) == "tools/gen.py" observes resolve_argument
  3. assert resolve_argument("${CMAKE_SOURCE_DIR}/include/a.h", "library", {}, True) == "include/a.h" observes resolve_argument
  4. assert resolve_argument("${PROJECT_SOURCE_DIR}/x.fmt", "", {}, True) == "x.fmt" observes resolve_argument

Where the product reaches it

No product flow reaches this code: no product entry point's flow calls any of the functions this test calls.

Call flow

test_the_files_own_directory_and_the_root_expand→resolve_argument

What it reaches

Each row runs from this test, through the calls it makes, to the code a requirement names. If that code breaks, the test's checks are what should catch it. Reaching is not proving: a check only proves what it observes. No mutation records were given, so these rows say what the test REACHES.

test_the_files_own_directory_and_the_root_expand · 4 checksresolve_argumentREQ-DDB-PIPE-012 · measured
Also reaches 1 requirement

Its run touches their code; that is reach, not proof.