Lines Matching refs:float_ctrl

20 cbor_item_t* float_ctrl;  variable
28 float_ctrl = cbor_load(float2_data, 3, &res); in test_float2()
29 assert_true(cbor_isa_float_ctrl(float_ctrl)); in test_float2()
30 assert_true(cbor_is_float(float_ctrl)); in test_float2()
31 assert_true(cbor_float_get_width(float_ctrl) == CBOR_FLOAT_16); in test_float2()
32 assert_true(cbor_float_get_float2(float_ctrl) == 65504.0F); in test_float2()
33 assert_float_equal(cbor_float_get_float(float_ctrl), 65504.0F, eps); in test_float2()
34 cbor_decref(&float_ctrl); in test_float2()
35 assert_null(float_ctrl); in test_float2()
41 float_ctrl = cbor_load(float4_data, 5, &res); in test_float4()
42 assert_true(cbor_isa_float_ctrl(float_ctrl)); in test_float4()
43 assert_true(cbor_is_float(float_ctrl)); in test_float4()
44 assert_true(cbor_float_get_width(float_ctrl) == CBOR_FLOAT_32); in test_float4()
45 assert_true(cbor_float_get_float4(float_ctrl) == 100000.0F); in test_float4()
46 assert_float_equal(cbor_float_get_float(float_ctrl), 100000.0F, eps); in test_float4()
47 cbor_decref(&float_ctrl); in test_float4()
48 assert_null(float_ctrl); in test_float4()
55 float_ctrl = cbor_load(float8_data, 9, &res); in test_float8()
56 assert_true(cbor_isa_float_ctrl(float_ctrl)); in test_float8()
57 assert_true(cbor_is_float(float_ctrl)); in test_float8()
58 assert_true(cbor_float_get_width(float_ctrl) == CBOR_FLOAT_64); in test_float8()
60 assert_true(cbor_float_get_float8(float_ctrl) == (double)1.0e+300); in test_float8()
62 assert_true(fabs(cbor_float_get_float(float_ctrl) - (double)1.0e+300) < eps); in test_float8()
63 cbor_decref(&float_ctrl); in test_float8()
64 assert_null(float_ctrl); in test_float8()
70 float_ctrl = cbor_load(null_data, 1, &res); in test_null()
71 assert_true(cbor_isa_float_ctrl(float_ctrl)); in test_null()
72 assert_true(cbor_float_ctrl_is_ctrl(float_ctrl)); in test_null()
73 assert_true(cbor_float_get_width(float_ctrl) == CBOR_FLOAT_0); in test_null()
74 assert_true(cbor_is_null(float_ctrl)); in test_null()
75 cbor_decref(&float_ctrl); in test_null()
76 assert_null(float_ctrl); in test_null()
82 float_ctrl = cbor_load(undef_data, 1, &res); in test_undef()
83 assert_true(cbor_isa_float_ctrl(float_ctrl)); in test_undef()
84 assert_true(cbor_float_ctrl_is_ctrl(float_ctrl)); in test_undef()
85 assert_true(cbor_float_get_width(float_ctrl) == CBOR_FLOAT_0); in test_undef()
86 assert_true(cbor_is_undef(float_ctrl)); in test_undef()
87 cbor_decref(&float_ctrl); in test_undef()
88 assert_null(float_ctrl); in test_undef()
95 float_ctrl = cbor_load(bool_data, 1, &res); in test_bool()
96 assert_true(cbor_isa_float_ctrl(float_ctrl)); in test_bool()
97 assert_true(cbor_float_ctrl_is_ctrl(float_ctrl)); in test_bool()
98 assert_true(cbor_float_get_width(float_ctrl) == CBOR_FLOAT_0); in test_bool()
99 assert_true(cbor_is_bool(float_ctrl)); in test_bool()
100 assert_false(cbor_get_bool(float_ctrl)); in test_bool()
101 cbor_set_bool(float_ctrl, true); in test_bool()
102 assert_true(cbor_get_bool(float_ctrl)); in test_bool()
103 assert_true(isnan(cbor_float_get_float(float_ctrl))); in test_bool()
104 cbor_decref(&float_ctrl); in test_bool()
105 assert_null(float_ctrl); in test_bool()
107 float_ctrl = cbor_load(bool_data + 1, 1, &res); in test_bool()
108 assert_true(cbor_isa_float_ctrl(float_ctrl)); in test_bool()
109 assert_true(cbor_float_ctrl_is_ctrl(float_ctrl)); in test_bool()
110 assert_true(cbor_float_get_width(float_ctrl) == CBOR_FLOAT_0); in test_bool()
111 assert_true(cbor_is_bool(float_ctrl)); in test_bool()
112 assert_true(cbor_get_bool(float_ctrl)); in test_bool()
113 cbor_set_bool(float_ctrl, false); in test_bool()
114 assert_false(cbor_get_bool(float_ctrl)); in test_bool()
115 assert_true(isnan(cbor_float_get_float(float_ctrl))); in test_bool()
116 cbor_decref(&float_ctrl); in test_bool()
117 assert_null(float_ctrl); in test_bool()
137 float_ctrl = cbor_build_float4(3.14f); in test_ctrl_on_float()
138 assert_non_null(float_ctrl); in test_ctrl_on_float()
139 assert_true(cbor_is_float(float_ctrl)); in test_ctrl_on_float()
140 assert_false(cbor_float_ctrl_is_ctrl(float_ctrl)); in test_ctrl_on_float()
141 assert_false(cbor_is_null(float_ctrl)); in test_ctrl_on_float()
142 assert_false(cbor_is_undef(float_ctrl)); in test_ctrl_on_float()
143 assert_false(cbor_is_bool(float_ctrl)); in test_ctrl_on_float()
144 cbor_decref(&float_ctrl); in test_ctrl_on_float()
145 assert_null(float_ctrl); in test_ctrl_on_float()