Skip to content

Releases

SpecLab v0.4.0

Choose a tag to compare

@github-actions github-actions released this 20 Sep 19:27
d85c1f7

SpecLab v0.4.0

A minor release: it adds a public overload. Every call that compiled against 0.3.0 still
compiles, but speclab::Test<State> is now an overload set rather than a single function, so
naming it without calling it - &speclab::Test<MyState>, or binding it to auto - no longer
deduces and needs an explicit function type. No in-tree code did that, and MduX does not either.

Added

  • speclab::Test<State>(id) is now its own overload, and StatefulTestBuilder gained a
    constructor that builds the shared state in place. A State that is neither copyable nor
    movable - one holding an RAII handle such as a scoped temporary directory, a file handle or a
    lock - can now be used (#32). Previously the single factory's State initial = State{} default
    argument was materialised and then moved, so the state had to be movable even in the form that
    only ever default-constructs it. The two-argument Test<State>(id, initial) keeps its by-value
    parameter, where moving is unavoidable.
  • A self-test with a deliberately immovable state, which fails to compile without the overload.

Important

SpecLab is an experimental project. Its compliance features are conceptual and educational: using it does not make software compliant with IEC 62304, ISO 13485 or ISO 14971, and it is not recommended for production use.

Release tags are immutable. v0.4.0 points at d85c1f7 and will not be moved. Each package has a matching SHA-256 checksum file. The packages were built by this workflow run.

SpecLab v0.3.0

Choose a tag to compare

@github-actions github-actions released this 20 Sep 09:52
3985227

SpecLab v0.3.0

A minor release, not a patch: it adds public API and changes the signatures of
RequirementRegistry's accessors. The exported free functions of
speclab.core.requirements are unchanged.

Added

  • RequirementBuilder::Test(id) and RequirementBuilder::SetEnabled(bool).
  • speclab::core::ClearRequirementTestLinks, NormalizeRiskLevel and NormalizeSafetyClass.
  • A ThreadSanitizer CI leg (linux-tsan), which runs the self-tests with
    TSAN_OPTIONS=halt_on_error=1.

Fixed

  • The Requirement, Feature and IEC62304Process builders now run tests (#25). Their
    Execute() returned an empty vector: nothing ran, and a caller counting failures saw none, so a
    suite that looked complete reported no failure. Now:
    • RequirementBuilder::Test(id) attaches a test and returns its TestBuilder. Execute() runs
      each one and returns its result, with the requirement's metadata and id attached.
    • Execute() registers the requirement and its test links (including AssociateTest ids) in the
      requirement registry, so ExportTraceMatrixCSV/HTML and the REQUIREMENT_COVERAGE gate see
      them.
    • A requirement with no test of its own returns one Blocked result instead of an empty list; a
      disabled one returns Skipped. Feature and IEC62304Process report Blocked when they hold
      no requirement.
  • The requirement registry is now locked. It is a process-wide singleton that TestSuite reads
    from parallel test threads while Requirement::Execute() writes to it, which was a data race
    on its unordered_maps (confirmed by ThreadSanitizer). Its accessors that used to return
    pointers into those maps (getRequirement, getRequirementsForTest, getAllRequirements,
    getUncoveredHighRisk, getUncoveredCritical) now return values; the free functions are
    unchanged.
  • RegisterRequirement updates an existing record instead of keeping the first one. A risk level
    raised between two registrations now reaches the coverage gate.
  • Coverage links are rebuilt from what each execution actually ran. A requirement only counts
    as covered by tests that ran and were not skipped, plus the ids given to AssociateTest (which
    run elsewhere). This closes three ways a requirement could look covered with nothing verified:
    a requirement disabled after an execution kept the links of that earlier run; a disabled
    attached test (Test("T").SetEnabled(false)) was linked anyway; and a requirement with no test
    at all was linked to its own synthetic result.
  • Risk levels and safety classes are normalised (NormalizeRiskLevel, NormalizeSafetyClass).
    The builders document RiskLevel("Critical") and SafetyClass("ClassC"), but the coverage gate
    compares against CRITICAL and CLASS_C, so those spellings produced no critical gap.
  • FeatureBuilder::Requirement(), IEC62304ProcessBuilder::Requirement() and the new
    RequirementBuilder::Test() return references into their containers, which are now std::deque.
    With std::vector, adding the next requirement or test invalidated a reference the caller still
    held.

Important

SpecLab is an experimental project. Its compliance features are conceptual and educational: using it does not make software compliant with IEC 62304, ISO 13485 or ISO 14971, and it is not recommended for production use.

Release tags are immutable. v0.3.0 points at 3985227 and will not be moved. Each package has a matching SHA-256 checksum file. The packages were built by this workflow run.

SpecLab v0.2.0

Choose a tag to compare

@github-actions github-actions released this 19 Sep 19:19
5ca3dd8

SpecLab v0.2.0

Added

  • The APIs MduX had to write in its tests/framework/SpecLabBridge.hpp, so that header can forward
    to SpecLab:
    • speclab::Register and speclab::runMain (new module speclab.runners.discovery):
      registration without macros, and a runner implementing --list-tests (name<TAB>labels) and
      --run=<name>, with the bridge's exit codes and output, byte for byte. An unknown name is an
      error, not a pass.
    • speclab::core::Checks: collects several failed expectations and reports them in one
      AssertionFailure, each with its file:line.
    • speclab::Test<State>(id[, initial]): Given/When/Then steps that receive a shared
      State&, which outlives Execute(). This replaces the std::shared_ptr<State> idiom. Steps
      may still be void(). With MSVC 19.44 (VS 2022), State must be declared at namespace scope:
      a function-local type makes that compiler crash (C1001) or leave symbols undefined (C5046).
    • Assertions::require(condition, "format {}", args…): a compile-time-checked format
      string, formatted only on failure, with the caller's source_location.
  • Self-tests (tests/), run by ctest on every CI leg: one CTest entry per scenario
    (discovered with --list-tests, with labels), plus contract.* tests that check the exit code
    and the exact output of runMain. SPECLAB_BUILD_TESTS now defaults to on only when
    SpecLab is the top-level project.

Changed

  • assertEqual and assertNotEqual accept two different types (an int literal against a
    std::size_t, or a string literal against a std::string). Integers are compared with
    std::cmp_equal, so -1 no longer risks equalling SIZE_MAX, and callers get no
    sign-conversion warnings. bool and the character types (char, wchar_t, char8_t,
    char16_t, char32_t) are rejected by std::cmp_equal, so they are compared with ==.
  • AssertionFailure::formatLocation(), and therefore TestResult::errorDetails, reports the
    source file by name instead of by absolute path. The output is now identical on every machine;
    location() still has the full path.
  • GitHub release notes are built from this file's section for the tag, followed by the
    experimental-project disclaimer, instead of a fixed template. The template claimed regulatory
    "validation" and linked to documentation that does not exist. The release job fails if the
    section is missing or empty.

Fixed

  • RequirementAPI.cppm forward-declared ParameterizedTestBuilder, which is attached to another
    module. Clang rejects that ("cannot be attached to other modules") in any translation unit that
    uses ParameterizedTest. The declaration was unused and is removed.

Important

SpecLab is an experimental project. Its compliance features are conceptual and educational: using it does not make software compliant with IEC 62304, ISO 13485 or ISO 14971, and it is not recommended for production use.

Release tags are immutable. v0.2.0 points at 5ca3dd8 and will not be moved. Each package has a matching SHA-256 checksum file. The packages were built by this workflow run.

SpecLab v0.1.2

Choose a tag to compare

@github-actions github-actions released this 19 Sep 15:45
be930c3

SpecLab v0.1.2

This release fixes sanitizer builds for consumers and adds macOS on Apple Silicon. The test API is unchanged.

Highlights

  • Sanitizer builds of consumers fixed. In v0.1.1, -fsanitize=… was not passed on to code that does import speclab;. When that code was left uninstrumented, GCC 16 crashed with an internal compiler error (expand_UBSAN_NULL). The flag is now PUBLIC on speclab, for compiling and linking, in the build tree and in the installed package.
  • macOS on Apple Silicon. It is supported with upstream LLVM/Clang 21.1.8 and libc++ (brew install llvm@21 ninja, then --toolchain cmake/toolchains/macos-arm64-llvm.cmake), and CI builds it on macos-15. On macOS, AppleClang and non-arm64 targets (including universal arm64;x86_64 builds) are now refused at configure time with a clear message.
  • Both Clang toolchain files reject a conflicting -stdlib= anywhere in CMAKE_CXX_FLAGS.
  • README rewritten against the actual API, with per-platform CI badges. Every example is compiled with -Wall -Wextra -Werror and run. The Requirement/Feature/IEC62304Process builders are documented as metadata-only: their Execute() runs no test (#25).
  • CI:
    • The release workflow can now create the GitHub release itself.
    • The Security workflow publishes its CodeQL and Trivy results again.
    • aquasecurity/trivy-action is pinned by commit.

See CHANGELOG.md for details.

Supported platforms (all built in CI)

  • Windows x64 / x86: MSVC 17.10+
  • Linux x64:
    • GCC 16.1.0, with CMake 4.1.1, 4.3.1 or 4.4.2
    • Clang 21 + libc++
  • macOS Apple Silicon: Clang 21.1.8 + libc++
  • CMake 4.0 to 4.4. GCC 16.2.0 is not usable (#17).

Important

SpecLab is an experimental project. Its compliance features are conceptual and educational: using it does not make software compliant with IEC 62304, ISO 13485 or ISO 14971, and it is not recommended for production use.

Release tags are immutable. v0.1.2 points at be930c3 and will not be moved. Each package has a matching SHA-256 checksum file. The packages were built by the Release workflow run for this tag.

SpecLab v0.1.1

Choose a tag to compare

@ambroise-leclerc ambroise-leclerc released this 19 Sep 12:07
4f58240

SpecLab v0.1.1

This release fixes the build and makes SpecLab safe to use as a dependency. The test API is unchanged. Consumers such as MduX no longer need to patch SpecLab to use CMake 4.3.

Highlights

  • import std works on CMake 4.0 to 4.4. Each CMake series has its own experimental gate, and newer series are refused until someone qualifies them.
  • Clang is supported with libc++, through cmake/toolchains/linux-clang21-libcxx.cmake. CI now builds with Clang 21.
  • SpecLab's own build settings no longer reach the projects that use it: warnings, -Werror, /permissive-, NOMINMAX, definitions and cache entries. Sanitizer and coverage link flags are still exported, including in the installed package.
  • SpecLab's cmake/ helpers are now included by path. Before, a consumer's module with the same name could be loaded in their place.
  • Definitions renamed from MDUX_* to SPECLAB_*. WARNINGS_AS_ERRORS is renamed to SPECLAB_WARNINGS_AS_ERRORS, and is on only when SpecLab is the top-level project.
  • The ASSERT_* / FAIL macros were removed. They were never reachable through import speclab;.

The full list is in CHANGELOG.md.

Requirements

  • CMake 4.0–4.4
  • GCC 16.1+ (GCC 16.2.0 is not usable, see #17), MSVC 17.10+, or Clang 20+ with libc++
  • C++23 with import std support

Release tags are immutable. v0.1.1 points at 4f58240 and will not be moved.

Each platform archive includes a matching SHA-256 checksum file. The packages were built by the Release workflow run for this tag.

SpecLab v0.1.0

Choose a tag to compare

@camille-martin-paris camille-martin-paris released this 13 Aug 06:37
37b51fc

SpecLab v0.1.0

Initial release of the C++23 modules-based testing framework for medical-device software.

Highlights

  • BDD-style test cases and suites
  • Medical test cases and compliance validation
  • Requirements registration, test linking, risk scoring, and traceability exports
  • Console reporting and parallel test execution
  • Pulse oximeter and basic examples
  • GCC 16.1.0 and MSVC 17.10+ validated release packages

Requirements

  • CMake 4.0+
  • GCC 16.1+, or MSVC 17.10+
  • C++23 with import std support

Each platform archive includes a matching SHA-256 checksum file.