()
| 193 | |
| 194 | |
| 195 | def test_float16_round_trip(): |
| 196 | fory = Fory(xlang=True, compatible=False, ref=False) |
| 197 | typeinfo = fory.type_resolver.get_type_info(pyfory.Float16) |
| 198 | assert isinstance(typeinfo.serializer, pyfory.Float16Serializer) |
| 199 | assert typeinfo.type_id == TypeId.FLOAT16 |
| 200 | decoded = ser_de(fory, _float16_from_bits(0x3C00)) |
| 201 | assert isinstance(decoded, float) |
| 202 | assert _float16_to_bits(decoded) == 0x3C00 |
| 203 | |
| 204 | |
| 205 | def test_bfloat16_round_trip(): |
nothing calls this directly
no test coverage detected