From 951fc401342b2e4d9cb5052675db53a587153779 Mon Sep 17 00:00:00 2001 From: Amneesh Singh Date: Sun, 16 Jun 2024 07:46:12 +0530 Subject: [PATCH] tests/bus: idle cycle test Signed-off-by: Amneesh Singh --- tests/bus.cc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/bus.cc b/tests/bus.cc index 8b41a01..055afa2 100644 --- a/tests/bus.cc +++ b/tests/bus.cc @@ -200,4 +200,13 @@ TEST_CASE("rom", TAG) { } } +TEST_CASE_METHOD(BusFixture, "internal cycle", TAG) { + uint32_t cycles = bus->get_cycles(); + + bus->internal_cycle(); + bus->internal_cycle(); + + CHECK(bus->get_cycles() == cycles + 2); +} + #undef TAG