Fixed logging levels

This commit is contained in:
Bartek Kryza
2021-03-14 23:27:53 +01:00
parent c5beac2bd2
commit 5a5652a443
19 changed files with 57 additions and 76 deletions

View File

@@ -16,10 +16,8 @@
* limitations under the License.
*/
TEST_CASE("Test t00002", "[unit-test]")
TEST_CASE("t00002", "[unit-test]")
{
spdlog::set_level(spdlog::level::debug);
auto [config, db] = load_config("t00002");
auto diagram = config.diagrams["t00002_class"];

View File

@@ -16,10 +16,8 @@
* limitations under the License.
*/
TEST_CASE("Test t00003", "[unit-test]")
TEST_CASE("t00003", "[unit-test]")
{
spdlog::set_level(spdlog::level::debug);
auto [config, db] = load_config("t00003");
auto diagram = config.diagrams["t00003_class"];

View File

@@ -16,10 +16,8 @@
* limitations under the License.
*/
TEST_CASE("Test t00004", "[unit-test]")
TEST_CASE("t00004", "[unit-test]")
{
spdlog::set_level(spdlog::level::debug);
auto [config, db] = load_config("t00004");
auto diagram = config.diagrams["t00004_class"];

View File

@@ -16,10 +16,8 @@
* limitations under the License.
*/
TEST_CASE("Test t00005", "[unit-test]")
TEST_CASE("t00005", "[unit-test]")
{
spdlog::set_level(spdlog::level::debug);
auto [config, db] = load_config("t00005");
auto diagram = config.diagrams["t00005_class"];

View File

@@ -16,10 +16,8 @@
* limitations under the License.
*/
TEST_CASE("Test t00006", "[unit-test]")
TEST_CASE("t00006", "[unit-test]")
{
spdlog::set_level(spdlog::level::debug);
auto [config, db] = load_config("t00006");
auto diagram = config.diagrams["t00006_class"];

View File

@@ -16,10 +16,8 @@
* limitations under the License.
*/
TEST_CASE("Test t00007", "[unit-test]")
TEST_CASE("t00007", "[unit-test]")
{
spdlog::set_level(spdlog::level::debug);
auto [config, db] = load_config("t00007");
auto diagram = config.diagrams["t00007_class"];

View File

@@ -16,10 +16,8 @@
* limitations under the License.
*/
TEST_CASE("Test t00008", "[unit-test]")
TEST_CASE("t00008", "[unit-test]")
{
spdlog::set_level(spdlog::level::debug);
auto [config, db] = load_config("t00008");
auto diagram = config.diagrams["t00008_class"];

View File

@@ -16,10 +16,8 @@
* limitations under the License.
*/
TEST_CASE("Test t00009", "[unit-test]")
TEST_CASE("t00009", "[unit-test]")
{
spdlog::set_level(spdlog::level::debug);
auto [config, db] = load_config("t00009");
auto diagram = config.diagrams["t00009_class"];

View File

@@ -16,10 +16,8 @@
* limitations under the License.
*/
TEST_CASE("Test t00010", "[unit-test]")
TEST_CASE("t00010", "[unit-test]")
{
spdlog::set_level(spdlog::level::debug);
auto [config, db] = load_config("t00010");
auto diagram = config.diagrams["t00010_class"];

View File

@@ -16,10 +16,8 @@
* limitations under the License.
*/
TEST_CASE("Test t00011", "[unit-test]")
TEST_CASE("t00011", "[unit-test]")
{
spdlog::set_level(spdlog::level::debug);
auto [config, db] = load_config("t00011");
auto diagram = config.diagrams["t00011_class"];

View File

@@ -16,10 +16,8 @@
* limitations under the License.
*/
TEST_CASE("Test t00012", "[unit-test]")
TEST_CASE("t00012", "[unit-test]")
{
spdlog::set_level(spdlog::level::debug);
auto [config, db] = load_config("t00012");
auto diagram = config.diagrams["t00012_class"];

View File

@@ -16,10 +16,8 @@
* limitations under the License.
*/
TEST_CASE("Test t20001", "[unit-test]")
TEST_CASE("t20001", "[unit-test]")
{
spdlog::set_level(spdlog::level::debug);
auto [config, db] = load_config("t20001");
auto diagram = config.diagrams["t20001_sequence"];

View File

@@ -16,10 +16,8 @@
* limitations under the License.
*/
TEST_CASE("Test t90000", "[unit-test]")
TEST_CASE("t90000", "[unit-test]")
{
spdlog::set_level(spdlog::level::debug);
auto [config, db] = load_config("t90000");
auto diagram = config.diagrams["t90000_class"];

View File

@@ -15,10 +15,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#define CATCH_CONFIG_MAIN
//#define CATCH_CONFIG_MAIN
#include "test_cases.h"
#include <spdlog/spdlog.h>
std::pair<clanguml::config::config, compilation_database> load_config(
const std::string &test_name)
{
@@ -137,3 +139,15 @@ using clanguml::test::matchers::Static;
// Other tests (e.g. configuration file)
//
#include "t90000/test_case.h"
//
// Main test function
//
int main(int argc, char *argv[])
{
spdlog::default_logger_raw()->set_level(spdlog::level::debug);
int result = Catch::Session().run(argc, argv);
return result;
}

View File

@@ -17,6 +17,8 @@
*/
#pragma once
#define SPDLOG_ACTIVE_LEVEL SPDLOG_LEVEL_DEBUG
#include "config/config.h"
#include "cx/compilation_database.h"
#include "puml/class_diagram_generator.h"
@@ -26,6 +28,8 @@
#include "uml/sequence_diagram_visitor.h"
#include "util/util.h"
#define CATCH_CONFIG_RUNNER
#include "catch.h"
#include <complex>