MCPcopy Create free account
hub / github.com/apache/fory / TEST

Function TEST

cpp/fory/meta/field_test.cc:34–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32namespace T = fory::T;
33
34TEST(FieldTraits, CarrierTraits) {
35 static_assert(!detail::is_shared_ptr_v<int>);
36 static_assert(detail::is_shared_ptr_v<std::shared_ptr<int>>);
37 static_assert(!detail::is_unique_ptr_v<int>);
38 static_assert(detail::is_unique_ptr_v<std::unique_ptr<int>>);
39 static_assert(!detail::is_optional_v<int>);
40 static_assert(detail::is_optional_v<std::optional<int>>);
41 static_assert(!detail::is_smart_ptr_v<std::optional<int>>);
42 static_assert(detail::is_smart_ptr_v<std::shared_ptr<int>>);
43 static_assert(detail::is_smart_ptr_v<std::unique_ptr<int>>);
44}
45
46TEST(FieldBuilder, ScalarEncodingSpec) {
47 constexpr auto fixed = fory::F(7).fixed();

Callers

nothing calls this directly

Calls 10

varintFunction · 0.85
taggedFunction · 0.85
FFunction · 0.70
uint64Function · 0.70
listFunction · 0.70
valueMethod · 0.65
fixedMethod · 0.45
taggedMethod · 0.45
mapMethod · 0.45
keyMethod · 0.45

Tested by

no test coverage detected