From 32be16ef980c03fd896d62a677968af57df832c6 Mon Sep 17 00:00:00 2001 From: Daniel Krebs Date: Wed, 31 Jan 2018 11:21:02 +0100 Subject: [PATCH] tests/graph: move criterion setup to from main.cpp to graph.cpp --- fpga/tests/graph.cpp | 12 ++++++++++++ fpga/tests/main.cpp | 11 ----------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/fpga/tests/graph.cpp b/fpga/tests/graph.cpp index 1de58e9b8..9b9366f27 100644 --- a/fpga/tests/graph.cpp +++ b/fpga/tests/graph.cpp @@ -4,6 +4,18 @@ #include #include +static void init_graph() +{ + spdlog::set_pattern("[%T] [%l] [%n] %v"); + spdlog::set_level(spdlog::level::debug); +} + +TestSuite(graph, + .init = init_graph, + .description = "Graph library" +); + + Test(graph, basic, .description = "DirectedGraph") { auto logger = loggerGetOrCreate("unittest:basic"); diff --git a/fpga/tests/main.cpp b/fpga/tests/main.cpp index b5fa06f8b..9a3244380 100644 --- a/fpga/tests/main.cpp +++ b/fpga/tests/main.cpp @@ -105,14 +105,3 @@ TestSuite(fpga, .fini = fini, .description = "VILLASfpga" ); - -static void init_graph() -{ - spdlog::set_pattern("[%T] [%l] [%n] %v"); - spdlog::set_level(spdlog::level::debug); -} - -TestSuite(graph, - .init = init_graph, - .description = "Graph library" -);