/* Parameter(Test) - verify generic parameter values Copyright (C) 2026, Hermann Vosseler   **Lumiera** is free software; you can redistribute it and/or modify it   under the terms of the GNU General Public License as published by the   Free Software Foundation; either version 2 of the License, or (at your   option) any later version. See the file COPYING for further details. * *****************************************************************/ /** @file parameter-test.cpp ** unit test \ref Parameter_test */ #include "test/run.hpp" //#include "test/test-helper.hpp" #include "lib/par/parameter.hpp" #include "test/diagnostic-output.hpp"/////////////TODO //#include //#include //#include //using std::string; //using std::vector; //using std::swap; namespace lib { namespace par { namespace test{ // using lumiera::error::LUMIERA_ERROR_LOGIC; namespace {//Test fixture.... }//(End)Test fixture /**************************************************************************//** * @test cover properties of generic parameter containers. */ class Parameter_test : public Test { virtual void run (Arg) { simpleUsage(); verify_Builder(); verify_Identity(); verify_ParamType(); verify_Automation(); } void simpleUsage() { CHECK (sizeof(Parameter) <= 4 * sizeof(void*)); CHECK (BASETYPE_MAX_SIZ <= sizeof(ValStorage)); Parameter par = Parameter::forType().build(); CHECK (0 == par.getVal()); par.setVal (12.3); CHECK (12 == par.getVal()); CHECK (12u == par.getVal()); CHECK (12.0 == par.getVal()); CHECK (true == par.getVal()); } /** @test * @todo WIP 9/26 🔁 define ⟶ implement */ void verify_Builder() { } /** @test * @todo WIP 9/26 🔁 define ⟶ implement */ void verify_Identity() { } /** @test * @todo WIP 9/26 🔁 define ⟶ implement */ void verify_ParamType() { } /** @test * @todo WIP 9/26 🔁 define ⟶ implement */ void verify_Automation() { } }; /** Register this test class... */ LAUNCHER (Parameter_test, "unit lib"); }}} // namespace lib::par::test