Website Summary Files Commits Branches @commit @diff @stats
path: root / tests / Test_DateTime.cpp
diff options
context:
space:
mode:
1 files changed, 14 insertions, 1 deletions
-rw-r--r--tests/Test_DateTime.cpp15
diff --git a/tests/Test_DateTime.cpp b/tests/Test_DateTime.cpp
index efffb4e..189e988 100644
--- a/tests/Test_DateTime.cpp
+++ b/tests/Test_DateTime.cpp
@@ -1,5 +1,18 @@
#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN
#include "../doctest/doctest/doctest.h"
-
#include "../src/DateTime/DateTime.h"
+TEST_SUITE_BEGIN("ClassDateTime");
+
+TEST_SUITE("Constructors") {
+ TEST_CASE("Ctor_SavesValues_WhenGivenCorrectOnes") {
+ DateTime dt(2, 49, 4, 12, 2022);
+ CHECK_EQ(dt.get_hour(), 2);
+ CHECK_EQ(dt.get_minute(), 49);
+ CHECK_EQ(dt.get_day(), 4);
+ CHECK_EQ(dt.get_month(), 12);
+ CHECK_EQ(dt.get_year(), 2022);
+ }
+}
+
+TEST_SUITE_END();