summaryrefslogtreecommitdiffstats
path: root/tests/bytes.c
blob: 2d6f95bf3c68e1a62fa7969b1002ff49f5716765 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
#include "test.h"
#include <lisiblestd/bytes.h>

void t_float_from_bytes_le(void) {
  const u8 bytes[4] = {154, 153, 137, 64};
  float number = float_from_bytes_le(bytes);
  T_ASSERT_FLOAT_EQ(number, 4.3, 0.01);
}

TEST_SUITE(TEST(t_float_from_bytes_le))
Go back to lisible.xyz