File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -25,3 +25,24 @@ TEST(util_tests, threads_control_check_openmp_disabled_valgrind) {
2525 // Check Result
2626 ASSERT_EQ (ppc_num_threads, omp_num_threads);
2727}
28+
29+ namespace test_ns {
30+ struct TypeInNamespace {};
31+ } // namespace test_ns
32+
33+ struct PlainType {};
34+
35+ TEST (GetNamespaceTest, ReturnsExpectedNamespace) {
36+ constexpr auto kNs = ppc::util::GetNamespace<test_ns::TypeInNamespace>();
37+ EXPECT_EQ (kNs , " test_ns" );
38+ }
39+
40+ TEST (GetNamespaceTest, ReturnsEmptyIfNoNamespace_PrimitiveType) {
41+ constexpr auto kNs = ppc::util::GetNamespace<int >();
42+ EXPECT_EQ (kNs , " " );
43+ }
44+
45+ TEST (GetNamespaceTest, ReturnsEmptyIfNoNamespace_PlainStruct) {
46+ constexpr auto kNs = ppc::util::GetNamespace<PlainType>();
47+ EXPECT_EQ (kNs , " " );
48+ }
You can’t perform that action at this time.
0 commit comments