26 lines
681 B
C++
26 lines
681 B
C++
#include <Void/Core/Bits.hpp>
|
|
#include <Void/Core/CheckedBits.hpp>
|
|
#include <Void/Core/Hash.hpp>
|
|
#include <Void/Core/Meta.hpp>
|
|
#include <Void/Core/Uuid.hpp>
|
|
|
|
#include <random>
|
|
|
|
int main()
|
|
{
|
|
std::mt19937_64 rng{7};
|
|
const auto u = Void::Uuid::v4(rng);
|
|
const auto chars = Void::Uuid::format_chars(u);
|
|
const auto reparsed =
|
|
Void::Uuid::parse(std::string_view{chars.data(), chars.size()});
|
|
if (!reparsed || *reparsed != u) {
|
|
return 1;
|
|
}
|
|
const auto aligned = Void::Bits::checked_align_up(13u, 8u);
|
|
if (!aligned || *aligned != 16u) {
|
|
return 1;
|
|
}
|
|
const auto h = Void::Hash::fnv1a64("core-only");
|
|
return h != 0 ? 0 : 1;
|
|
}
|