Skip to content

Test suite

The Catch2 test suites of the libraries and the desktop application, with their fixtures and helpers. Each file page lists its test cases; their names are the specification the tests check.

Namespaces

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

Types

Type Description
(anonymous namespace){ais_test.cpp}::BitReader Reader of armoured AIS payloads that checks the encoders field by field.
(anonymous namespace){cli_test.cpp}::CliRun What one run of the command-line tool left behind.
(anonymous namespace){tile_cache_test.cpp}::TileServer A minimal HTTP/1.1 tile server on 127.0.0.1 that answers every request the same way.

Files

File Description
tests/app/dials_test.cpp Tests of the dashboard dials nmeasim::app::CompassDial and nmeasim::app::WindDial.
tests/app/main.cpp Entry point of nmeasim_app_tests, the Catch2 suite for the desktop application.
tests/app/main_window_test.cpp Tests of nmeasim::app::MainWindow, the main window of the desktop application.
tests/app/map_test.cpp Tests of the map: nmeasim::app::map::MapWidget, nmeasim::app::map::TileCache and the tile arithmetic of map/tile_math.hpp.
tests/app/screenshot_test.cpp Hidden test that captures nmeasim::app::MainWindow for the documentation screenshots.
tests/app/settings_dialog_test.cpp Tests of nmeasim::app::SettingsDialog, the profile editor of the desktop application.
tests/app/theme_test.cpp Tests of nmeasim::app::theme::Theme and the themed parts of the desktop application.
tests/app/tile_cache_test.cpp Tests of the downloads of nmeasim::app::map::TileCache.
tests/cli/cli_test.cpp Tests of nmeasim, the command-line tool (src/cli/main.cpp), run as a separate process.
tests/cli/main.cpp Entry point of nmeasim_cli_tests, the Catch2 suite that runs the command-line tool.
tests/core/ais/ais_test.cpp Tests of the AIS bit packing, six-bit armouring and own-vessel messages.
tests/core/fixtures.hpp Shared fixtures of the core test suite: fixture file access, reference vessel states and a sentence helper.
tests/core/geo/geodesic_test.cpp Tests of the WGS 84 geodesic solutions of nmeasim/core/geo/geodesic.hpp.
tests/core/geo/route_test.cpp Tests of the leg geometry computed by nmeasim::core::geo::solve_leg().
tests/core/log/log_file_test.cpp Tests of the sentence log reader and writer of nmeasim/core/log/log_file.hpp.
tests/core/model/vessel_state_test.cpp Tests of the derived quantities of the vessel state in nmeasim/core/model/vessel_state.hpp.
tests/core/nmea0183/checksum_test.cpp Tests of the NMEA 0183 checksum functions of nmeasim/core/nmea0183/checksum.hpp.
tests/core/nmea0183/decoder_test.cpp Tests of the NMEA 0183 decoder of nmeasim/core/nmea0183/decoder.hpp.
tests/core/nmea0183/encoders_test.cpp Golden tests of the NMEA 0183 sentence encoders of nmeasim/core/nmea0183/encoders.hpp.
tests/core/nmea0183/fields_test.cpp Tests of the NMEA 0183 field formatters of nmeasim/core/nmea0183/fields.hpp.
tests/core/nmea0183/registry_test.cpp Tests of the sentence catalogue of nmeasim/core/nmea0183/registry.hpp.
tests/core/nmea0183/sentence_builder_test.cpp Tests of nmeasim::core::nmea0183::SentenceBuilder and nmeasim::core::nmea0183::fits_limit().
tests/core/nmea0183/tag_block_test.cpp Tests of the IEC 61162-450 TAG blocks of nmeasim/core/nmea0183/tag_block.hpp.
tests/core/physics/wind_test.cpp Tests of nmeasim::core::physics::apparent_wind, the wind triangle that turns the true wind into the wind felt on board.
tests/core/signalk/delta_test.cpp Tests of the Signal K encoders in nmeasim::core::signalk: path_values, encode_delta, encode_hello and their JSON and engine-identifier helpers.
tests/core/simulation/custom_sentence_test.cpp Tests of operator-defined sentences: nmeasim::core::simulation::frame_custom_sentence, nmeasim::core::simulation::validate_custom_sentence and their scheduling by nmeasim::core::simulation::SentenceScheduler::set_custom_sentences.
tests/core/simulation/delta_source_test.cpp Tests of nmeasim::core::simulation::DeltaSource, the endless source whose values drift around their seeds.
tests/core/simulation/replay_source_test.cpp Tests of nmeasim::core::simulation::ReplaySource, which sends the sentences of a recorded log again with their original timing, and of its use by nmeasim::core::simulation::Simulation.
tests/core/simulation/sentence_scheduler_test.cpp Tests of nmeasim::core::simulation::SentenceScheduler and nmeasim::core::simulation::next_due_after, which decide which NMEA 0183 sentences are due at a simulated time.
tests/core/simulation/simulation_test.cpp Tests of nmeasim::core::simulation::Simulation driving a nmeasim::core::simulation::DeltaSource and a sentence schedule on the simulated clock.
tests/core/simulation/track_source_test.cpp Tests of nmeasim::core::simulation::TrackSource, which sails a GPX or KML track leg by leg, and of the nmeasim::core::simulation::Source interface it shares with the delta source.
tests/core/time/iso8601_test.cpp Tests of nmeasim::core::time::parse_iso8601 and nmeasim::core::time::format_iso8601.
tests/core/track/gpx_test.cpp Tests of nmeasim::core::track::parse_gpx, the GPX 1.0 and 1.1 reader.
tests/core/track/kml_test.cpp Tests of nmeasim::core::track::parse_kml, the KML 2.2 track reader.
tests/core/track/track_test.cpp Tests of nmeasim::core::track::Track, nmeasim::core::track::to_string and the file loaders nmeasim::core::track::parse_track and nmeasim::core::track::load_track.
tests/core/version_test.cpp Tests of the version constants and nmeasim::core::version_description from the configured version.hpp.
tests/core/viewsync/viewsync_test.cpp Tests of nmeasim::core::viewsync::encode_packet, the ViewSync camera packet for Google Earth.
tests/io/event_loop.hpp A helper that lets the nmeasim::io tests wait for asynchronous Qt events.
tests/io/main.cpp The entry point of the nmeasim_io_tests suite, which runs Catch2 inside a Qt application.
tests/io/profile_test.cpp Tests of nmeasim::io::Profile: its JSON form, validation, schema migration and files.
tests/io/simulation_runner_test.cpp Tests of nmeasim::io::SimulationRunner, which runs a profile on a timer and feeds its outputs.
tests/io/transports_test.cpp Tests of the nmeasim::io transports and of network interface enumeration.