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_is_null(float_ctrl)); in test_null()
73 cbor_decref(&float_ctrl); in test_null()
74 assert_null(float_ctrl); in test_null()
80 float_ctrl = cbor_load(undef_data, 1, &res); in test_undef()
81 assert_true(cbor_isa_float_ctrl(float_ctrl)); in test_undef()
82 assert_true(cbor_is_undef(float_ctrl)); in test_undef()
83 cbor_decref(&float_ctrl); in test_undef()
84 assert_null(float_ctrl); in test_undef()
91 float_ctrl = cbor_load(bool_data, 1, &res); in test_bool()
92 assert_true(cbor_isa_float_ctrl(float_ctrl)); in test_bool()
93 assert_true(cbor_is_bool(float_ctrl)); in test_bool()
94 assert_false(cbor_get_bool(float_ctrl)); in test_bool()
95 cbor_set_bool(float_ctrl, true); in test_bool()
96 assert_true(cbor_get_bool(float_ctrl)); in test_bool()
97 assert_true(isnan(cbor_float_get_float(float_ctrl))); in test_bool()
98 cbor_decref(&float_ctrl); in test_bool()
99 assert_null(float_ctrl); in test_bool()
101 float_ctrl = cbor_load(bool_data + 1, 1, &res); in test_bool()
102 assert_true(cbor_isa_float_ctrl(float_ctrl)); in test_bool()
103 assert_true(cbor_is_bool(float_ctrl)); in test_bool()
104 assert_true(cbor_get_bool(float_ctrl)); in test_bool()
105 cbor_set_bool(float_ctrl, false); in test_bool()
106 assert_false(cbor_get_bool(float_ctrl)); in test_bool()
107 assert_true(isnan(cbor_float_get_float(float_ctrl))); in test_bool()
108 cbor_decref(&float_ctrl); in test_bool()
109 assert_null(float_ctrl); in test_bool()