Initial refactor of namespace handling

This commit is contained in:
Bartek Kryza
2022-03-04 23:38:18 +01:00
parent bee20e7f26
commit a67b459437
40 changed files with 620 additions and 201 deletions

View File

@@ -35,19 +35,19 @@ TEST_CASE("Test split", "[unit-test]")
CHECK(split("std::vector::detail::", "::") == C{"std", "vector", "detail"});
}
TEST_CASE("Test ns_relative", "[unit-test]")
{
using namespace clanguml::util;
CHECK(ns_relative({}, "std::vector") == "std::vector");
CHECK(ns_relative({"std"}, "std::vector") == "vector");
CHECK(ns_relative({"std"}, "const std::vector&") == "const vector&");
CHECK(ns_relative({"std", "clanguml::t0"},
"static const std::vector<clanguml::t0::a>&") ==
"static const vector<a>&");
CHECK(ns_relative({"clanguml::t0"}, "clanguml::t0") == "t0");
}
//
// TEST_CASE("Test ns_relative", "[unit-test]")
//{
// using namespace clanguml::util;
//
// CHECK(ns_relative({}, "std::vector") == "std::vector");
// CHECK(ns_relative({"std"}, "std::vector") == "vector");
// CHECK(ns_relative({"std"}, "const std::vector&") == "const vector&");
// CHECK(ns_relative({"std", "clanguml::t0"},
// "static const std::vector<clanguml::t0::a>&") ==
// "static const vector<a>&");
// CHECK(ns_relative({"clanguml::t0"}, "clanguml::t0") == "t0");
//}
TEST_CASE("Test abbreviate", "[unit-test]")
{