tests/VDBInstructionListApplicationTests.st
changeset 113 1a40f33af921
parent 111 a70313e80780
child 151 bc7626f46210
--- a/tests/VDBInstructionListApplicationTests.st	Mon Oct 01 12:11:59 2018 +0100
+++ b/tests/VDBInstructionListApplicationTests.st	Mon Oct 01 20:56:03 2018 +0100
@@ -32,12 +32,19 @@
 
 !VDBInstructionListApplicationTests methodsFor:'tests'!
 
-test_01
+test_01a
     | stack frameHolder |
 
     debugger := GDBDebugger new.
     self assert: debugger isConnected.
 
+    frameHolder := ValueHolder new.
+    application := VDBInstructionListApplication new.
+    application debuggerHolder: (ValueHolder with: debugger).
+    application frameHolder: frameHolder.  
+    application open.
+
+
     debugger executable: GDBDebuggeesResource current binaryFactorial1.
     debugger send: 'b factorial'.
     debugger send: 'r' andWaitFor: GDBStoppedEvent.
@@ -46,12 +53,56 @@
     stack := debugger selectedInferior threads first stack.
     self assert: stack size = 3.
 
-    frameHolder := stack first asValue.
+    frameHolder value: stack first.
+
+    debugger send: 'stepi' andWaitFor: GDBStoppedEvent.
+    debugger send: 'next' andWaitFor: GDBStoppedEvent.
+    debugger send: 'd'.
+
+    frameHolder value: nil.
+    
+    debugger send: 'c' andWaitFor: GDBThreadGroupExitedEvent.
+
+    "Created: / 03-10-2018 / 12:27:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 03-10-2018 / 15:19:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+test_01b
+    | stack frameHolder |
+
+    debugger := GDBDebugger new.
+    self assert: debugger isConnected.
+
+    frameHolder := ValueHolder new.
     application := VDBInstructionListApplication new.
+    application debuggerHolder: (ValueHolder with: debugger).
     application frameHolder: frameHolder.  
-    application open.
+    application allButOpen.
+
+
+    debugger executable: GDBDebuggeesResource current binaryFactorial1.
+    debugger send: 'b factorial'.
+    debugger send: 'r' andWaitFor: GDBStoppedEvent.
+    debugger send: 'c' andWaitFor: GDBStoppedEvent.
 
-    "Created: / 28-09-2018 / 08:33:12 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified: / 28-09-2018 / 10:05:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    stack := debugger selectedInferior threads first stack.
+    self assert: stack size = 3.
+
+    frameHolder value: stack first.
+
+    debugger send: 'stepi' andWaitFor: GDBStoppedEvent.
+    debugger send: 'next' andWaitFor: GDBStoppedEvent.
+    debugger send: 'd'.
+    debugger send: 'c' andWaitFor: GDBThreadGroupExitedEvent.
+
+    "Created: / 03-10-2018 / 12:27:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 03-10-2018 / 15:14:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
+!VDBInstructionListApplicationTests class methodsFor:'documentation'!
+
+version_HG
+
+    ^ '$Changeset: <not expanded> $'
+! !
+