author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Thu, 07 Feb 2019 15:18:41 +0000 | |
changeset 175 | a04e1a36e888 |
parent 103 | 56bf65352505 |
child 272 | cdd1c9ad00de |
permissions | -rw-r--r-- |
98
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
1 |
" |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
2 |
jv:libgdbs - GNU Debugger Interface Library |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
3 |
Copyright (C) 2015-now Jan Vrany |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
4 |
|
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
5 |
This library is free software; you can redistribute it and/or |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
6 |
modify it under the terms of the GNU Lesser General Public |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
7 |
License as published by the Free Software Foundation; either |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
8 |
version 2.1 of the License. |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
9 |
|
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
10 |
This library is distributed in the hope that it will be useful, |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
11 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
12 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
13 |
Lesser General Public License for more details. |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
14 |
|
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
15 |
You should have received a copy of the GNU Lesser General Public |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
16 |
License along with this library; if not, write to the Free Software |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
17 |
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
18 |
" |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
19 |
"{ Package: 'jv:libgdbs/tests' }" |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
20 |
|
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
21 |
"{ NameSpace: Smalltalk }" |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
22 |
|
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
23 |
TestCase subclass:#GDBTransientDataHolderTests |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
24 |
instanceVariableNames:'seqNo' |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
25 |
classVariableNames:'' |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
26 |
poolDictionaries:'GDBCommandStatus' |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
27 |
category:'GDB-Private-Tests' |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
28 |
! |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
29 |
|
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
30 |
!GDBTransientDataHolderTests class methodsFor:'documentation'! |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
31 |
|
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
32 |
copyright |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
33 |
" |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
34 |
jv:libgdbs - GNU Debugger Interface Library |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
35 |
Copyright (C) 2015-now Jan Vrany |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
36 |
|
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
37 |
This library is free software; you can redistribute it and/or |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
38 |
modify it under the terms of the GNU Lesser General Public |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
39 |
License as published by the Free Software Foundation; either |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
40 |
version 2.1 of the License. |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
41 |
|
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
42 |
This library is distributed in the hope that it will be useful, |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
43 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
44 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
45 |
Lesser General Public License for more details. |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
46 |
|
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
47 |
You should have received a copy of the GNU Lesser General Public |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
48 |
License along with this library; if not, write to the Free Software |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
49 |
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
50 |
" |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
51 |
! ! |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
52 |
|
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
53 |
!GDBTransientDataHolderTests methodsFor:'private'! |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
54 |
|
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
55 |
currentInferiorStateSequnceNumber |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
56 |
^ seqNo |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
57 |
|
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
58 |
"Created: / 30-01-2018 / 08:13:06 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
59 |
! ! |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
60 |
|
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
61 |
!GDBTransientDataHolderTests methodsFor:'running'! |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
62 |
|
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
63 |
setUp |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
64 |
seqNo := 0 |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
65 |
|
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
66 |
"Created: / 30-01-2018 / 08:13:20 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
67 |
! ! |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
68 |
|
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
69 |
!GDBTransientDataHolderTests methodsFor:'tests'! |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
70 |
|
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
71 |
test_01 |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
72 |
| holder value evaluated | |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
73 |
|
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
74 |
value := 0. |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
75 |
evaluated := false. |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
76 |
holder := GDBTransientDataHolder debugger: self factory: [ evaluated := true. value ]. |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
77 |
|
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
78 |
self assert: holder value == 0. |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
79 |
self assert: evaluated. |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
80 |
|
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
81 |
|
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
82 |
"/ factory should not be evaluated and old value should |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
83 |
"/ bre returned since sequence number has not changed. |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
84 |
evaluated := false. value := 1. |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
85 |
self assert: holder value == 0. |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
86 |
self assert: evaluated not. |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
87 |
self assert: holder value == 0. |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
88 |
self assert: evaluated not. |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
89 |
|
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
90 |
"/ change the sequence number a check the value has been |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
91 |
"/ rreevaluated |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
92 |
seqNo := seqNo + 1. |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
93 |
self assert: holder value == 1. |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
94 |
self assert: evaluated. |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
95 |
|
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
96 |
"Created: / 30-01-2018 / 08:11:35 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
97 |
! |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
98 |
|
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
99 |
test_02 |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
100 |
| holder value token evaluated | |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
101 |
|
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
102 |
value := 0. |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
103 |
token := Object new. |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
104 |
evaluated := false. |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
105 |
holder := GDBTransientDataHolder debugger: self factory: [ evaluated := true. holder value: token. value ]. |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
106 |
|
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
107 |
self assert: holder value == token. |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
108 |
self assert: evaluated. |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
109 |
|
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
110 |
|
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
111 |
"/ factory should not be evaluated and old value should |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
112 |
"/ bre returned since sequence number has not changed. |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
113 |
evaluated := false. value := 1. |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
114 |
self assert: holder value == token. |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
115 |
self assert: evaluated not. |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
116 |
self assert: holder value == token. |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
117 |
self assert: evaluated not. |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
118 |
|
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
119 |
"/ change the sequence number a check the value has been |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
120 |
"/ rreevaluated |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
121 |
seqNo := seqNo + 1. |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
122 |
evaluated := false. value := 1. token := Object new. |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
123 |
self assert: holder value == token. |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
124 |
self assert: evaluated. |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
125 |
|
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
126 |
"Created: / 30-01-2018 / 09:08:47 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
103
56bf65352505
Variable objects: preserve the identity of `GDBFrame` and `GDBVariable` objects
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
98
diff
changeset
|
127 |
! |
56bf65352505
Variable objects: preserve the identity of `GDBFrame` and `GDBVariable` objects
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
98
diff
changeset
|
128 |
|
56bf65352505
Variable objects: preserve the identity of `GDBFrame` and `GDBVariable` objects
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
98
diff
changeset
|
129 |
test_03 |
56bf65352505
Variable objects: preserve the identity of `GDBFrame` and `GDBVariable` objects
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
98
diff
changeset
|
130 |
| holder evaluated | |
56bf65352505
Variable objects: preserve the identity of `GDBFrame` and `GDBVariable` objects
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
98
diff
changeset
|
131 |
|
56bf65352505
Variable objects: preserve the identity of `GDBFrame` and `GDBVariable` objects
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
98
diff
changeset
|
132 |
evaluated := false. |
56bf65352505
Variable objects: preserve the identity of `GDBFrame` and `GDBVariable` objects
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
98
diff
changeset
|
133 |
holder := GDBTransientDataHolder debugger: self factory: [ :old | evaluated := true. old notNil ifTrue:[ old + 1 ] ifFalse: [ 100 ] ]. |
56bf65352505
Variable objects: preserve the identity of `GDBFrame` and `GDBVariable` objects
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
98
diff
changeset
|
134 |
|
56bf65352505
Variable objects: preserve the identity of `GDBFrame` and `GDBVariable` objects
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
98
diff
changeset
|
135 |
self assert: holder value == 100. |
56bf65352505
Variable objects: preserve the identity of `GDBFrame` and `GDBVariable` objects
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
98
diff
changeset
|
136 |
self assert: evaluated. |
56bf65352505
Variable objects: preserve the identity of `GDBFrame` and `GDBVariable` objects
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
98
diff
changeset
|
137 |
|
56bf65352505
Variable objects: preserve the identity of `GDBFrame` and `GDBVariable` objects
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
98
diff
changeset
|
138 |
"/ factory should not be evaluated and old value should |
56bf65352505
Variable objects: preserve the identity of `GDBFrame` and `GDBVariable` objects
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
98
diff
changeset
|
139 |
"/ bre returned since sequence number has not changed. |
56bf65352505
Variable objects: preserve the identity of `GDBFrame` and `GDBVariable` objects
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
98
diff
changeset
|
140 |
evaluated := false. |
56bf65352505
Variable objects: preserve the identity of `GDBFrame` and `GDBVariable` objects
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
98
diff
changeset
|
141 |
self assert: holder value == 100. |
56bf65352505
Variable objects: preserve the identity of `GDBFrame` and `GDBVariable` objects
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
98
diff
changeset
|
142 |
self assert: evaluated not. |
56bf65352505
Variable objects: preserve the identity of `GDBFrame` and `GDBVariable` objects
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
98
diff
changeset
|
143 |
self assert: holder value == 100. |
56bf65352505
Variable objects: preserve the identity of `GDBFrame` and `GDBVariable` objects
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
98
diff
changeset
|
144 |
self assert: evaluated not. |
56bf65352505
Variable objects: preserve the identity of `GDBFrame` and `GDBVariable` objects
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
98
diff
changeset
|
145 |
|
56bf65352505
Variable objects: preserve the identity of `GDBFrame` and `GDBVariable` objects
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
98
diff
changeset
|
146 |
"/ change the sequence number a check the value has been |
56bf65352505
Variable objects: preserve the identity of `GDBFrame` and `GDBVariable` objects
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
98
diff
changeset
|
147 |
"/ rreevaluated |
56bf65352505
Variable objects: preserve the identity of `GDBFrame` and `GDBVariable` objects
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
98
diff
changeset
|
148 |
seqNo := seqNo + 1. |
56bf65352505
Variable objects: preserve the identity of `GDBFrame` and `GDBVariable` objects
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
98
diff
changeset
|
149 |
evaluated := false. |
56bf65352505
Variable objects: preserve the identity of `GDBFrame` and `GDBVariable` objects
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
98
diff
changeset
|
150 |
self assert: holder value == 101. |
56bf65352505
Variable objects: preserve the identity of `GDBFrame` and `GDBVariable` objects
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
98
diff
changeset
|
151 |
self assert: evaluated. |
56bf65352505
Variable objects: preserve the identity of `GDBFrame` and `GDBVariable` objects
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
98
diff
changeset
|
152 |
|
56bf65352505
Variable objects: preserve the identity of `GDBFrame` and `GDBVariable` objects
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
98
diff
changeset
|
153 |
"/ factory should not be evaluated and old value should |
56bf65352505
Variable objects: preserve the identity of `GDBFrame` and `GDBVariable` objects
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
98
diff
changeset
|
154 |
"/ bre returned since sequence number has not changed. |
56bf65352505
Variable objects: preserve the identity of `GDBFrame` and `GDBVariable` objects
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
98
diff
changeset
|
155 |
evaluated := false. |
56bf65352505
Variable objects: preserve the identity of `GDBFrame` and `GDBVariable` objects
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
98
diff
changeset
|
156 |
self assert: holder value == 101. |
56bf65352505
Variable objects: preserve the identity of `GDBFrame` and `GDBVariable` objects
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
98
diff
changeset
|
157 |
self assert: evaluated not. |
56bf65352505
Variable objects: preserve the identity of `GDBFrame` and `GDBVariable` objects
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
98
diff
changeset
|
158 |
self assert: holder value == 101. |
56bf65352505
Variable objects: preserve the identity of `GDBFrame` and `GDBVariable` objects
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
98
diff
changeset
|
159 |
self assert: evaluated not. |
56bf65352505
Variable objects: preserve the identity of `GDBFrame` and `GDBVariable` objects
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
98
diff
changeset
|
160 |
|
56bf65352505
Variable objects: preserve the identity of `GDBFrame` and `GDBVariable` objects
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
98
diff
changeset
|
161 |
"Created: / 31-01-2018 / 09:26:47 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
98
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
162 |
! ! |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
163 |
|
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
164 |
!GDBTransientDataHolderTests class methodsFor:'documentation'! |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
165 |
|
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
166 |
version_HG |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
167 |
|
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
168 |
^ '$Changeset: <not expanded> $' |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
169 |
! ! |
547ee8755f45
Added `GDBTransientDataHolder >> value:` to allow pre-setting the data
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
170 |