Skip to content

fixtures.hpp

file tests/core/fixtures.hpp ยท Test suite

Shared fixtures of the core test suite: fixture file access, reference vessel states and a sentence helper.

Source tests/core/fixtures.hpp

The test files of the nmeasim_core_tests executable include it: the AIS, NMEA 0183, log, Signal K, simulation, track and ViewSync tests. fixture_state is the reference vessel whose encoded sentences are the golden values of tests/core/nmea0183/encoders_test.cpp and the examples in docs/reference/nmea0183-sentences.md, so a change to one of its values changes expected output across the suite. The file paths rely on the NMEASIM_FIXTURES_DIR compile definition that tests/CMakeLists.txt sets to tests/fixtures.

Namespaces

Namespace Description
nmeasim::test Shared helpers of the test suites: fixtures and utilities that several test files use.

Namespace members

Declared or defined in this file and documented on the page of their namespace.

Member Description
nmeasim::test::fixture_path Returns the absolute path of a file under tests/fixtures.
nmeasim::test::read_fixture Returns the contents of a file under tests/fixtures.
nmeasim::test::fixture_state Returns the reference vessel state, off Athens at 12:34:56.780 UTC on 22 September 2026.
nmeasim::test::fixture_state_without_fix Returns fixture_state with the GNSS receiver reporting no fix.
nmeasim::test::fixture_state_extreme Returns fixture_state with extreme values that produce the longest possible fields.
nmeasim::test::body_of Strips the start delimiter and the checksum from a framed sentence.