summaryrefslogtreecommitdiffstats
path: root/tests/bytes.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tests/bytes.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/bytes.c b/tests/bytes.c
new file mode 100644
index 0000000..2d6f95b
--- /dev/null
+++ b/tests/bytes.c
@@ -0,0 +1,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