summaryrefslogtreecommitdiffstats
path: root/xbmc/utils/test/TestAlarmClock.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'xbmc/utils/test/TestAlarmClock.cpp')
-rw-r--r--xbmc/utils/test/TestAlarmClock.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/xbmc/utils/test/TestAlarmClock.cpp b/xbmc/utils/test/TestAlarmClock.cpp
new file mode 100644
index 0000000..75ea84a
--- /dev/null
+++ b/xbmc/utils/test/TestAlarmClock.cpp
@@ -0,0 +1,25 @@
1/*
2 * Copyright (C) 2005-2018 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
7 */
8
9#include "utils/AlarmClock.h"
10
11#include <gtest/gtest.h>
12
13TEST(TestAlarmClock, General)
14{
15 CAlarmClock a;
16 EXPECT_FALSE(a.IsRunning());
17 EXPECT_FALSE(a.HasAlarm("test"));
18 a.Start("test", 100.f, "test");
19 EXPECT_TRUE(a.IsRunning());
20 EXPECT_TRUE(a.HasAlarm("test"));
21 EXPECT_FALSE(a.HasAlarm("test2"));
22 EXPECT_NE(0.f, a.GetRemaining("test"));
23 EXPECT_EQ(0.f, a.GetRemaining("test2"));
24 a.Stop("test");
25}