[ox/std] Add tests for UUID int to hex str conversion
This commit is contained in:
parent
014daa6b57
commit
86f639c7f7
1
deps/ox/src/ox/std/test/CMakeLists.txt
vendored
1
deps/ox/src/ox/std/test/CMakeLists.txt
vendored
@ -19,3 +19,4 @@ add_test("[ox/std] HeapMgr" StdTest malloc)
|
|||||||
add_test("[ox/std] Serialize-Int" StdTest "Serialize-Int")
|
add_test("[ox/std] Serialize-Int" StdTest "Serialize-Int")
|
||||||
add_test("[ox/std] BufferWriter" StdTest "BufferWriter")
|
add_test("[ox/std] BufferWriter" StdTest "BufferWriter")
|
||||||
add_test("[ox/std] StringSplit" StdTest "StringSplit")
|
add_test("[ox/std] StringSplit" StdTest "StringSplit")
|
||||||
|
add_test("[ox/std] ToHex" StdTest "ToHex")
|
||||||
|
20
deps/ox/src/ox/std/test/tests.cpp
vendored
20
deps/ox/src/ox/std/test/tests.cpp
vendored
@ -9,6 +9,7 @@
|
|||||||
#undef NDEBUG
|
#undef NDEBUG
|
||||||
|
|
||||||
#include <map>
|
#include <map>
|
||||||
|
#include <ox/std/uuid.hpp>
|
||||||
#include <ox/std/std.hpp>
|
#include <ox/std/std.hpp>
|
||||||
|
|
||||||
static std::map<ox::String, ox::Error(*)()> tests = {
|
static std::map<ox::String, ox::Error(*)()> tests = {
|
||||||
@ -155,6 +156,25 @@ static std::map<ox::String, ox::Error(*)()> tests = {
|
|||||||
return OxError(0);
|
return OxError(0);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"ToHex",
|
||||||
|
[] {
|
||||||
|
oxExpect(ox::detail::toHex(0x01), "01");
|
||||||
|
oxExpect(ox::detail::toHex(0x02), "02");
|
||||||
|
oxExpect(ox::detail::toHex(0x03), "03");
|
||||||
|
oxExpect(ox::detail::toHex(0x04), "04");
|
||||||
|
oxExpect(ox::detail::toHex(0x05), "05");
|
||||||
|
oxExpect(ox::detail::toHex(0x06), "06");
|
||||||
|
oxExpect(ox::detail::toHex(0x07), "07");
|
||||||
|
oxExpect(ox::detail::toHex(0x08), "08");
|
||||||
|
oxExpect(ox::detail::toHex(0x0d), "0d");
|
||||||
|
oxExpect(ox::detail::toHex(0x0e), "03");
|
||||||
|
oxExpect(ox::detail::toHex(0x0f), "0f");
|
||||||
|
oxExpect(ox::detail::toHex(0x93), "93");
|
||||||
|
oxExpect(ox::detail::toHex(0x40), "40");
|
||||||
|
return OxError(0);
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"StringSplit",
|
"StringSplit",
|
||||||
[] {
|
[] {
|
||||||
|
Loading…
Reference in New Issue
Block a user