profile_test.cpp¶
file tests/io/profile_test.cpp · Test suite
Tests of nmeasim::io::Profile: its JSON form, validation, schema migration and files.
Source tests/io/profile_test.cpp
Covers Profile::default_profile, the round trip through Profile::to_json and Profile::from_json for every setting and output type, the defaults that fill in missing keys, the rejection of invalid documents with a reason that names the offending key, the migration of schema versions 1 and 2 to the current version 3, Profile::save and Profile::load with relative paths and Profile::resolve_path, Profile::make_scheduler, and the string names of output types, simulation modes and encodings.
The profiles are built in code or saved to temporary directories; the file reads no fixture. The track and log paths it sets are never opened.
Test cases¶
18 test cases, in source order.
Summary¶
File-local enumerations
| Name | Description |
|---|---|
SimulationMode |
What drives the vessel, the simulation.mode key of a profile. |
File-local enumerations¶
SimulationMode¶
enum class SimulationMode
What drives the vessel, the simulation.mode key of a profile.
Each enumerator is written as the string given in its description; to_string and simulation_mode_from_string convert. In every mode the delta seed supplies the values the driving source does not.
Declared in tests/io/profile_test.cpp:33 · defined in src/io/include/nmeasim/io/profile/profile.hpp:206