X-Git-Url: https://mograsim.net/gitweb/?a=blobdiff_plain;f=net.mograsim.logic.core%2Ftest%2Fnet%2Fmograsim%2Flogic%2Fcore%2Ftests%2FTestCoreBitDisplay.java;fp=net.mograsim.logic.core%2Ftest%2Fnet%2Fmograsim%2Flogic%2Fcore%2Ftests%2FTestCoreBitDisplay.java;h=5056345f77bd03daf2e53e6224e83495f457118f;hb=9bb76ff610ab0fcc07a9049e4a572053339593c9;hp=2e5e5fd6a6d743b5dc9272f809490b040324321e;hpb=c023578f3bc1537b575520740cc1c31ebc47aad7;p=Mograsim.git diff --git a/net.mograsim.logic.core/test/net/mograsim/logic/core/tests/TestCoreBitDisplay.java b/net.mograsim.logic.core/test/net/mograsim/logic/core/tests/TestCoreBitDisplay.java index 2e5e5fd6..5056345f 100644 --- a/net.mograsim.logic.core/test/net/mograsim/logic/core/tests/TestCoreBitDisplay.java +++ b/net.mograsim.logic.core/test/net/mograsim/logic/core/tests/TestCoreBitDisplay.java @@ -6,6 +6,7 @@ import java.util.function.LongConsumer; import net.mograsim.logic.core.components.CoreBitDisplay; import net.mograsim.logic.core.timeline.Timeline; +import net.mograsim.logic.core.timeline.TimelineEventHandler; import net.mograsim.logic.core.types.Bit; import net.mograsim.logic.core.wires.CoreWire.ReadEnd; @@ -39,9 +40,13 @@ public final class TestCoreBitDisplay extends CoreBitDisplay } @Override - protected void compute() + protected TimelineEventHandler compute() { - super.compute(); - System.out.println("update: value is " + getDisplayedValue()); + TimelineEventHandler handler = super.compute(); + return e -> + { + handler.handle(e); + System.out.println("update: value is " + getDisplayedValue()); + }; } }