Skip to content

containers: link unit tests to comp_req requirements via RecordProperty - #568

Merged
4og merged 7 commits into
eclipse-score:mainfrom
Nikhil2206:nk-containers-test-req-trace
Sep 18, 2026
Merged

4og merged 7 commits into
eclipse-score:mainfrom
Nikhil2206:nk-containers-test-req-trace

Conversation

@Nikhil2206

@Nikhil2206 Nikhil2206 commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Part of #522. Adds RecordProperty traceability metadata linking score/containers unit tests to their comp_req__containers__* requirements.

Files touched: dynamic_array_test.cpp, intrusive_list_test.cpp, non_relocatable_vector_test.cpp, non_relocatable_vector_emplace_back_test.cpp, non_relocatable_vector_special_member_funcs_test.cpp.

Validated: bazel test --config=bl-x86_64-linux //score/containers/... → 7/7 test targets PASSED.

Deliberately left unlinked (with reasoning)

  • non_relocatable_vector_special_member_funcs_test.cpp: CannotCopyVectorContainingNonCopyableType, and the two NonMoveableAndCopyableElementTypeFixture variants of MoveConstructingMovesAllElements / MoveAssigningMovesAllElements — these have empty bodies (just comments documenting that type traits can't detect true non-compilability at runtime); nothing to assert or link.
  • test/fake_memory_resource_test.cpp, test/fancy_pointer_allocator_test.cpp — these test-infrastructure self-tests (test doubles), not containers library behavior. No comp_req claims anything about them, so left entirely unlinked.

Fixes #523

@github-actions

Copy link
Copy Markdown
Contributor

Documentation preview for this pull request is available at:
pr-568: https://eclipse-score.github.io/baselibs/pr-568/

@Nikhil2206 Nikhil2206 closed this Sep 11, 2026
@github-project-automation github-project-automation Bot moved this from In Progress to Done in BAS - Baselibs FT Sep 11, 2026
@Nikhil2206 Nikhil2206 reopened this Sep 11, 2026
@Nikhil2206
Nikhil2206 marked this pull request as draft September 11, 2026 08:25
@Nikhil2206
Nikhil2206 marked this pull request as ready for review September 16, 2026 07:28
@4og
4og requested a balanced review from Copilot September 16, 2026 12:24
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Sep 17, 2026
@4og
4og requested a balanced review from Copilot September 17, 2026 11:03

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Several traceability records are incomplete or unsupported, and the modified architecture need requires a version bump.

Get a fresh assessment by requesting another Copilot review.

Review details

Suppressed comments (2)

score/containers/non_relocatable_vector_special_member_funcs_test.cpp:376

  • This touched test records the descriptive metadata but has no FullyVerifies or PartiallyVerifies property, leaving an incomplete traceability record. Since the deterministic-behavior requirement cannot describe an operation that deliberately allocates, either remove the test metadata and document the deliberate exception or add an accurate requirement for this behavior.
    this->RecordProperty("TestType", "resource-usage");
    this->RecordProperty("DerivationTechnique", "equivalence-classes");
    this->RecordProperty("Description",
                         "Check that copy-constructing a NonRelocatableVector allocates memory based on the "
                         "source's capacity, not its current size.");

score/containers/dynamic_array_test.cpp:821

  • A leak check proves that allocated memory is released, not that no dynamic allocation occurred as required by comp_req__containers__deterministic_behavior. With only EXPECT_TRUE(true) in the ordinary test configuration, this linkage records verification without an assertion of the requirement.
    this->RecordProperty("PartiallyVerifies", "comp_req__containers__deterministic_behavior");
  • Files reviewed: 8/8 changed files
  • Comments generated: 5
  • Review effort level: Balanced

Comment thread score/containers/docs/architecture/index.rst
Comment thread score/containers/dynamic_array_test.cpp
Comment thread score/containers/dynamic_array_test.cpp Outdated
Comment thread score/containers/non_relocatable_vector_emplace_back_test.cpp Outdated
@github-project-automation github-project-automation Bot moved this from Done to On Hold in BAS - Baselibs FT Sep 18, 2026
@4og
4og enabled auto-merge September 18, 2026 16:04
@4og
4og disabled auto-merge September 18, 2026 16:15
@4og
4og merged commit a980fe1 into eclipse-score:main Sep 18, 2026
25 of 27 checks passed
@github-project-automation github-project-automation Bot moved this from On Hold to Done in BAS - Baselibs FT Sep 18, 2026
srinivasugithub pushed a commit to bgsw-contrib/score_baselibs that referenced this pull request Sep 21, 2026
…st-req-trace

containers: link unit tests to comp_req requirements via RecordProperty

This branch was previously deployed

1 inactive deployment
workflow-approval — b7de3509 Deployed Sep 18, 2026 by Nikhil2206 via Build and Test bl-x86_64-qnx / approval #1990
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c++ C++ code comp-cpp-containers Related to score/containers documentation Improvements or additions to documentation

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

containers: clean up test-to-requirement traceability

3 participants