mirror of
https://github.com/JHUAPL/kami.git
synced 2026-01-09 14:58:02 -05:00
Fixed the unit tests a little bit
This commit is contained in:
@@ -4,12 +4,15 @@
|
||||
|
||||
cmake_minimum_required(VERSION 3.13.0 FATAL_ERROR)
|
||||
|
||||
find_package(spdlog)
|
||||
|
||||
create_test( NAME
|
||||
unit-kami-agentid
|
||||
SOURCES
|
||||
unit-kami-agentid.cpp
|
||||
PUBLIC_LINKED_TARGETS
|
||||
kami::kami
|
||||
spdlog::spdlog
|
||||
${COVERAGE_LIBS}
|
||||
COMMAND
|
||||
unit-kami-agentid
|
||||
@@ -22,6 +25,7 @@ create_test( NAME
|
||||
unit-kami-agent.cpp
|
||||
PUBLIC_LINKED_TARGETS
|
||||
kami::kami
|
||||
spdlog::spdlog
|
||||
${COVERAGE_LIBS}
|
||||
COMMAND
|
||||
unit-kami-agent
|
||||
|
||||
@@ -1,7 +1,34 @@
|
||||
#include <kami/agent.hpp>
|
||||
/*-
|
||||
* TODO FILEHEADER
|
||||
*/
|
||||
|
||||
int main() {
|
||||
kami::Agent agent;
|
||||
agent.step();
|
||||
return 0;
|
||||
#include <spdlog/spdlog.h>
|
||||
|
||||
#include <CLI/App.hpp>
|
||||
#include <CLI/Config.hpp>
|
||||
#include <CLI/Formatter.hpp>
|
||||
#include <kami/agent.hpp>
|
||||
#include <kami/config.hpp>
|
||||
|
||||
#include "spdlog/sinks/stdout_color_sinks.h"
|
||||
|
||||
using namespace kami;
|
||||
using namespace std;
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
string ident = "unit-kami-agent";
|
||||
CLI::App app{ident};
|
||||
auto console = spdlog::stdout_color_st(ident);
|
||||
bool debugFlag;
|
||||
|
||||
app.add_option("-d,--debug", debugFlag, "A help string");
|
||||
CLI11_PARSE(app, argc, argv);
|
||||
|
||||
if (debugFlag == true)
|
||||
console->set_level(spdlog::level::debug);
|
||||
|
||||
console->debug("Compiled with Kami/{}.{}.{}", KAMI_VERSION_MAJOR, KAMI_VERSION_MINOR, KAMI_VERSION_PATCH);
|
||||
|
||||
Agent testAgent;
|
||||
console->debug("Successfully created Agent with ID {}", testAgent.getAgentID().toString());
|
||||
}
|
||||
|
||||
@@ -1,5 +1,34 @@
|
||||
#include <kami/agent.hpp>
|
||||
/*-
|
||||
* TODO FILEHEADER
|
||||
*/
|
||||
|
||||
int main(void) {
|
||||
kami::AgentID agentid;
|
||||
#include <spdlog/spdlog.h>
|
||||
|
||||
#include <CLI/App.hpp>
|
||||
#include <CLI/Config.hpp>
|
||||
#include <CLI/Formatter.hpp>
|
||||
#include <kami/agent.hpp>
|
||||
#include <kami/config.hpp>
|
||||
|
||||
#include "spdlog/sinks/stdout_color_sinks.h"
|
||||
|
||||
using namespace kami;
|
||||
using namespace std;
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
string ident = "unit-kami-agentid";
|
||||
CLI::App app{ident};
|
||||
auto console = spdlog::stdout_color_st(ident);
|
||||
bool debugFlag;
|
||||
|
||||
app.add_option("-d,--debug", debugFlag, "A help string");
|
||||
CLI11_PARSE(app, argc, argv);
|
||||
|
||||
if (debugFlag == true)
|
||||
console->set_level(spdlog::level::debug);
|
||||
|
||||
console->debug("Compiled with Kami/{}.{}.{}", KAMI_VERSION_MAJOR, KAMI_VERSION_MINOR, KAMI_VERSION_PATCH);
|
||||
|
||||
AgentID testAgentID;
|
||||
console->debug("Successfully created AgentID with ID {}", testAgentID.toString());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user