The great renaming, part 2
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
60bad24319
commit
869fe6e7d2
@ -23,7 +23,7 @@ struct HAL
|
||||
|
||||
static std::uint32_t millis;
|
||||
|
||||
static std::uint32_t GetMillis()
|
||||
static std::uint32_t getMillis()
|
||||
{
|
||||
return millis;
|
||||
}
|
||||
@ -40,7 +40,7 @@ struct Gpio
|
||||
set = false;
|
||||
}
|
||||
|
||||
bool Read()
|
||||
bool read()
|
||||
{
|
||||
return set;
|
||||
}
|
||||
|
||||
@ -14,13 +14,13 @@ TEST_CASE("rand32 is deterministic.", "[utility],[rand]")
|
||||
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
generated.push_back(Peripherals::rand32(state));
|
||||
generated.push_back(Utility::rand32(state));
|
||||
}
|
||||
|
||||
std::uint32_t new_state = original_state;
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
REQUIRE(generated[i] == Peripherals::rand32(new_state));
|
||||
REQUIRE(generated[i] == Utility::rand32(new_state));
|
||||
}
|
||||
}
|
||||
|
||||
@ -32,13 +32,13 @@ TEST_CASE("rand64 is deterministic.", "[utility],[rand]")
|
||||
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
generated.push_back(Peripherals::rand64(state));
|
||||
generated.push_back(Utility::rand64(state));
|
||||
}
|
||||
|
||||
std::uint64_t new_state = original_state;
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
REQUIRE(generated[i] == Peripherals::rand64(new_state));
|
||||
REQUIRE(generated[i] == Utility::rand64(new_state));
|
||||
}
|
||||
}
|
||||
|
||||
@ -46,17 +46,17 @@ TEST_CASE("rand and srand are deterministic", "[utility],[rand]")
|
||||
{
|
||||
const std::uint32_t original_state = 34;
|
||||
|
||||
Peripherals::srand(original_state);
|
||||
Utility::srand(original_state);
|
||||
std::vector<std::uint32_t> generated;
|
||||
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
generated.push_back(Peripherals::rand());
|
||||
generated.push_back(Utility::rand());
|
||||
}
|
||||
|
||||
Peripherals::srand(original_state);
|
||||
Utility::srand(original_state);
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
REQUIRE(generated[i] == Peripherals::rand());
|
||||
REQUIRE(generated[i] == Utility::rand());
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user