/
dieoska
/
ddnet
Обзор
Документация
Войти
/
dieoska
/
ddnet
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
src/test/mapitems_test.cpp
26 строк
556 B
ChillerDragon
Add test suffix
22 ноя 2025, 16:34
22 ноя 2025, 16:34
7b943a4
Код
Авторство
О чём код?
#include <game/mapitems.h> #include <gtest/gtest-printers.h> #include <gtest/gtest.h> namespace testing::internal { template<> class UniversalPrinter<CFixedTime> { public: static void Print(const CFixedTime &FixedTime, std::ostream *pOutputStream) { *pOutputStream << "CFixedTime with internal value " << FixedTime.GetInternal(); } }; } TEST(Mapitems, FixedTimeRoundtrip) { for(CFixedTime Fixed = CFixedTime(0); Fixed < CFixedTime(1000000); Fixed += CFixedTime(1)) { ASSERT_EQ(Fixed, CFixedTime::FromSeconds(Fixed.AsSeconds())); } }