MCPcopy Create free account
hub / github.com/boostorg/json / testCtors

Method testCtors

test/value_ref.cpp:44–119  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42 std::initializer_list<value_ref>;
43
44 void
45 testCtors()
46 {
47 // scalars
48 (void)value_ref((signed char)1);
49 (void)value_ref((short)1);
50 (void)value_ref((int)1);
51 (void)value_ref((long)1);
52 (void)value_ref((long long)1);
53 (void)value_ref((unsigned char)1);
54 (void)value_ref((unsigned short)1);
55 (void)value_ref((unsigned int)1);
56 (void)value_ref((unsigned long)1);
57 (void)value_ref((unsigned long long)1);
58 (void)value_ref((float)1.);
59 (void)value_ref((double)1.);
60 (void)value_ref(true);
61 (void)value_ref(nullptr);
62
63 // string_view, char const*
64 (void)(value_ref)string_view("test");
65 (void)(value_ref)("test");
66
67 // init-list
68 value_ref({1,2,3,4,5});
69
70 // value
71 (value_ref)value();
72 {
73 value jv;
74 (value_ref)jv;
75 }
76 {
77 value const jv;
78 (value_ref)jv;
79 }
80
81 // object
82 (value_ref)object();
83 {
84 object o;
85 (value_ref)o;
86 }
87 {
88 object const o{};
89 (value_ref)o;
90 }
91
92 // array
93 (value_ref)object();
94 {
95 array a;
96 (value_ref)a;
97 }
98 {
99 array const a{};
100 (value_ref)a;
101 }

Callers

nothing calls this directly

Calls 5

string_viewClass · 0.85
valueClass · 0.70
value_refClass · 0.50
objectClass · 0.50
stringClass · 0.50

Tested by

no test coverage detected