Repository navigation
SpecLab v0.2.0
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::Registerandspeclab::runMain(new modulespeclab.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 itsfile:line.speclab::Test<State>(id[, initial]): Given/When/Then steps that receive a shared
State&, which outlivesExecute(). This replaces thestd::shared_ptr<State>idiom. Steps
may still bevoid(). With MSVC 19.44 (VS 2022),Statemust 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'ssource_location.
- Self-tests (
tests/), run bycteston every CI leg: one CTest entry per scenario
(discovered with--list-tests, with labels), pluscontract.*tests that check the exit code
and the exact output ofrunMain.SPECLAB_BUILD_TESTSnow defaults to on only when
SpecLab is the top-level project.
Changed
assertEqualandassertNotEqualaccept two different types (anintliteral against a
std::size_t, or a string literal against astd::string). Integers are compared with
std::cmp_equal, so-1no longer risks equallingSIZE_MAX, and callers get no
sign-conversion warnings.booland the character types (char,wchar_t,char8_t,
char16_t,char32_t) are rejected bystd::cmp_equal, so they are compared with==.AssertionFailure::formatLocation(), and thereforeTestResult::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.cppmforward-declaredParameterizedTestBuilder, which is attached to another
module. Clang rejects that ("cannot be attached to other modules") in any translation unit that
usesParameterizedTest. 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.