--- a/tests/GDBMIParserTests.st Thu Nov 23 22:51:20 2017 +0000
+++ b/tests/GDBMIParserTests.st Mon Nov 27 20:41:34 2017 +0000
@@ -393,31 +393,28 @@
*running,thread-id="all"
(gdb)
'.
+ "/ Note that parser yields anb output after first async event,
+ "/ so to parse all events in the above input we have to call
+ "/ parseOutput couple times
events := parser parseOutput.
- self assert:events size == 6.
- self assert:events third isNotificationEvent.
+ self assert:events size == 3.
+ self assert:events first isLogOutputEvent.
+ self assert:events second isConsoleOutputEvent.
self assert:events third type = 'thread-group-started'.
- self assert:events fifth isCommandResultEvent.
- self assert:events fifth result status == CommandStatusDone.
- self assert:events sixth isExecutionEvent.
- self assert:events sixth type = 'running'.
- parser := GDBMIParser
- on:'=library-loaded,id="/lib64/ld-linux-x86-64.so.2",target-name="/lib64/ld-linux-x86-64.so.2",host-name="/lib64/ld-linux-x86-64.so.2",symbols-loaded="0",thread-group="i1"
-=library-loaded,id="/lib/x86_64-linux-gnu/libc.so.6",target-name="/lib/x86_64-linux-gnu/libc.so.6",host-name="/lib/x86_64-linux-gnu/libc.so.6",symbols-loaded="0",thread-group="i1"
-=breakpoint-modified,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0x0000000000400556",func="main",file="factorial.c",fullname="/home/jv/Private/Projects/SmalltalkX/sources/branches/jv1/build/jv/libgdbs/tests/c/factorial.c",line="12",times="1",original-location="main"}
-~"\nBreakpoint "
-~"1, main (argc=1, argv=0x7fffffffe0a8) at factorial.c:12\n"
-~"12\t\tint i = 5;\n"
-*stopped,reason="breakpoint-hit",disp="keep",bkptno="1",frame={addr="0x0000000000400556",func="main",args=[{name="argc",value="1"},{name="argv",value="0x7fffffffe0a8"}],file="factorial.c",fullname="/home/jv/Private/Projects/SmalltalkX/sources/branches/jv1/build/jv/libgdbs/tests/c/factorial.c",line="12"},thread-id="1",stopped-threads="all",core="1"
-(gdb)
-'.
+ self assert:events third threadGroupId = 'i1'
+.
events := parser parseOutput.
- self assert:events size == 7.
- self assert:(events at:7) isExecutionEvent.
- self assert:(events at:7) type = 'stopped'.
+ self assert:events size == 1.
+ self assert:events first type = 'thread-created'.
+ self assert:events first threadId = 1.
+
+ events := parser parseOutput.
+ self assert:events size == 2.
+ self assert:events first isCommandResultEvent.
+ self assert:events second type = 'running'.
"Created: / 01-06-2014 / 22:57:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 12-11-2017 / 20:36:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 27-11-2017 / 20:29:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!GDBMIParserTests methodsFor:'tests - values'!
@@ -670,7 +667,7 @@
descriptor := GDBMAContainer forClass:self class.
descriptor add:
(Magritte::MASingleOptionDescription new
- optionsAndLabels: { 1 -> 'one' . 2 -> 'two' . #more -> 'more' };
+ optionsAndLabels: (Array with: 1 -> 'one' with: 2 -> 'two' with: #more -> 'more');
accessor: (GDBMAPropertyAccessor forPropertyNamed: 'prop1')).
object := (GDBMIParser on:'{prop1="one"}')
@@ -692,6 +689,7 @@
] raise: Magritte::MAReadError
"Created: / 25-09-2014 / 08:33:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 27-11-2017 / 20:30:28 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!GDBMIParserTests class methodsFor:'documentation'!