summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/bx/tests/readerwriter_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to '3rdparty/bx/tests/readerwriter_test.cpp')
-rw-r--r--3rdparty/bx/tests/readerwriter_test.cpp31
1 files changed, 31 insertions, 0 deletions
diff --git a/3rdparty/bx/tests/readerwriter_test.cpp b/3rdparty/bx/tests/readerwriter_test.cpp
new file mode 100644
index 00000000000..53fa3f80cd3
--- /dev/null
+++ b/3rdparty/bx/tests/readerwriter_test.cpp
@@ -0,0 +1,31 @@
+/*
+ * Copyright 2010-2019 Branimir Karadzic. All rights reserved.
+ * License: https://github.com/bkaradzic/bx#license-bsd-2-clause
+ */
+
+#include "test.h"
+#include <bx/readerwriter.h>
+
+TEST_CASE("writeLE", "")
+{
+ bx::SizerWriter writer;
+
+ bx::Error err;
+
+ int32_t total = bx::writeLE(&writer, 1.0f, &err);
+
+ REQUIRE(err.isOk() );
+ REQUIRE(total == 4);
+}
+
+TEST_CASE("writeBE", "")
+{
+ bx::SizerWriter writer;
+
+ bx::Error err;
+
+ int32_t total = bx::writeBE(&writer, 1.0f, &err);
+
+ REQUIRE(err.isOk() );
+ REQUIRE(total == 4);
+}