Unit Test

Coverage: 100.0% (10 of 10 items OK)

[OK] GoogleTest Test Foo:GetNumber
:Given: a default-constructed Foo instance
:When: GetNumber is called
:Then: it returns 42

Traces to:


Derived from:


Source: unit_1/foo_test.cpp:20

[OK] GoogleTest Test Foo:GetNumberRepeatedly
:Test-spec: //unit_1:get_number_spec

Traces to:


Derived from:


Source: unit_1/foo_test.cpp:34

[OK] GoogleTest Test Foo:IsFinal
:Given: the Foo class definition
:When: checking whether the class is extensible
:Then: it is declared final, preventing any subclassing

Traces to:


Derived from:


Source: unit_1/foo_test.cpp:46

[OK] GoogleTest Test Foo:IsFinalStaticAssert
:Given: the Foo class definition
:When: querying the type trait std::is_final for Foo
:Then: the trait reports true, confirming Foo cannot be subclassed

Traces to:


Derived from:


Source: unit_1/foo_test.cpp:59

[OK] GoogleTest Test Foo:GetNumberViaConstInstance
:Given: a const default-constructed Foo instance
:When: GetNumber is called through a const reference
:Then: it still returns 42

Traces to:


Derived from:


Source: unit_1/foo_test.cpp:72

[OK] GoogleTest Test Foo:InitializesToKnownValue
:Given: a default-constructed Foo instance
:When: GetNumber is called for the first time
:Then: it returns 42

Traces to:


Derived from:


Source: unit_1/foo_test.cpp:86

[OK] GoogleTest Test Foo:ValueConsistentAcrossReads
:Given: a const Foo instance
:When: GetNumber is called multiple times
:Then: the same value is returned on each call

Traces to:


Derived from:


Source: unit_1/foo_test.cpp:100

[OK] GoogleTest Test Foo:FootprintWithinBudget
:Given: the Foo class definition
:When: querying the size of Foo
:Then: it stays far below the 10 MB budget

Traces to:


Derived from:


Source: unit_1/foo_test.cpp:113

[OK] GoogleTest Test Bar:AssertNumber
:Given: a Bar instance owning a Foo with value 42
:When: AssertNumber is called
:Then: it returns true

Traces to:


Derived from:


Source: unit_2/bar_test.cpp:18

[OK] GoogleTest Test Formatter:Format
:Given: a Formatter and a default-constructed Foo
:When: Format is called with the Foo
:Then: it returns the human-readable string “42”

Derived from:


Source: unit_3/formatter_test.cpp:18