File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed
Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change 1+ #include < gtest/gtest.h>
2+
3+ import mcpplibs.primitive;
4+
5+ namespace {} // namespace
6+
7+ using namespace mcpplibs ::primitive;
8+
9+ TEST (PolicyTraitsTest, BuiltinPoliciesHaveCategories) {
10+ using namespace policy ;
11+
12+ EXPECT_TRUE ((policy::traits<policy::checked_value>::enabled));
13+ EXPECT_EQ (policy::traits<policy::checked_value>::kind,
14+ policy::category::value);
15+
16+ EXPECT_TRUE ((policy::traits<policy::relaxed_type>::enabled));
17+ EXPECT_EQ (policy::traits<policy::relaxed_type>::kind, policy::category::type);
18+
19+ EXPECT_TRUE ((policy::traits<policy::throw_error>::enabled));
20+ EXPECT_EQ (policy::traits<policy::throw_error>::kind, policy::category::error);
21+
22+ EXPECT_TRUE ((policy::traits<policy::single_thread>::enabled));
23+ EXPECT_EQ (policy::traits<policy::single_thread>::kind,
24+ policy::category::concurrency);
25+
26+ EXPECT_TRUE ((policy_type<policy::checked_value>));
27+ EXPECT_FALSE ((policy_type<int >));
28+
29+ EXPECT_TRUE ((std::is_same_v<policy::default_policies::value,
30+ policy::unchecked_value>));
31+ }
32+
33+ // Use the existing test runner main from other test translation unit.
You can’t perform that action at this time.
0 commit comments