Tests added

This commit is contained in:
2018-09-05 17:34:41 +02:00
parent 0a3668032d
commit 1b6a782d04
5 changed files with 58 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
#include "library.h"
#include <chrono>
#include <ctime>
#include <iostream>
void c0ding::version() {
time_t now = std::chrono::system_clock::to_time_t(std::chrono::system_clock::now());
tm* localNow = std::localtime(&now);
std::string version = VERSION;
std::string year = "2015 - " + std::to_string(localNow->tm_year);
std::cout << "--- c0ding library ---\n"
<< "Version " << version << "\n"
<< "(c) c0ding-Team " << year << std::endl;
}
+17
View File
@@ -0,0 +1,17 @@
#ifndef C0DING_LIBRARY_H
#define C0DING_LIBRARY_H
#define VERSION "1.0.0";
#include <string>
#include "network/network.h"
namespace c0ding {
void version();
}
int main(int argc, char** argv) {
c0ding::network::test();
}
#endif
+7
View File
@@ -0,0 +1,7 @@
#include "network.h"
#include <iostream>
void c0ding::network::test() {
std::cout << "test" << std::endl;
}
+10
View File
@@ -0,0 +1,10 @@
#ifndef C0DING_NETWORK_H
#define C0DING_NETWORK_H
namespace c0ding {
namespace network {
void test();
}
}
#endif //C0DING_NETWORK_H