Tests added
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
project(c0ding)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
|
||||
include(${CMAKE_CURRENT_SOURCE_DIR}/network/CMakeLists.txt)
|
||||
|
||||
add_library(c0ding SHARED library.cpp library.h)
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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
|
||||
@@ -0,0 +1,7 @@
|
||||
#include "network.h"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
void c0ding::network::test() {
|
||||
std::cout << "test" << std::endl;
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
#ifndef C0DING_NETWORK_H
|
||||
#define C0DING_NETWORK_H
|
||||
|
||||
namespace c0ding {
|
||||
namespace network {
|
||||
void test();
|
||||
}
|
||||
}
|
||||
|
||||
#endif //C0DING_NETWORK_H
|
||||
Reference in New Issue
Block a user