# This tests hot adding an unreified interface, hot adding interface methods,
#  and calling hot-added methods

ShowFile("src/HotSwap.bf")
GotoText("//HotStart_Interfaces")
ToggleBreakpoint()
RunWithCompiling()

StepOver()
AssertEvalEquals("hot.IHotA()", "ERROR:'Unable to find address for method, possibly due to compiler optimizations.'")

ToggleCommentAt("HotTester_TestIHotA")
Compile()
StepInto()
StepOver()
StepOver()
AssertEvalEquals("val", "15")
AssertEvalEquals("hot.IHotA()", "15")

ToggleCommentAt("IHot_IHotB")
ToggleCommentAt("HotTester_TestIHotB")
Compile()

Stop()

# Steps out
StepOver()

StepInto()
StepOver()
StepOver()
AssertEvalEquals("val", "16")
AssertEvalEquals("hot.IHotB()", "16")