1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-07 19:18:19 +02:00
Beef/IDE/Tests/Test1/scripts/Multithread.txt
Brian Fiete a367b8165f Win32 debugging fixes, more work on custom compile commands
Fixed working dir for 'launch'
Fixed attaching to process - stack trace wasn't updating properly
Fixed more custom compile stuff, and BeefySysLib bin destination
Fixed linking issues related to Bfp* and Bp* exports in both BeefRT and BeefySysLib
Fixed a crash with conditional breakpoints
Fixed release mode IDE issues (related to hot swap breakpoints)
Fixed hotswapping type data with LLVM builds
Fixed 'Pause' state processing Running_ToTempBreakpoint for ScriptManager
Fixed Win32 step out when there's an ESP adjustment at the return site
Made step-out skip over "unimportant" instructions at return site
2019-08-29 14:19:07 -07:00

95 lines
No EOL
2.1 KiB
Text

# This tests multithreaded stepping
# - Steps should stay in the same thread
# - Run To Cursor should stay on the same thread
# - Step Out should stay on the same thread
ShowFile("src/Multithread.bf")
GotoText("//MultithreadTester_Test")
ToggleBreakpoint()
RunWithCompiling()
StepOver()
AssertEvalEquals("doTest = true", "true")
GotoText("//ThreadFunc")
ToggleBreakpoint()
Continue()
AssertEvalEquals("sLocalVal", "1")
Continue()
AssertEvalEquals("sLocalVal", "1")
Continue()
AssertEvalEquals("sLocalVal", "1")
# We now have all 3 threads running and we're the third one
# We now do a series of execution tests, concentrating on the "val++" line
# We test that "run to cursor" does a full iteration back to that
# same line, both from having stepped onto it using "StepOver" and
# having previously arrived there from another "RunToCursor"
AssertEvalEquals("threadNum", "2")
StepOver()
AssertEvalEquals("threadNum", "2")
StepOver()
AssertEvalEquals("threadNum", "2")
StepOver()
AssertEvalEquals("threadNum", "2")
StepOver()
AssertEvalEquals("threadNum", "2")
StepOver()
AssertEvalEquals("threadNum", "2")
StepOver()
AssertEvalEquals("i", "1")
RunToCursor()
AssertEvalEquals("threadNum", "2")
AssertEvalEquals("i", "2")
RunToCursor()
AssertEvalEquals("threadNum", "2")
AssertEvalEquals("i", "3")
# Pass 2
StepOver()
StepOver()
StepOver()
StepOver()
AssertEvalEquals("threadNum", "2")
AssertEvalEquals("i", "4")
RunToCursor()
AssertEvalEquals("threadNum", "2")
AssertEvalEquals("i", "5")
RunToCursor()
AssertEvalEquals("threadNum", "2")
AssertEvalEquals("i", "6")
# Pass 3
StepOver()
StepOver()
StepOver()
StepOver()
AssertEvalEquals("threadNum", "2")
AssertEvalEquals("i", "7")
RunToCursor()
AssertEvalEquals("threadNum", "2")
AssertEvalEquals("i", "8")
RunToCursor()
AssertEvalEquals("threadNum", "2")
AssertEvalEquals("i", "9")
Stop()
# Set up the StepOut test
StepInto()
StepOver()
StepOver()
StepOver()
StepInto()
StepOver()
StepOver()
AssertEvalEquals("val", "2")
StepOut()
AssertEvalEquals("depth", "0")
AssertEvalEquals("val", "5")
StepOut()
AssertEvalEquals("threadNum", "2")
AssertEvalEquals("i", "9")