Unit Test
Coverage: 100.0% (8 of 8 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: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:33
[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:46
[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:59
[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:73
[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:87
[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 Bar:Format
- Given:
a Bar instance owning a Foo with value 42
- When:
Format is called
- Then:
it returns the human-readable string “42”
Traces to:
Derived from:
Source: unit_2/bar_test.cpp:32