[ox/std] Add test for UUID::generate() and fix bug

This commit is contained in:
2023-02-13 19:08:04 -06:00
parent 86a3bf1248
commit 777a6d54f0
3 changed files with 13 additions and 1 deletions

View File

@@ -210,6 +210,16 @@ static std::map<ox::String, ox::Error(*)()> tests = {
return OxError(0);
}
},
{
"UUID::generate",
[] {
ox::UUID::seedGenerator({1234, 4321});
oxExpect(ox::UUID::generate().unwrap().toString(), "c8f4bff1-d403-4576-fd3b-0c41f1cd8b7d");
oxExpect(ox::UUID::generate().unwrap().toString(), "0d1b7dad-7d50-49b6-916d-c3d811b5af0a");
oxExpect(ox::UUID::generate().unwrap().toString(), "e3889e0b-4dcd-47b2-b3eb-492ea958d3e4");
return OxError(0);
}
},
{
"StringSplit",
[] {