/
niceSOFT
/
cmake
Обзор
Документация
Войти
/
niceSOFT
/
cmake
Код
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
Help/guide/tutorial/Step11/TutorialProject/Tests/TestMathFunctions.cxx
22 строки
316 B
Vito Gamberini
Tutorial: Rewrite using conventions enabled by CMake 3.23
17 сен 2025, 18:57
17 сен 2025, 18:57
b2e3e3e
Код
Авторство
О чём код?
#include <MathFunctions.h> #include <SimpleTest.h> TEST("add") { REQUIRE(mathfunctions::OpAdd(2.0, 2.0) == 4.0); } TEST("sub") { REQUIRE(mathfunctions::OpSub(4.0, 2.0) == 2.0); } TEST("mul") { REQUIRE(mathfunctions::OpMul(5.0, 5.0) == 25.0); } TEST("sqrt") { REQUIRE(mathfunctions::sqrt(25.0) == 5.0); }