SIListra Unit Testing Library
Reuse your GoogleTest tests for the encoded channel: the SIListra Unit Testing Library can be fully encoded with the SIListra Safety Transformer and reports the results of both channels in one run.
- Compatible with common GoogleTest features
- Supports all features of the SIListra Safety Transformer
- Results for both channels in one run
- CMake / CTest integration

Testing the Encoded Channel
The encoded channel needs testing just like the native channel. Since both channels are functionally equivalent, the simplest way is to encode the native-channel tests themselves with the SIListra Safety Transformer – the result is a set of additional tests that check the encoded channel in the same way.
Off-the-shelf test frameworks cannot be fully encoded with the SIListra Safety Transformer, because they use features it does not support. The SIListra Unit Testing Library solves this by encapsulating the unsupported features in a plain C API, on top of which it provides compatibility with existing frameworks. GoogleTest tests that use the supported feature set can be encoded and run against the encoded channel without changing the test code.
One Test Binary, Both Channels
The SIListra Safety Transformer encodes your source code and your tests. The compiler and linker of your choice build the test binary from both channels, with the SIListra Unit Testing Library linked statically. Running it yields a test report for the native and the encoded channel.
The SIListra Unit Testing Library also works with the library feature of the SIListra Safety Transformer: the native and encoded channel are compiled into a static library, and the native and encoded tests are linked against it together with the SIListra Unit Testing Library – so the binary code of the static library itself is what gets tested.
Familiar Tests, Built for Safety
GoogleTest-Compatible
Native CMake Integration
Built for Safety
What the SIListra Unit Testing Library Supports
- Tests with
TEST, fixtures withSetUpandTearDownviaTEST_F ASSERT_*andEXPECT_*forEQ,NE,LT,LE,GT,GE,TRUEandFALSE- IEEE 754 floating-point and C-string comparisons
- Subset of the CUnit API; compatibility with other frameworks on request
- Shows which channel a test runs on; tests can be excluded from the native or the encoded channel
- Detailed test output and an xUnit-like XML report
- Supports all features of the SIListra Safety Transformer
- Documentation and tutorials included
Runs With the SIListra Unit Testing Library and GoogleTest
/* A small adder function to test. */
static int lib_add(int a, int b) { return a + b; }
TEST(TestBasic, BasicAsserts) {
EXPECT_EQ(true, true);
EXPECT_GT(78, 77);
/* ASSERT_* stops the test on failure,
EXPECT_* continues with the next check. */
ASSERT_EQ(lib_add(3, 3), 6);
ASSERT_TRUE(lib_add(1, 1) == 2);
ASSERT_FALSE(lib_add(2, 2) == 5);
}Testing the Encoded Channel in Your Project?
Talk to us about the SIListra Unit Testing Library and your existing tests – non-binding and confidential.
Start Evaluation