From c0ef93cb63cac6fd6552ba27bc9e5955f0115691 Mon Sep 17 00:00:00 2001 From: Bartek Kryza Date: Sun, 23 Jan 2022 11:37:51 +0100 Subject: [PATCH] Improved the t30001 test case --- tests/t30001/test_case.h | 28 ++++++++++++++++++++++++++++ tests/test_cases.h | 1 + 2 files changed, 29 insertions(+) diff --git a/tests/t30001/test_case.h b/tests/t30001/test_case.h index 7c5af2af..bdd7dfca 100644 --- a/tests/t30001/test_case.h +++ b/tests/t30001/test_case.h @@ -50,6 +50,34 @@ TEST_CASE("t30001", "[test-case][package]") REQUIRE_THAT(puml, Contains("component [AA]")); REQUIRE_THAT(puml, Contains("component [AAA]")); + REQUIRE_THAT(puml, Equals(R"(@startuml +' t30001 test package diagram +component [A] as C_0000000561 { +component [AA] as C_0000000562 { +component [AAA] as C_0000000563 { +} +component [BBB] as C_0000000564 { +} +} +component [BB] as C_0000000565 { +} +} + +component [B] as C_0000000566 { +component [AA] as C_0000000567 { +component [AAA] as C_0000000568 { +} +component [BBB] as C_0000000569 { +} +} +component [BB] as C_0000000570 { +} +} + +note right of C_0000000563: A AAA note... +@enduml +)")); + save_puml( "./" + config.output_directory + "/" + diagram->name + ".puml", puml); } diff --git a/tests/test_cases.h b/tests/test_cases.h index 14d7f6b7..df8241d6 100644 --- a/tests/test_cases.h +++ b/tests/test_cases.h @@ -41,6 +41,7 @@ using Catch::Matchers::Contains; using Catch::Matchers::EndsWith; +using Catch::Matchers::Equals; using Catch::Matchers::StartsWith; using Catch::Matchers::VectorContains; using clanguml::cx::compilation_database;