/** * \file main.cpp * \project EFC_PlatformC28x * \Author leonidTitov * \date 10 мая 2024 г. * */ #define _DUAL_HEADERS // #include "UnitTestInterface.hh" #include "AsyncRunnerInterface.hh" #include "AsyncRunner.hh" struct BaseResult : public umlib::tests::TestResult { void assert_false( bool, std::string description ); void assert_true( bool, std::string description ); }; #include #include void init() { Interrupt_disableGlobal(); Interrupt_disablePIE(); Interrupt_initModule(); Interrupt_initVectorTable(); Interrupt_enablePIE(); Interrupt_enableGlobal(); EINT; ERTM; } #include #include #include #include // SDFM #include // /** * \function run() */ int run() { BaseResult result; umlib::tests::AsyncRunnerTest async_runner_test( platform::AsyncRunner::getInstance() ); async_runner_test.run(result); umlib::tests::AtomicFlagTest atomic_flag_tests( platform::AsyncRunner::getInstance() ); atomic_flag_tests.run(result); // Sdfm_tests umlib::tests::SdfmTest Sdfm_tests; Sdfm_tests.run(result); return 0; } #include /*! * \brief Вся инициализация должна быть произведена в скрипте отладчика. * \function main() * */ int main(int argc, char * argv[]) { printf("\n"); printf("Run PlatformC28x Tests:\n"); init(); return run(); } void BaseResult::assert_false( bool check, std::string description ) { printf("\"%s\": %s\n", description.c_str(), check ? "False" : "True"); } void BaseResult::assert_true( bool check, std::string description ) { printf("\"%s\": %s\n", description.c_str(), check ? "True" : "False"); }