aboutsummaryrefslogtreecommitdiff
path: root/src/test.cpp
diff options
context:
space:
mode:
authorSan Jacobs2023-10-15 15:09:08 +0200
committerSan Jacobs2023-10-15 15:09:08 +0200
commit871436abc5a0a27bc9e70204edf19b27bfefab45 (patch)
treebb0ae5179c350e9eec3268a7eafd6a30156d2311 /src/test.cpp
parentdd258a4a2f8b850e069a1dedc84a5a400ec96d72 (diff)
downloadsatscalc-871436abc5a0a27bc9e70204edf19b27bfefab45.tar.gz
satscalc-871436abc5a0a27bc9e70204edf19b27bfefab45.tar.bz2
satscalc-871436abc5a0a27bc9e70204edf19b27bfefab45.zip
Removed some old stuff
Diffstat (limited to 'src/test.cpp')
-rw-r--r--src/test.cpp96
1 files changed, 0 insertions, 96 deletions
diff --git a/src/test.cpp b/src/test.cpp
deleted file mode 100644
index 0b97b4a..0000000
--- a/src/test.cpp
+++ /dev/null
@@ -1,96 +0,0 @@
-#include "test.h"
-#include "time.h"
-
-void test(){
- moment calltime{30, 8, 27, 11, 2010};
- moment wraptime{30, 16, 27, 11, 2010};
- timeblock workday{calltime, wraptime};
-
- std::cout << "\n\n --- TIME UNITS TEST ---\n\n";
- std::cout << "Calltime: " << timeprint(calltime) << std::endl;
- std::cout << "Wraptime: " << timeprint(wraptime) << std::endl;
-
- std::cout << "\nWorkday:\n";
- std::cout << timeprint(workday) << std::endl;
-
-
-
- std::cout << "\n\n --- TIME MATH TEST ---\n\n";
-
- std::cout << "Difference between calltime and wraptime:\n";
- std::cout << (calltime-wraptime) << std::endl;
- std::cout << "Other way around, should show same result:\n";
- std::cout << (calltime-wraptime) << std::endl;
- std::cout << "As method on workday:\n";
- std::cout << (workday.hourcount()) << std::endl;
-
- std::cout << "\nSplitting workday into workday and second_half...\n";
- moment splitpoint{0, 12, 27, 11, 2010};
- timeblock first_half{timesplit(workday, splitpoint)};
-
- std::cout << "\nSplitpoint: " << timeprint(splitpoint) << std::endl;
- std::cout << "\nfirst_half:\n";
- std::cout << timeprint(first_half) << std::endl;
- std::cout << "\nWorkday:\n";
- std::cout << timeprint(workday) << std::endl;
-
- std::cout << "\nSplitting second_half at erronious point...\n";
- moment erronious_splitpoint{0, 14, 27, 11, 2010};
- std::cout << timeprint(timesplit(first_half, erronious_splitpoint)) << "\n";
-
-
-
- std::cout << "\n\n --- TIME WINDING TEST ---\n\n";
-
- moment testtime{30, 8, 25, 2, 2012};
- std::cout << "Testtime: " << timeprint(testtime) << std::endl;
-
-
- std::cout << "\nForwarding 45 minutes...\n";
- wind(testtime, 45, 0, 0);
- std::cout << "Testtime: " << timeprint(testtime) << std::endl;
-
- std::cout << "\nRewinding 45 minutes...\n";
- wind(testtime, -45, 0, 0);
- std::cout << "Testtime: " << timeprint(testtime) << std::endl;
-
-
- std::cout << "\nForwarding 20 hours...\n";
- wind(testtime, 0, 20, 0);
- std::cout << "Testtime: " << timeprint(testtime) << std::endl;
-
- std::cout << "\nRewinding 20 hours...\n";
- wind(testtime, 0, -20, 0);
- std::cout << "Testtime: " << timeprint(testtime) << std::endl;
-
-
- std::cout << "\nForwarding 10 days...\n";
- wind(testtime, 0, 0, 10);
- std::cout << "Testtime: " << timeprint(testtime) << std::endl;
-
- std::cout << "\nRewinding 10 days...\n";
- wind(testtime, 0, 0, -10);
- std::cout << "Testtime: " << timeprint(testtime) << std::endl;
-
-
- std::cout << "\nForwarding 100 days...\n";
- wind(testtime, 0, 0, 100);
- std::cout << "Testtime: " << timeprint(testtime) << std::endl;
-
- std::cout << "\nRewinding 100 days...\n";
- wind(testtime, 0, 0, -100);
- std::cout << "Testtime: " << timeprint(testtime) << std::endl;
-
-
- std::cout << "\n\n --- HOLIDAY TEST ---\n\n";
- std::cout << "Easter 2022: " << timeprint(gaussEaster(2022)) << std::endl;
- std::cout << "Easter 2030: " << timeprint(gaussEaster(2030)) << std::endl;
- std::cout << "Easter 2057: " << timeprint(gaussEaster(2057)) << std::endl;
-
- std::cout << "\n\n --- TIME INPUT TEST ---\n\n";
-
- moment inputmoment = timeinput();
- std::cout << "Time reveived: " << timeprint(inputmoment) << std::endl;
- moment inputmoment2 = timeinput(inputmoment);
- std::cout << "Time reveived: " << timeprint(inputmoment2) << std::endl;
-}