Tools__TestRunnerEmbedded.st
author Claus Gittinger <cg@exept.de>
Fri, 27 Feb 2015 01:02:29 +0100
changeset 15442 4068936bef58
parent 15066 882a4c0b78e5
child 15462 3ecc5183f23a
permissions -rw-r--r--
class: Tools::TestRunnerEmbedded changed: #update:with:from: embedded test runner's visibility now controlled by a valueHolder
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
9954
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     1
"{ Package: 'stx:libtool' }"
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     2
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     3
"{ NameSpace: Tools }"
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     4
14729
d33037b4c843 Most of the code moved to superclass (Tools::TestRunnerMini), UI changed a bit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14727
diff changeset
     5
TestRunnerMini subclass:#TestRunnerEmbedded
d33037b4c843 Most of the code moved to superclass (Tools::TestRunnerMini), UI changed a bit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14727
diff changeset
     6
	instanceVariableNames:''
10647
1e9912f9a0d8 Embedded test runner no longer reuse old testcase instances
vrany
parents: 10608
diff changeset
     7
	classVariableNames:''
1e9912f9a0d8 Embedded test runner no longer reuse old testcase instances
vrany
parents: 10608
diff changeset
     8
	poolDictionaries:''
1e9912f9a0d8 Embedded test runner no longer reuse old testcase instances
vrany
parents: 10608
diff changeset
     9
	category:'SUnit-UI'
9954
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    10
!
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    11
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    12
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    13
!TestRunnerEmbedded class methodsFor:'plugIn spec'!
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    14
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    15
aspectSelectors
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    16
    "This resource specification was automatically generated
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    17
     by the UIPainter of ST/X."
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    18
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    19
    "Do not manually edit this. If it is corrupted,
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    20
     the UIPainter may not be able to read the specification."
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    21
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    22
    "Return a description of exported aspects;
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    23
     these can be connected to aspects of an embedding application
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    24
     (if this app is embedded in a subCanvas)."
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    25
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    26
    ^ #(
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    27
        #methodGeneratorHolder
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    28
        #selectedClassesHolder
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    29
        #selectedMethodsHolder
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    30
        #selectedProtocolsHolder
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    31
      ).
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    32
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    33
! !
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    34
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    35
!TestRunnerEmbedded methodsFor:'aspects'!
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    36
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    37
methodGeneratorHolder
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    38
    "return/create the 'methodGeneratorHolder' value holder (automatically generated)"
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    39
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    40
    methodGeneratorHolder isNil ifTrue:[
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    41
        methodGeneratorHolder := ValueHolder new.
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    42
        methodGeneratorHolder addDependent:self.
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    43
    ].
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    44
    ^ methodGeneratorHolder
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    45
!
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    46
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    47
methodGeneratorHolder:something
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    48
    "set the 'methodGeneratorHolder' value holder (automatically generated)"
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    49
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    50
    |oldValue newValue|
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    51
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    52
    methodGeneratorHolder notNil ifTrue:[
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    53
        oldValue := methodGeneratorHolder value.
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    54
        methodGeneratorHolder removeDependent:self.
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    55
    ].
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    56
    methodGeneratorHolder := something.
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    57
    methodGeneratorHolder notNil ifTrue:[
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    58
        methodGeneratorHolder addDependent:self.
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    59
    ].
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    60
    newValue := methodGeneratorHolder value.
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    61
    oldValue ~~ newValue ifTrue:[
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    62
        self update:#value with:newValue from:methodGeneratorHolder.
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    63
    ].
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    64
!
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    65
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    66
selectedClassesHolder
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    67
    "return/create the 'selectedClassesHolder' value holder (automatically generated)"
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    68
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    69
    selectedClassesHolder isNil ifTrue:[
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    70
        selectedClassesHolder := ValueHolder new.
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    71
        selectedClassesHolder addDependent:self.
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    72
    ].
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    73
    ^ selectedClassesHolder
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    74
!
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    75
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    76
selectedClassesHolder:something
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    77
    "set the 'selectedClassesHolder' value holder (automatically generated)"
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    78
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    79
    |oldValue newValue|
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    80
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    81
    selectedClassesHolder notNil ifTrue:[
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    82
        oldValue := selectedClassesHolder value.
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    83
        selectedClassesHolder removeDependent:self.
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    84
    ].
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    85
    selectedClassesHolder := something.
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    86
    selectedClassesHolder notNil ifTrue:[
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    87
        selectedClassesHolder addDependent:self.
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    88
    ].
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    89
    newValue := selectedClassesHolder value.
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    90
    oldValue ~~ newValue ifTrue:[
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    91
        self update:#value with:newValue from:selectedClassesHolder.
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    92
    ].
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    93
!
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    94
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    95
selectedMethodsHolder
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    96
    "return/create the 'selectedMethodsHolder' value holder (automatically generated)"
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    97
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    98
    selectedMethodsHolder isNil ifTrue:[
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    99
        selectedMethodsHolder := ValueHolder new.
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   100
        selectedMethodsHolder addDependent:self.
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   101
    ].
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   102
    ^ selectedMethodsHolder
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   103
!
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   104
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   105
selectedMethodsHolder:something
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   106
    "set the 'selectedMethodsHolder' value holder (automatically generated)"
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   107
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   108
    |oldValue newValue|
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   109
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   110
    selectedMethodsHolder notNil ifTrue:[
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   111
        oldValue := selectedMethodsHolder value.
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   112
        selectedMethodsHolder removeDependent:self.
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   113
    ].
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   114
    selectedMethodsHolder := something.
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   115
    selectedMethodsHolder notNil ifTrue:[
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   116
        selectedMethodsHolder addDependent:self.
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   117
    ].
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   118
    newValue := selectedMethodsHolder value.
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   119
    oldValue ~~ newValue ifTrue:[
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   120
        self update:#value with:newValue from:selectedMethodsHolder.
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   121
    ].
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   122
!
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   123
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   124
selectedProtocolsHolder
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   125
    "return/create the 'selectedProtocolsHolder' value holder (automatically generated)"
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   126
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   127
    selectedProtocolsHolder isNil ifTrue:[
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   128
        selectedProtocolsHolder := ValueHolder new.
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   129
        selectedProtocolsHolder addDependent:self.
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   130
    ].
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   131
    ^ selectedProtocolsHolder
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   132
!
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   133
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   134
selectedProtocolsHolder:something
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   135
    "set the 'selectedProtocolsHolder' value holder (automatically generated)"
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   136
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   137
    |oldValue newValue|
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   138
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   139
    selectedProtocolsHolder notNil ifTrue:[
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   140
        oldValue := selectedProtocolsHolder value.
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   141
        selectedProtocolsHolder removeDependent:self.
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   142
    ].
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   143
    selectedProtocolsHolder := something.
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   144
    selectedProtocolsHolder notNil ifTrue:[
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   145
        selectedProtocolsHolder addDependent:self.
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   146
    ].
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   147
    newValue := selectedProtocolsHolder value.
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   148
    oldValue ~~ newValue ifTrue:[
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   149
        self update:#value with:newValue from:selectedProtocolsHolder.
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   150
    ].
14729
d33037b4c843 Most of the code moved to superclass (Tools::TestRunnerMini), UI changed a bit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14727
diff changeset
   151
! !
d33037b4c843 Most of the code moved to superclass (Tools::TestRunnerMini), UI changed a bit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14727
diff changeset
   152
d33037b4c843 Most of the code moved to superclass (Tools::TestRunnerMini), UI changed a bit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14727
diff changeset
   153
!TestRunnerEmbedded methodsFor:'aspects-visibility'!
d33037b4c843 Most of the code moved to superclass (Tools::TestRunnerMini), UI changed a bit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14727
diff changeset
   154
d33037b4c843 Most of the code moved to superclass (Tools::TestRunnerMini), UI changed a bit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14727
diff changeset
   155
pinButtonVisibleHolder
d33037b4c843 Most of the code moved to superclass (Tools::TestRunnerMini), UI changed a bit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14727
diff changeset
   156
    ^ true
d33037b4c843 Most of the code moved to superclass (Tools::TestRunnerMini), UI changed a bit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14727
diff changeset
   157
d33037b4c843 Most of the code moved to superclass (Tools::TestRunnerMini), UI changed a bit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14727
diff changeset
   158
    "Created: / 23-09-2014 / 10:11:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
11552
23bf4b9973a3 fixes and enhancements:
Claus Gittinger <cg@exept.de>
parents: 11197
diff changeset
   159
!
23bf4b9973a3 fixes and enhancements:
Claus Gittinger <cg@exept.de>
parents: 11197
diff changeset
   160
14729
d33037b4c843 Most of the code moved to superclass (Tools::TestRunnerMini), UI changed a bit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14727
diff changeset
   161
runAllButtonVisibleHolder
d33037b4c843 Most of the code moved to superclass (Tools::TestRunnerMini), UI changed a bit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14727
diff changeset
   162
    ^ true
11552
23bf4b9973a3 fixes and enhancements:
Claus Gittinger <cg@exept.de>
parents: 11197
diff changeset
   163
14729
d33037b4c843 Most of the code moved to superclass (Tools::TestRunnerMini), UI changed a bit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14727
diff changeset
   164
    "Created: / 23-09-2014 / 10:12:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
d33037b4c843 Most of the code moved to superclass (Tools::TestRunnerMini), UI changed a bit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14727
diff changeset
   165
!
d33037b4c843 Most of the code moved to superclass (Tools::TestRunnerMini), UI changed a bit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14727
diff changeset
   166
d33037b4c843 Most of the code moved to superclass (Tools::TestRunnerMini), UI changed a bit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14727
diff changeset
   167
runFailedButtonVisibleHolder
d33037b4c843 Most of the code moved to superclass (Tools::TestRunnerMini), UI changed a bit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14727
diff changeset
   168
    ^ true
d33037b4c843 Most of the code moved to superclass (Tools::TestRunnerMini), UI changed a bit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14727
diff changeset
   169
d33037b4c843 Most of the code moved to superclass (Tools::TestRunnerMini), UI changed a bit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14727
diff changeset
   170
    "Created: / 23-09-2014 / 10:12:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
9954
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   171
! !
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   172
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   173
!TestRunnerEmbedded methodsFor:'change & update'!
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   174
14740
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   175
invalidateTestCases
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   176
    allTestCases := nil.
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   177
!
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   178
9954
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   179
update:aspect with:param from: sender
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   180
    "Invoked when an object that I depend upon sends a change notification."
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   181
15442
4068936bef58 class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents: 15066
diff changeset
   182
    sender == selectedMethodsHolder ifTrue:[
4068936bef58 class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents: 15066
diff changeset
   183
        self enqueueMessage:#updateTestCases for:self arguments:#().
4068936bef58 class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents: 15066
diff changeset
   184
        self enqueueMessage:#updateSuiteAndResult for:self arguments:#().
4068936bef58 class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents: 15066
diff changeset
   185
    ].
4068936bef58 class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents: 15066
diff changeset
   186
9954
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   187
    sender == selectedClassesHolder ifTrue:[
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   188
        self 
11966
6040753eab24 asynchronous update of testSuite and suiteAndResult
Claus Gittinger <cg@exept.de>
parents: 11925
diff changeset
   189
            invalidateTestCases;      "/ updateTestSuite;
6040753eab24 asynchronous update of testSuite and suiteAndResult
Claus Gittinger <cg@exept.de>
parents: 11925
diff changeset
   190
            invalidateSuiteAndResult; "/ updateTestSuiteAndResult;
9954
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   191
            updateVisibility.
15442
4068936bef58 class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents: 15066
diff changeset
   192
12762
eeb5359c60d3 class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents: 12604
diff changeset
   193
        self hasTestCaseSelected ifTrue:[
15066
882a4c0b78e5 class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents: 14740
diff changeset
   194
            self enqueueMessage:#updateTestCases for:self arguments:#().
882a4c0b78e5 class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents: 14740
diff changeset
   195
            self enqueueMessage:#updateSuiteAndResult for:self arguments:#().
882a4c0b78e5 class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents: 14740
diff changeset
   196
            "/ self enqueueDelayedAction:[ self updateTestCases; updateSuiteAndResult ].
12762
eeb5359c60d3 class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents: 12604
diff changeset
   197
        ].
9954
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   198
         ^ self.
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   199
    ].
12762
eeb5359c60d3 class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents: 12604
diff changeset
   200
    self hasTestCaseSelected ifTrue:[
15066
882a4c0b78e5 class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents: 14740
diff changeset
   201
        (sender == selectedProtocolsHolder 
882a4c0b78e5 class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents: 14740
diff changeset
   202
        or:[ sender == selectedMethodsHolder 
882a4c0b78e5 class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents: 14740
diff changeset
   203
        or:[ sender == methodGeneratorHolder ]]) ifTrue:[
12762
eeb5359c60d3 class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents: 12604
diff changeset
   204
            self invalidateSuiteAndResult. 
15066
882a4c0b78e5 class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents: 14740
diff changeset
   205
            self enqueueMessage:#updateSuiteAndResult for:self arguments:#().
12762
eeb5359c60d3 class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents: 12604
diff changeset
   206
            ^self
eeb5359c60d3 class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents: 12604
diff changeset
   207
        ].
eeb5359c60d3 class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents: 12604
diff changeset
   208
eeb5359c60d3 class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents: 12604
diff changeset
   209
        sender == Smalltalk ifTrue:[
eeb5359c60d3 class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents: 12604
diff changeset
   210
            aspect == #lastTestRunResult ifTrue:[
eeb5359c60d3 class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents: 12604
diff changeset
   211
                allTestCases notNil ifTrue:[
eeb5359c60d3 class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents: 12604
diff changeset
   212
                    (allTestCases includesIdentical: param first) ifTrue:[
eeb5359c60d3 class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents: 12604
diff changeset
   213
                        self invalidateSuiteAndResult. "/ updateTestSuiteAndResult.
15066
882a4c0b78e5 class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents: 14740
diff changeset
   214
                        self enqueueMessage:#updateSuiteAndResult for:self arguments:#().
12762
eeb5359c60d3 class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents: 12604
diff changeset
   215
                        ^self        
eeb5359c60d3 class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents: 12604
diff changeset
   216
                    ]
eeb5359c60d3 class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents: 12604
diff changeset
   217
                ].
eeb5359c60d3 class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents: 12604
diff changeset
   218
            ]        
eeb5359c60d3 class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents: 12604
diff changeset
   219
        ].
9954
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   220
    ].
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   221
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   222
    super update:aspect with:param from: sender
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   223
10886
8619db59aff4 bug fix in: #update:with:from: (selectedTestCases ivar might be nil)
vrany
parents: 10862
diff changeset
   224
    "Modified: / 20-11-2011 / 12:40:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
11552
23bf4b9973a3 fixes and enhancements:
Claus Gittinger <cg@exept.de>
parents: 11197
diff changeset
   225
    "Modified: / 04-06-2012 / 19:03:34 / cg"
14740
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   226
!
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   227
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   228
updateTestCases
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   229
    allTestCases := ((self selectedClassesHolder value ? #()) 
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   230
                select:[:cls | self isTestCaseLike:cls ]).
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   231
    allTestCases := allTestCases asArray
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   232
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   233
    "Created: / 11-03-2010 / 10:31:45 / Jan Vrany <jan.vrany@fit.cvut.cz>"
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   234
    "Modified: / 24-01-2012 / 22:09:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   235
    "Modified: / 04-06-2012 / 19:02:52 / cg"
9954
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   236
! !
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   237
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   238
!TestRunnerEmbedded methodsFor:'private'!
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   239
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   240
hide
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   241
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   242
    self visibility: false height: 0
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   243
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   244
    "Created: / 11-03-2010 / 09:07:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   245
!
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   246
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   247
show
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   248
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   249
    self visibility: true height: 50
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   250
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   251
    "Created: / 11-03-2010 / 09:07:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   252
!
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   253
10564
4e109c7b8ee8 comment/format in: #visibility:height:
Claus Gittinger <cg@exept.de>
parents: 10563
diff changeset
   254
visibility:visibility height:height 
14727
3c8f4e917e89 Support for detaching embedded test runner to separate, top level tool-like window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14322
diff changeset
   255
    | window container list h|
9954
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   256
14727
3c8f4e917e89 Support for detaching embedded test runner to separate, top level tool-like window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14322
diff changeset
   257
    window := self window.
3c8f4e917e89 Support for detaching embedded test runner to separate, top level tool-like window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14322
diff changeset
   258
    window isNil ifTrue:[ ^ self ].
3c8f4e917e89 Support for detaching embedded test runner to separate, top level tool-like window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14322
diff changeset
   259
    container := self window container.
3c8f4e917e89 Support for detaching embedded test runner to separate, top level tool-like window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14322
diff changeset
   260
    container isNil ifTrue:[ ^ self ].
14322
b742f9db3ddd class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents: 13847
diff changeset
   261
10564
4e109c7b8ee8 comment/format in: #visibility:height:
Claus Gittinger <cg@exept.de>
parents: 10563
diff changeset
   262
    h := visibility ifFalse:[0] ifTrue:[ height ].
4e109c7b8ee8 comment/format in: #visibility:height:
Claus Gittinger <cg@exept.de>
parents: 10563
diff changeset
   263
    container isVisible == visibility ifFalse:[
4e109c7b8ee8 comment/format in: #visibility:height:
Claus Gittinger <cg@exept.de>
parents: 10563
diff changeset
   264
        container isVisible:visibility
4e109c7b8ee8 comment/format in: #visibility:height:
Claus Gittinger <cg@exept.de>
parents: 10563
diff changeset
   265
    ].
14322
b742f9db3ddd class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents: 13847
diff changeset
   266
    "/ this is the kind of dangerous access which breaks, whenever some wrapping setup
b742f9db3ddd class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents: 13847
diff changeset
   267
    "/ changes. Never do this!!!!!!!!
b742f9db3ddd class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents: 13847
diff changeset
   268
    "/ I'd rather see code which refers to the widget by name,
b742f9db3ddd class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents: 13847
diff changeset
   269
    "/ or if there is an explicit setter for the container, from which to steal the space.
9954
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   270
    list := container container subViews first.
10564
4e109c7b8ee8 comment/format in: #visibility:height:
Claus Gittinger <cg@exept.de>
parents: 10563
diff changeset
   271
    (list layout bottomOffset ~= height negated) ifTrue:[
4e109c7b8ee8 comment/format in: #visibility:height:
Claus Gittinger <cg@exept.de>
parents: 10563
diff changeset
   272
        list layout:((list layout)
4e109c7b8ee8 comment/format in: #visibility:height:
Claus Gittinger <cg@exept.de>
parents: 10563
diff changeset
   273
                    bottomOffset:height negated;
4e109c7b8ee8 comment/format in: #visibility:height:
Claus Gittinger <cg@exept.de>
parents: 10563
diff changeset
   274
                    yourself)
4e109c7b8ee8 comment/format in: #visibility:height:
Claus Gittinger <cg@exept.de>
parents: 10563
diff changeset
   275
    ].
9954
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   276
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   277
    "Created: / 11-03-2010 / 09:51:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
14727
3c8f4e917e89 Support for detaching embedded test runner to separate, top level tool-like window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14322
diff changeset
   278
    "Modified: / 22-09-2014 / 13:47:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
9954
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   279
! !
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   280
14740
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   281
!TestRunnerEmbedded methodsFor:'utilities'!
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   282
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   283
suiteForRun
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   284
    "if methods are selected, a suite for those methods is built and returned.
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   285
     If protocoly are selected, a suite for all methods in those protocols
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   286
     is built and returned.
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   287
     Otherwise, a suite for all methods in the class is built and returned"
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   288
    
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   289
    | testMethods protocols suite selectedClass |
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   290
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   291
    selectedClass := self theSingleTestCase.
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   292
    selectedMethodsHolder value notEmptyOrNil ifTrue:[
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   293
        testMethods := self selectedTestMethods.
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   294
        suite := TestSuite named:(self suiteNameFromMethods:testMethods).
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   295
        testMethods do:[:mthd | 
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   296
            | class  selector |
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   297
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   298
            class := selectedClass isNil ifTrue:[mthd mclass] ifFalse:[ selectedClass ].
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   299
            suite addTest:(class asTestCase selector:mthd selector)
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   300
        ].
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   301
        ^ suite
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   302
    ].
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   303
    (protocols := selectedProtocolsHolder value) notEmptyOrNil ifTrue:[
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   304
        suite := TestSuite named:(self suiteNameFromProtocols:protocols).
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   305
        (self selectedTestMethodsFromProtocols:protocols inClass:selectedClass) do:[:mthd | 
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   306
            | class  selector |
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   307
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   308
            class := selectedClass isNil ifTrue:[mthd mclass] ifFalse:[ selectedClass ].
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   309
            suite addTest:(class asTestCase selector:mthd selector)
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   310
        ].
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   311
        ^ suite
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   312
    ].
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   313
    ^ self suiteForRunAll
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   314
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   315
    "Created: / 15-03-2010 / 13:13:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   316
    "Modified: / 04-08-2011 / 19:06:42 / cg"
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   317
    "Modified (format): / 23-09-2014 / 10:19:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   318
!
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   319
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   320
suiteForRunAll
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   321
    |suite|
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   322
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   323
    allTestCases isNil ifTrue:[
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   324
        self updateTestCases.
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   325
    ].
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   326
    suite := TestSuite named:(self suiteNameFromClasses: self allTestCases).
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   327
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   328
    allTestCases do:[:testCase | 
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   329
        suite addTests:(self buildSuiteFromClass:testCase) tests
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   330
    ].
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   331
    ^suite
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   332
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   333
    "Modified: / 04-03-2011 / 06:57:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   334
    "Modified: / 04-06-2012 / 19:01:48 / cg"
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   335
! !
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   336
9954
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   337
!TestRunnerEmbedded class methodsFor:'documentation'!
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   338
10432
6dc553f49d19 comment/format in: #debug
Claus Gittinger <cg@exept.de>
parents: 10431
diff changeset
   339
version
15442
4068936bef58 class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents: 15066
diff changeset
   340
    ^ '$Header: /cvs/stx/stx/libtool/Tools__TestRunnerEmbedded.st,v 1.43 2015-02-27 00:02:29 cg Exp $'
10432
6dc553f49d19 comment/format in: #debug
Claus Gittinger <cg@exept.de>
parents: 10431
diff changeset
   341
!
6dc553f49d19 comment/format in: #debug
Claus Gittinger <cg@exept.de>
parents: 10431
diff changeset
   342
9954
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   343
version_CVS
15442
4068936bef58 class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents: 15066
diff changeset
   344
    ^ '$Header: /cvs/stx/stx/libtool/Tools__TestRunnerEmbedded.st,v 1.43 2015-02-27 00:02:29 cg Exp $'
9954
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   345
! !
12604
8d8912ec9551 class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents: 12055
diff changeset
   346