mirror of
https://github.com/momo5502/emulator.git
synced 2026-01-18 19:23:56 +00:00
Format all the code
This commit is contained in:
@@ -2,46 +2,46 @@
|
||||
|
||||
namespace test
|
||||
{
|
||||
TEST(EmulationTest, BasicEmulationWorks)
|
||||
{
|
||||
auto emu = create_sample_emulator();
|
||||
emu.start();
|
||||
TEST(EmulationTest, BasicEmulationWorks)
|
||||
{
|
||||
auto emu = create_sample_emulator();
|
||||
emu.start();
|
||||
|
||||
ASSERT_TERMINATED_SUCCESSFULLY(emu);
|
||||
}
|
||||
ASSERT_TERMINATED_SUCCESSFULLY(emu);
|
||||
}
|
||||
|
||||
TEST(EmulationTest, CountedEmulationWorks)
|
||||
{
|
||||
constexpr auto count = 200000;
|
||||
TEST(EmulationTest, CountedEmulationWorks)
|
||||
{
|
||||
constexpr auto count = 200000;
|
||||
|
||||
auto emu = create_sample_emulator();
|
||||
emu.start({}, count);
|
||||
auto emu = create_sample_emulator();
|
||||
emu.start({}, count);
|
||||
|
||||
ASSERT_EQ(emu.process().executed_instructions, count);
|
||||
}
|
||||
ASSERT_EQ(emu.process().executed_instructions, count);
|
||||
}
|
||||
|
||||
TEST(EmulationTest, CountedEmulationIsAccurate)
|
||||
{
|
||||
auto emu = create_sample_emulator();
|
||||
emu.start();
|
||||
TEST(EmulationTest, CountedEmulationIsAccurate)
|
||||
{
|
||||
auto emu = create_sample_emulator();
|
||||
emu.start();
|
||||
|
||||
ASSERT_TERMINATED_SUCCESSFULLY(emu);
|
||||
ASSERT_TERMINATED_SUCCESSFULLY(emu);
|
||||
|
||||
const auto executedInstructions = emu.process().executed_instructions;
|
||||
const auto executedInstructions = emu.process().executed_instructions;
|
||||
|
||||
auto new_emu = create_sample_emulator();
|
||||
auto new_emu = create_sample_emulator();
|
||||
|
||||
constexpr auto offset = 1;
|
||||
const auto instructionsToExecute = executedInstructions - offset;
|
||||
constexpr auto offset = 1;
|
||||
const auto instructionsToExecute = executedInstructions - offset;
|
||||
|
||||
new_emu.start({}, instructionsToExecute);
|
||||
new_emu.start({}, instructionsToExecute);
|
||||
|
||||
ASSERT_EQ(new_emu.process().executed_instructions, instructionsToExecute);
|
||||
ASSERT_NOT_TERMINATED(new_emu);
|
||||
ASSERT_EQ(new_emu.process().executed_instructions, instructionsToExecute);
|
||||
ASSERT_NOT_TERMINATED(new_emu);
|
||||
|
||||
new_emu.start({}, offset);
|
||||
new_emu.start({}, offset);
|
||||
|
||||
ASSERT_TERMINATED_SUCCESSFULLY(new_emu);
|
||||
ASSERT_EQ(new_emu.process().executed_instructions, executedInstructions);
|
||||
}
|
||||
ASSERT_TERMINATED_SUCCESSFULLY(new_emu);
|
||||
ASSERT_EQ(new_emu.process().executed_instructions, executedInstructions);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user