LCOV - code coverage report
Current view: top level - server - main.cpp (source / functions) Hit Total Coverage
Test: code-coverage.info.cleaned Lines: 0 23 0.0 %
Date: 2023-01-28 00:08:57 Functions: 0 1 0.0 %

          Line data    Source code
       1             : #include <iostream>
       2             : #include <server.hpp>
       3             : #include <shared.hpp>
       4             : 
       5             : #define SERVER_VERSION "0.0.1"
       6             : 
       7           0 : int main(int argc,char* argv[])
       8             : {
       9           0 :     std::string arg;
      10           0 :     if (argc != 2) {
      11           0 :         std::cout << "Unkown command, use -h for help." << std::endl;
      12             :     }
      13             :     else {
      14           0 :         arg = argv[1];
      15           0 :         if (!arg.compare("-h")) {
      16           0 :             std::cout << "Usage: " << argv[0] << " [command]" << std::endl;
      17           0 :             std::cout << "Commands:" << std::endl;
      18           0 :             std::cout << "  -h\t\t\tShow this help" << std::endl;
      19           0 :             std::cout << "  -v\t\t\tShow version" << std::endl;
      20           0 :             std::cout << "  -s\t\t\tStart server" << std::endl;
      21           0 :             std::cout << "  -hello\t\t\tPrint hello world" << std::endl;
      22             :         }
      23           0 :         else if (!arg.compare("-v")) {
      24           0 :             std::cout << "Version: " << SERVER_VERSION << std::endl;
      25             :         }
      26           0 :         else if (!arg.compare("-s")) {
      27           0 :             server::Server server;
      28           0 :             server.start();
      29           0 :         }
      30           0 :         else if (!arg.compare("-hello")) {
      31           0 :             std::cout << "Hello world" << std::endl;
      32             :         }
      33             :         else {
      34           0 :             std::cout << "Unkown command, use -h for help." << std::endl;
      35             :         }
      36             :     }
      37             : 
      38           0 :     return 0;
      39           0 : }

Generated by: LCOV version 1.14