Tools__TestRunnerEmbedded.st
author Claus Gittinger <cg@exept.de>
Mon, 20 Jan 2020 21:02:47 +0100
changeset 19422 c6ca1c3e0fd7
parent 19362 6be62dc84771
permissions -rw-r--r--
#REFACTORING by exept class: MultiViewToolApplication added: #askForFile:default:forSave:thenDo: changed: #askForFile:default:thenDo: #askForFile:thenDo: #menuSaveAllAs #menuSaveAs
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
18700
9c0da553a10d #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16997
diff changeset
     1
"{ Encoding: utf8 }"
9c0da553a10d #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16997
diff changeset
     2
19362
6be62dc84771 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 18700
diff changeset
     3
"
6be62dc84771 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 18700
diff changeset
     4
 COPYRIGHT (c) 2018 by eXept Software AG
6be62dc84771 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 18700
diff changeset
     5
              All Rights Reserved
6be62dc84771 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 18700
diff changeset
     6
6be62dc84771 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 18700
diff changeset
     7
 This software is furnished under a license and may be used
6be62dc84771 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 18700
diff changeset
     8
 only in accordance with the terms of that license and with the
6be62dc84771 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 18700
diff changeset
     9
 inclusion of the above copyright notice.   This software may not
6be62dc84771 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 18700
diff changeset
    10
 be provided or otherwise made available to, or used by, any
6be62dc84771 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 18700
diff changeset
    11
 other person.  No title to or ownership of the software is
6be62dc84771 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 18700
diff changeset
    12
 hereby transferred.
6be62dc84771 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 18700
diff changeset
    13
"
9954
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    14
"{ Package: 'stx:libtool' }"
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    15
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    16
"{ NameSpace: Tools }"
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    17
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
    18
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
    19
	instanceVariableNames:''
10647
1e9912f9a0d8 Embedded test runner no longer reuse old testcase instances
vrany
parents: 10608
diff changeset
    20
	classVariableNames:''
1e9912f9a0d8 Embedded test runner no longer reuse old testcase instances
vrany
parents: 10608
diff changeset
    21
	poolDictionaries:''
1e9912f9a0d8 Embedded test runner no longer reuse old testcase instances
vrany
parents: 10608
diff changeset
    22
	category:'SUnit-UI'
9954
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    23
!
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    24
19362
6be62dc84771 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 18700
diff changeset
    25
!TestRunnerEmbedded class methodsFor:'documentation'!
6be62dc84771 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 18700
diff changeset
    26
6be62dc84771 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 18700
diff changeset
    27
copyright
6be62dc84771 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 18700
diff changeset
    28
"
6be62dc84771 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 18700
diff changeset
    29
 COPYRIGHT (c) 2018 by eXept Software AG
6be62dc84771 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 18700
diff changeset
    30
              All Rights Reserved
6be62dc84771 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 18700
diff changeset
    31
6be62dc84771 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 18700
diff changeset
    32
 This software is furnished under a license and may be used
6be62dc84771 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 18700
diff changeset
    33
 only in accordance with the terms of that license and with the
6be62dc84771 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 18700
diff changeset
    34
 inclusion of the above copyright notice.   This software may not
6be62dc84771 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 18700
diff changeset
    35
 be provided or otherwise made available to, or used by, any
6be62dc84771 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 18700
diff changeset
    36
 other person.  No title to or ownership of the software is
6be62dc84771 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 18700
diff changeset
    37
 hereby transferred.
6be62dc84771 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 18700
diff changeset
    38
"
6be62dc84771 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 18700
diff changeset
    39
! !
9954
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    40
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    41
!TestRunnerEmbedded class methodsFor:'plugIn spec'!
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    42
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    43
aspectSelectors
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    44
    "This resource specification was automatically generated
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    45
     by the UIPainter of ST/X."
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    46
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    47
    "Do not manually edit this. If it is corrupted,
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    48
     the UIPainter may not be able to read the specification."
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    49
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    50
    "Return a description of exported aspects;
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    51
     these can be connected to aspects of an embedding application
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    52
     (if this app is embedded in a subCanvas)."
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    53
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    54
    ^ #(
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    55
        #methodGeneratorHolder
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    56
        #selectedClassesHolder
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    57
        #selectedMethodsHolder
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    58
        #selectedProtocolsHolder
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    59
      ).
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    60
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    61
! !
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    62
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    63
!TestRunnerEmbedded methodsFor:'aspects'!
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    64
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    65
methodGeneratorHolder
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    66
    "return/create the 'methodGeneratorHolder' value holder (automatically generated)"
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    67
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    68
    methodGeneratorHolder isNil ifTrue:[
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    69
        methodGeneratorHolder := ValueHolder new.
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    70
        methodGeneratorHolder addDependent:self.
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    71
    ].
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    72
    ^ methodGeneratorHolder
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    73
!
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    74
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    75
methodGeneratorHolder:something
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    76
    "set the 'methodGeneratorHolder' value holder (automatically generated)"
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    77
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    78
    |oldValue newValue|
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    79
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    80
    methodGeneratorHolder notNil ifTrue:[
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    81
        oldValue := methodGeneratorHolder value.
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    82
        methodGeneratorHolder removeDependent:self.
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    83
    ].
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    84
    methodGeneratorHolder := something.
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    85
    methodGeneratorHolder notNil ifTrue:[
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    86
        methodGeneratorHolder addDependent:self.
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    87
    ].
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    88
    newValue := methodGeneratorHolder value.
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    89
    oldValue ~~ newValue ifTrue:[
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    90
        self update:#value with:newValue from:methodGeneratorHolder.
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    91
    ].
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
selectedClassesHolder
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    95
    "return/create the 'selectedClassesHolder' value holder (automatically generated)"
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    96
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    97
    selectedClassesHolder isNil ifTrue:[
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    98
        selectedClassesHolder := ValueHolder new.
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    99
        selectedClassesHolder addDependent:self.
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   100
    ].
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   101
    ^ selectedClassesHolder
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   102
!
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   103
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   104
selectedClassesHolder:something
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   105
    "set the 'selectedClassesHolder' value holder (automatically generated)"
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   106
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   107
    |oldValue newValue|
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   108
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   109
    selectedClassesHolder notNil ifTrue:[
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   110
        oldValue := selectedClassesHolder value.
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   111
        selectedClassesHolder removeDependent:self.
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   112
    ].
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   113
    selectedClassesHolder := something.
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   114
    selectedClassesHolder notNil ifTrue:[
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   115
        selectedClassesHolder addDependent:self.
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   116
    ].
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   117
    newValue := selectedClassesHolder value.
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   118
    oldValue ~~ newValue ifTrue:[
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   119
        self update:#value with:newValue from:selectedClassesHolder.
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   120
    ].
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
selectedMethodsHolder
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   124
    "return/create the 'selectedMethodsHolder' value holder (automatically generated)"
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   125
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   126
    selectedMethodsHolder isNil ifTrue:[
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   127
        selectedMethodsHolder := ValueHolder new.
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   128
        selectedMethodsHolder addDependent:self.
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   129
    ].
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   130
    ^ selectedMethodsHolder
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   131
!
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   132
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   133
selectedMethodsHolder:something
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   134
    "set the 'selectedMethodsHolder' value holder (automatically generated)"
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   135
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   136
    |oldValue newValue|
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   137
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   138
    selectedMethodsHolder notNil ifTrue:[
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   139
        oldValue := selectedMethodsHolder value.
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   140
        selectedMethodsHolder removeDependent:self.
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   141
    ].
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   142
    selectedMethodsHolder := something.
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   143
    selectedMethodsHolder notNil ifTrue:[
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   144
        selectedMethodsHolder addDependent:self.
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   145
    ].
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   146
    newValue := selectedMethodsHolder value.
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   147
    oldValue ~~ newValue ifTrue:[
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   148
        self update:#value with:newValue from:selectedMethodsHolder.
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   149
    ].
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   150
!
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   151
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   152
selectedProtocolsHolder
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   153
    "return/create the 'selectedProtocolsHolder' value holder (automatically generated)"
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   154
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   155
    selectedProtocolsHolder isNil ifTrue:[
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   156
        selectedProtocolsHolder := ValueHolder new.
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   157
        selectedProtocolsHolder addDependent:self.
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   158
    ].
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   159
    ^ selectedProtocolsHolder
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   160
!
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   161
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   162
selectedProtocolsHolder:something
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   163
    "set the 'selectedProtocolsHolder' value holder (automatically generated)"
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   164
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   165
    |oldValue newValue|
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   166
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   167
    selectedProtocolsHolder notNil ifTrue:[
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   168
        oldValue := selectedProtocolsHolder value.
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   169
        selectedProtocolsHolder removeDependent:self.
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   170
    ].
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   171
    selectedProtocolsHolder := something.
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   172
    selectedProtocolsHolder notNil ifTrue:[
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   173
        selectedProtocolsHolder addDependent:self.
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   174
    ].
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   175
    newValue := selectedProtocolsHolder value.
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   176
    oldValue ~~ newValue ifTrue:[
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   177
        self update:#value with:newValue from:selectedProtocolsHolder.
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   178
    ].
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
   179
! !
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
   180
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
   181
!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
   182
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
   183
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
   184
    ^ 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
   185
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
   186
    "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
   187
!
23bf4b9973a3 fixes and enhancements:
Claus Gittinger <cg@exept.de>
parents: 11197
diff changeset
   188
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
   189
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
   190
    ^ true
11552
23bf4b9973a3 fixes and enhancements:
Claus Gittinger <cg@exept.de>
parents: 11197
diff changeset
   191
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
   192
    "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
   193
!
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
   194
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
   195
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
   196
    ^ 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
   197
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
   198
    "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
   199
! !
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   200
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   201
!TestRunnerEmbedded methodsFor:'change & update'!
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   202
14740
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   203
invalidateTestCases
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   204
    allTestCases := nil.
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   205
!
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   206
9954
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   207
update:aspect with:param from: sender
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   208
    "Invoked when an object that I depend upon sends a change notification."
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   209
15442
4068936bef58 class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents: 15066
diff changeset
   210
    sender == selectedMethodsHolder ifTrue:[
18700
9c0da553a10d #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16997
diff changeset
   211
        self enqueueMessage:#updateTestCases.
9c0da553a10d #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16997
diff changeset
   212
        self enqueueMessage:#updateSuiteAndResult.
15442
4068936bef58 class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents: 15066
diff changeset
   213
    ].
4068936bef58 class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents: 15066
diff changeset
   214
9954
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   215
    sender == selectedClassesHolder ifTrue:[
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   216
        self 
11966
6040753eab24 asynchronous update of testSuite and suiteAndResult
Claus Gittinger <cg@exept.de>
parents: 11925
diff changeset
   217
            invalidateTestCases;      "/ updateTestSuite;
6040753eab24 asynchronous update of testSuite and suiteAndResult
Claus Gittinger <cg@exept.de>
parents: 11925
diff changeset
   218
            invalidateSuiteAndResult; "/ updateTestSuiteAndResult;
9954
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   219
            updateVisibility.
15442
4068936bef58 class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents: 15066
diff changeset
   220
12762
eeb5359c60d3 class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents: 12604
diff changeset
   221
        self hasTestCaseSelected ifTrue:[
18700
9c0da553a10d #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16997
diff changeset
   222
            self enqueueMessage:#updateTestCases.
9c0da553a10d #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16997
diff changeset
   223
            self enqueueMessage:#updateSuiteAndResult.
15066
882a4c0b78e5 class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents: 14740
diff changeset
   224
            "/ self enqueueDelayedAction:[ self updateTestCases; updateSuiteAndResult ].
12762
eeb5359c60d3 class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents: 12604
diff changeset
   225
        ].
9954
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   226
         ^ self.
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   227
    ].
12762
eeb5359c60d3 class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents: 12604
diff changeset
   228
    self hasTestCaseSelected ifTrue:[
15066
882a4c0b78e5 class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents: 14740
diff changeset
   229
        (sender == selectedProtocolsHolder 
882a4c0b78e5 class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents: 14740
diff changeset
   230
        or:[ sender == selectedMethodsHolder 
882a4c0b78e5 class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents: 14740
diff changeset
   231
        or:[ sender == methodGeneratorHolder ]]) ifTrue:[
12762
eeb5359c60d3 class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents: 12604
diff changeset
   232
            self invalidateSuiteAndResult. 
18700
9c0da553a10d #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16997
diff changeset
   233
            self enqueueMessage:#updateSuiteAndResult.
12762
eeb5359c60d3 class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents: 12604
diff changeset
   234
            ^self
eeb5359c60d3 class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents: 12604
diff changeset
   235
        ].
eeb5359c60d3 class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents: 12604
diff changeset
   236
eeb5359c60d3 class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents: 12604
diff changeset
   237
        sender == Smalltalk ifTrue:[
eeb5359c60d3 class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents: 12604
diff changeset
   238
            aspect == #lastTestRunResult ifTrue:[
eeb5359c60d3 class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents: 12604
diff changeset
   239
                allTestCases notNil ifTrue:[
eeb5359c60d3 class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents: 12604
diff changeset
   240
                    (allTestCases includesIdentical: param first) ifTrue:[
eeb5359c60d3 class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents: 12604
diff changeset
   241
                        self invalidateSuiteAndResult. "/ updateTestSuiteAndResult.
18700
9c0da553a10d #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16997
diff changeset
   242
                        self enqueueMessage:#updateSuiteAndResult.
12762
eeb5359c60d3 class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents: 12604
diff changeset
   243
                        ^self        
eeb5359c60d3 class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents: 12604
diff changeset
   244
                    ]
eeb5359c60d3 class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents: 12604
diff changeset
   245
                ].
eeb5359c60d3 class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents: 12604
diff changeset
   246
            ]        
eeb5359c60d3 class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents: 12604
diff changeset
   247
        ].
9954
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   248
    ].
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   249
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   250
    super update:aspect with:param from: sender
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   251
10886
8619db59aff4 bug fix in: #update:with:from: (selectedTestCases ivar might be nil)
vrany
parents: 10862
diff changeset
   252
    "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
   253
    "Modified: / 04-06-2012 / 19:03:34 / cg"
18700
9c0da553a10d #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16997
diff changeset
   254
    "Modified: / 16-03-2019 / 14:18:30 / Claus Gittinger"
14740
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   255
!
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   256
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   257
updateTestCases
15462
3ecc5183f23a class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents: 15442
diff changeset
   258
    |classes|
3ecc5183f23a class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents: 15442
diff changeset
   259
3ecc5183f23a class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents: 15442
diff changeset
   260
    classes := (self selectedClassesHolder value ? #()) 
3ecc5183f23a class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents: 15442
diff changeset
   261
                    select:[:cls | self isTestCaseLike:cls ] as:Set.
3ecc5183f23a class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents: 15442
diff changeset
   262
    classes addAll:((self selectedMethodsHolder value ? #()) 
3ecc5183f23a class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents: 15442
diff changeset
   263
                    collect:[:mthd | mthd mclass ]
3ecc5183f23a class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents: 15442
diff changeset
   264
                    thenSelect:[:cls | self isTestCaseLike:cls ]).
16997
747bd6517167 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 15477
diff changeset
   265
    allTestCases := classes asArray.
747bd6517167 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 15477
diff changeset
   266
    allTestCases sortBySelector:#name.
14740
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   267
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   268
    "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
   269
    "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
   270
    "Modified: / 04-06-2012 / 19:02:52 / cg"
9954
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   271
! !
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   272
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   273
!TestRunnerEmbedded methodsFor:'private'!
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   274
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   275
hide
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   276
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   277
    self visibility: false height: 0
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   278
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   279
    "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
   280
!
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   281
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   282
show
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   283
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   284
    self visibility: true height: 50
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   285
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   286
    "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
   287
!
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   288
10564
4e109c7b8ee8 comment/format in: #visibility:height:
Claus Gittinger <cg@exept.de>
parents: 10563
diff changeset
   289
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
   290
    | window container list h|
9954
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   291
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
   292
    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
   293
    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
   294
    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
   295
    container isNil ifTrue:[ ^ self ].
14322
b742f9db3ddd class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents: 13847
diff changeset
   296
10564
4e109c7b8ee8 comment/format in: #visibility:height:
Claus Gittinger <cg@exept.de>
parents: 10563
diff changeset
   297
    h := visibility ifFalse:[0] ifTrue:[ height ].
4e109c7b8ee8 comment/format in: #visibility:height:
Claus Gittinger <cg@exept.de>
parents: 10563
diff changeset
   298
    container isVisible == visibility ifFalse:[
4e109c7b8ee8 comment/format in: #visibility:height:
Claus Gittinger <cg@exept.de>
parents: 10563
diff changeset
   299
        container isVisible:visibility
4e109c7b8ee8 comment/format in: #visibility:height:
Claus Gittinger <cg@exept.de>
parents: 10563
diff changeset
   300
    ].
14322
b742f9db3ddd class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents: 13847
diff changeset
   301
    "/ 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
   302
    "/ changes. Never do this!!!!!!!!
b742f9db3ddd class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents: 13847
diff changeset
   303
    "/ 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
   304
    "/ 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
   305
    list := container container subViews first.
10564
4e109c7b8ee8 comment/format in: #visibility:height:
Claus Gittinger <cg@exept.de>
parents: 10563
diff changeset
   306
    (list layout bottomOffset ~= height negated) ifTrue:[
4e109c7b8ee8 comment/format in: #visibility:height:
Claus Gittinger <cg@exept.de>
parents: 10563
diff changeset
   307
        list layout:((list layout)
4e109c7b8ee8 comment/format in: #visibility:height:
Claus Gittinger <cg@exept.de>
parents: 10563
diff changeset
   308
                    bottomOffset:height negated;
4e109c7b8ee8 comment/format in: #visibility:height:
Claus Gittinger <cg@exept.de>
parents: 10563
diff changeset
   309
                    yourself)
4e109c7b8ee8 comment/format in: #visibility:height:
Claus Gittinger <cg@exept.de>
parents: 10563
diff changeset
   310
    ].
9954
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   311
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   312
    "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
   313
    "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
   314
! !
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   315
14740
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   316
!TestRunnerEmbedded methodsFor:'utilities'!
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   317
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   318
suiteForRun
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   319
    "if methods are selected, a suite for those methods is built and returned.
15477
b628707db922 class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents: 15462
diff changeset
   320
     If protocols are selected, a suite for all methods in those protocols
14740
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   321
     is built and returned.
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   322
     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
   323
    
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   324
    | testMethods protocols suite selectedClass |
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
    selectedClass := self theSingleTestCase.
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   327
    selectedMethodsHolder value notEmptyOrNil ifTrue:[
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   328
        testMethods := self selectedTestMethods.
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   329
        suite := TestSuite named:(self suiteNameFromMethods:testMethods).
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   330
        testMethods do:[:mthd | 
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   331
            | class  selector |
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
            class := selectedClass isNil ifTrue:[mthd mclass] ifFalse:[ selectedClass ].
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   334
            suite addTest:(class asTestCase selector:mthd selector)
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
        ^ suite
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   337
    ].
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   338
    (protocols := selectedProtocolsHolder value) notEmptyOrNil ifTrue:[
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   339
        suite := TestSuite named:(self suiteNameFromProtocols:protocols).
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   340
        (self selectedTestMethodsFromProtocols:protocols inClass:selectedClass) do:[:mthd | 
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   341
            | class  selector |
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   342
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   343
            class := selectedClass isNil ifTrue:[mthd mclass] ifFalse:[ selectedClass ].
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   344
            suite addTest:(class asTestCase selector:mthd selector)
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   345
        ].
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   346
        ^ suite
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   347
    ].
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   348
    ^ self suiteForRunAll
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   349
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   350
    "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
   351
    "Modified: / 04-08-2011 / 19:06:42 / cg"
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   352
    "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
   353
!
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   354
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   355
suiteForRunAll
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   356
    |suite|
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   357
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   358
    allTestCases isNil ifTrue:[
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   359
        self updateTestCases.
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   360
    ].
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   361
    suite := TestSuite named:(self suiteNameFromClasses: self allTestCases).
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   362
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   363
    allTestCases do:[:testCase | 
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   364
        suite addTests:(self buildSuiteFromClass:testCase) tests
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   365
    ].
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   366
    ^suite
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   367
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   368
    "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
   369
    "Modified: / 04-06-2012 / 19:01:48 / cg"
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   370
! !
920b279e215c Oops, fixes after refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14729
diff changeset
   371
9954
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   372
!TestRunnerEmbedded class methodsFor:'documentation'!
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   373
10432
6dc553f49d19 comment/format in: #debug
Claus Gittinger <cg@exept.de>
parents: 10431
diff changeset
   374
version
16997
747bd6517167 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 15477
diff changeset
   375
    ^ '$Header$'
10432
6dc553f49d19 comment/format in: #debug
Claus Gittinger <cg@exept.de>
parents: 10431
diff changeset
   376
!
6dc553f49d19 comment/format in: #debug
Claus Gittinger <cg@exept.de>
parents: 10431
diff changeset
   377
9954
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   378
version_CVS
16997
747bd6517167 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 15477
diff changeset
   379
    ^ '$Header$'
9954
aebf22e17733 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   380
! !
12604
8d8912ec9551 class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents: 12055
diff changeset
   381