From 57df6546670b86367eb75182f533904fb6bc23da Mon Sep 17 00:00:00 2001 From: revsic Date: Sun, 7 Apr 2019 02:42:26 +0900 Subject: [PATCH] obfs, sample, random: Fix type name to ull --- test/impl/random.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/impl/random.cpp b/test/impl/random.cpp index 35d81d6..4b9f328 100644 --- a/test/impl/random.cpp +++ b/test/impl/random.cpp @@ -1,12 +1,12 @@ #include #include -using uint64_t = unsigned long long; +using ull = unsigned long long; // https://en.wikipedia.org/wiki/Xorshift -uint64_t xorshift128plus(uint64_t state[2]) { - uint64_t t = state[0]; - uint64_t const s = state[1]; +ull xorshift128plus(ull state[2]) { + ull t = state[0]; + ull const s = state[1]; state[0] = s; t ^= t << 23; // a t ^= t >> 17; // b @@ -17,7 +17,7 @@ uint64_t xorshift128plus(uint64_t state[2]) { TEST_CASE("Random case", "[obfs::Xorshift+]") { constexpr size_t val = MAKE_RAND_VAL(100); - uint64_t state[2] = { val, val << 1 }; + ull state[2] = { val, val << 1 }; REQUIRE(obfs::Xorshiftplus::value == xorshift128plus(state)); REQUIRE(obfs::Xorshiftplus::value == xorshift128plus(state));