mirror of
https://github.com/whoahq/whoa.git
synced 2026-11-01 04:17:04 +03:00
feat(util): add CGameTime::GameTimeSetTime
Push / ${{ matrix.build.system_name }} / ${{ matrix.build.build_type }} / ${{ matrix.build.compiler_name }} (map[build_type:Release cc:cl compiler_name:MSVC cxx:cl os:windows-latest system_name:Windows test_path:WhoaTest]) (push) Waiting to run
Push / ${{ matrix.build.system_name }} / ${{ matrix.build.build_type }} / ${{ matrix.build.compiler_name }} (map[build_type:Release cc:clang compiler_name:Clang cxx:clang++ os:macos-latest system_name:macOS test_path:WhoaTest]) (push) Waiting to run
Push / ${{ matrix.build.system_name }} / ${{ matrix.build.build_type }} / ${{ matrix.build.compiler_name }} (map[build_type:Release cc:gcc compiler_name:GCC cxx:g++ os:ubuntu-latest system_name:Linux test_path:WhoaTest]) (push) Waiting to run
Push / ${{ matrix.build.system_name }} / ${{ matrix.build.build_type }} / ${{ matrix.build.compiler_name }} (map[build_type:Release cc:cl compiler_name:MSVC cxx:cl os:windows-latest system_name:Windows test_path:WhoaTest]) (push) Waiting to run
Push / ${{ matrix.build.system_name }} / ${{ matrix.build.build_type }} / ${{ matrix.build.compiler_name }} (map[build_type:Release cc:clang compiler_name:Clang cxx:clang++ os:macos-latest system_name:macOS test_path:WhoaTest]) (push) Waiting to run
Push / ${{ matrix.build.system_name }} / ${{ matrix.build.build_type }} / ${{ matrix.build.compiler_name }} (map[build_type:Release cc:gcc compiler_name:GCC cxx:g++ os:ubuntu-latest system_name:Linux test_path:WhoaTest]) (push) Waiting to run
This commit is contained in:
3 files changed
+64
-9
No files matched your search
@@ -16,13 +16,24 @@ TEST_CASE("CGameTime::CGameTime", "[util]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("CGameTime::TickMinute", "[util]") {
|
||||
SECTION("ticks minute correctly") {
|
||||
CGameTime time;
|
||||
time.SetHourAndMinutes(0, 0);
|
||||
time.TickMinute();
|
||||
TEST_CASE("CGameTime::GameTimeSetTime", "[util]") {
|
||||
SECTION("sets game time correctly") {
|
||||
WowTime time;
|
||||
time.m_minute = 18;
|
||||
time.m_hour = 11;
|
||||
time.m_weekday = 3;
|
||||
time.m_monthday = 27;
|
||||
time.m_month = 0;
|
||||
time.m_year = 26;
|
||||
|
||||
CHECK(time.m_hour == 0);
|
||||
CHECK(time.m_minute == 1);
|
||||
CGameTime gameTime;
|
||||
gameTime.GameTimeSetTime(time, true);
|
||||
|
||||
CHECK(gameTime.m_minute == 18);
|
||||
CHECK(gameTime.m_hour == 11);
|
||||
CHECK(gameTime.m_weekday == 3);
|
||||
CHECK(gameTime.m_monthday == 27);
|
||||
CHECK(gameTime.m_month == 0);
|
||||
CHECK(gameTime.m_year == 26);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user