TestCaseOutcome.st
author Claus Gittinger <cg@exept.de>
Wed, 29 May 2019 01:12:49 +0200
changeset 747 1dcb53cf964d
parent 741 5385d22dcc62
permissions -rw-r--r--
#FEATURE by cg class: TestCase added: #invokeTestMethod changed: #performTest support timeout annotation
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
741
5385d22dcc62 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 736
diff changeset
     1
"{ Encoding: utf8 }"
5385d22dcc62 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 736
diff changeset
     2
360
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
     3
"{ Package: 'stx:goodies/sunit' }"
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
     4
610
756214d7dcca class: TestCaseOutcome
Claus Gittinger <cg@exept.de>
parents: 589
diff changeset
     5
"{ NameSpace: Smalltalk }"
756214d7dcca class: TestCaseOutcome
Claus Gittinger <cg@exept.de>
parents: 589
diff changeset
     6
360
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
     7
Object subclass:#TestCaseOutcome
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
     8
	instanceVariableNames:'testCase result properties'
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
     9
	classVariableNames:''
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
    10
	poolDictionaries:''
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
    11
	category:'SUnit-Base'
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
    12
!
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
    13
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
    14
!TestCaseOutcome class methodsFor:'documentation'!
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
    15
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
    16
documentation
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
    17
"
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
    18
    will keep additional info for a testCase run:
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
    19
        startTime, endTime,
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
    20
        backtrace (if fail or error)
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
    21
        and collectedStdout
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
    22
"
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
    23
! !
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
    24
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
    25
!TestCaseOutcome class methodsFor:'instance creation'!
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
    26
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
    27
forCase: aTestCase
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
    28
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
    29
    ^self new testCase: aTestCase; yourself
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
    30
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
    31
    "Created: / 16-08-2011 / 15:24:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
    32
! !
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
    33
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
    34
!TestCaseOutcome methodsFor:'accessing'!
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
    35
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
    36
collectedOutput
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
    37
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
    38
    ^self propertyAt: #collectedOutput
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
    39
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
    40
    "Modified: / 16-08-2011 / 15:27:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
    41
    "Created: / 16-08-2011 / 18:19:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
    42
!
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
    43
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
    44
collectedOutput: aString
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
    45
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
    46
    ^self propertyAt: #collectedOutput put: aString
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
    47
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
    48
    "Modified: / 16-08-2011 / 15:28:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
    49
    "Created: / 16-08-2011 / 18:19:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
    50
!
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
    51
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
    52
endTime
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
    53
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
    54
    ^self propertyAt: #endTime
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
    55
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
    56
    "Modified: / 16-08-2011 / 15:28:43 / Jan Vrany <jan.vrany@fit.cvut.cz>"
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
    57
!
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
    58
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
    59
endTime: anObject
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
    60
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
    61
    ^self propertyAt: #endTime put: anObject
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
    62
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
    63
    "Modified: / 16-08-2011 / 15:28:57 / Jan Vrany <jan.vrany@fit.cvut.cz>"
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
    64
!
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
    65
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
    66
exceptionDetail
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
    67
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
    68
    ^self propertyAt: #exceptionDetail
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
    69
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
    70
    "Modified: / 16-08-2011 / 15:29:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
    71
!
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
    72
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
    73
exceptionDetail: anObject
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
    74
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
    75
    ^self propertyAt: #exceptionDetail put: anObject
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
    76
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
    77
    "Modified: / 16-08-2011 / 15:29:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
    78
!
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
    79
379
065605384740 added: #executionTime
Claus Gittinger <cg@exept.de>
parents: 360
diff changeset
    80
executionTime
741
5385d22dcc62 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 736
diff changeset
    81
    "the execution time in millis; 
5385d22dcc62 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 736
diff changeset
    82
     nil if not yet executed.
5385d22dcc62 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 736
diff changeset
    83
     If still running, the millis spent executing 
5385d22dcc62 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 736
diff changeset
    84
     is returned"
379
065605384740 added: #executionTime
Claus Gittinger <cg@exept.de>
parents: 360
diff changeset
    85
065605384740 added: #executionTime
Claus Gittinger <cg@exept.de>
parents: 360
diff changeset
    86
    |startTime endTime|
065605384740 added: #executionTime
Claus Gittinger <cg@exept.de>
parents: 360
diff changeset
    87
065605384740 added: #executionTime
Claus Gittinger <cg@exept.de>
parents: 360
diff changeset
    88
    (startTime := self startTime) isNil ifTrue:[
065605384740 added: #executionTime
Claus Gittinger <cg@exept.de>
parents: 360
diff changeset
    89
        "/ not yet executed
065605384740 added: #executionTime
Claus Gittinger <cg@exept.de>
parents: 360
diff changeset
    90
        ^ nil
065605384740 added: #executionTime
Claus Gittinger <cg@exept.de>
parents: 360
diff changeset
    91
    ].
065605384740 added: #executionTime
Claus Gittinger <cg@exept.de>
parents: 360
diff changeset
    92
    (endTime := self endTime) isNil ifTrue:[
065605384740 added: #executionTime
Claus Gittinger <cg@exept.de>
parents: 360
diff changeset
    93
        "/ assume it is still running...
065605384740 added: #executionTime
Claus Gittinger <cg@exept.de>
parents: 360
diff changeset
    94
        endTime := Timestamp now
065605384740 added: #executionTime
Claus Gittinger <cg@exept.de>
parents: 360
diff changeset
    95
    ].
589
b7cd9f791bb1 class: TestCaseOutcome
Claus Gittinger <cg@exept.de>
parents: 488
diff changeset
    96
    ^ (endTime millisecondDeltaFrom:startTime)
379
065605384740 added: #executionTime
Claus Gittinger <cg@exept.de>
parents: 360
diff changeset
    97
065605384740 added: #executionTime
Claus Gittinger <cg@exept.de>
parents: 360
diff changeset
    98
    "Modified (format): / 18-08-2011 / 21:02:28 / cg"
741
5385d22dcc62 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 736
diff changeset
    99
    "Modified (comment): / 28-03-2019 / 13:29:02 / Claus Gittinger"
5385d22dcc62 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 736
diff changeset
   100
!
5385d22dcc62 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 736
diff changeset
   101
5385d22dcc62 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 736
diff changeset
   102
executionTimeDuration
5385d22dcc62 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 736
diff changeset
   103
    "the execution time as TimeDuration; 
5385d22dcc62 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 736
diff changeset
   104
     nil if not yet executed.
5385d22dcc62 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 736
diff changeset
   105
     If still running, the time spent executing 
5385d22dcc62 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 736
diff changeset
   106
     is returned"
5385d22dcc62 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 736
diff changeset
   107
5385d22dcc62 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 736
diff changeset
   108
    |startTime endTime|
5385d22dcc62 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 736
diff changeset
   109
5385d22dcc62 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 736
diff changeset
   110
    (startTime := self startTime) isNil ifTrue:[
5385d22dcc62 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 736
diff changeset
   111
        "/ not yet executed
5385d22dcc62 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 736
diff changeset
   112
        ^ nil
5385d22dcc62 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 736
diff changeset
   113
    ].
5385d22dcc62 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 736
diff changeset
   114
    (endTime := self endTime) isNil ifTrue:[
5385d22dcc62 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 736
diff changeset
   115
        "/ assume it is still running...
5385d22dcc62 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 736
diff changeset
   116
        endTime := Timestamp now
5385d22dcc62 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 736
diff changeset
   117
    ].
5385d22dcc62 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 736
diff changeset
   118
    ^ (endTime - startTime)
5385d22dcc62 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 736
diff changeset
   119
5385d22dcc62 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 736
diff changeset
   120
    "Created: / 28-03-2019 / 13:28:53 / Claus Gittinger"
379
065605384740 added: #executionTime
Claus Gittinger <cg@exept.de>
parents: 360
diff changeset
   121
!
065605384740 added: #executionTime
Claus Gittinger <cg@exept.de>
parents: 360
diff changeset
   122
360
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
   123
propertyAt: aSymbol
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
   124
379
065605384740 added: #executionTime
Claus Gittinger <cg@exept.de>
parents: 360
diff changeset
   125
    ^ self propertyAt: aSymbol ifAbsent: [nil]
360
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
   126
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
   127
    "Created: / 16-08-2011 / 15:26:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
379
065605384740 added: #executionTime
Claus Gittinger <cg@exept.de>
parents: 360
diff changeset
   128
    "Modified: / 18-08-2011 / 21:03:01 / cg"
360
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
   129
!
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
   130
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
   131
propertyAt: aSymbol ifAbsent: aBlock
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
   132
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
   133
    properties isNil ifTrue: [^aBlock value].
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
   134
    ^properties at: aSymbol ifAbsent:aBlock.
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
   135
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
   136
    "Created: / 16-08-2011 / 15:27:00 / Jan Vrany <jan.vrany@fit.cvut.cz>"
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
   137
!
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
   138
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
   139
propertyAt: aSymbol put: anObject
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
   140
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
   141
    properties isNil ifTrue: [properties := Dictionary new].
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
   142
    properties at: aSymbol put: anObject.
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
   143
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
   144
    "Created: / 16-08-2011 / 15:28:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
   145
!
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
   146
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
   147
result
736
481186cd77cf #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 662
diff changeset
   148
    "returns one of that state symbols:
481186cd77cf #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 662
diff changeset
   149
     (see stateNames on the class side)"
481186cd77cf #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 662
diff changeset
   150
     
360
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
   151
    ^ result
736
481186cd77cf #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 662
diff changeset
   152
481186cd77cf #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 662
diff changeset
   153
    "Modified (comment): / 28-03-2019 / 11:29:15 / Claus Gittinger"
360
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
   154
!
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
   155
419
e2eb2ab5b937 Lost methods
vrany
parents: 379
diff changeset
   156
result:aSymbol
736
481186cd77cf #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 662
diff changeset
   157
    "sets my state symbol (see TestResult stateNames for valid names)"
481186cd77cf #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 662
diff changeset
   158
481186cd77cf #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 662
diff changeset
   159
    self assert:(TestResult stateNames includes:aSymbol)
481186cd77cf #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 662
diff changeset
   160
         message:'invalid result state'.
481186cd77cf #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 662
diff changeset
   161
419
e2eb2ab5b937 Lost methods
vrany
parents: 379
diff changeset
   162
    result := aSymbol.
e2eb2ab5b937 Lost methods
vrany
parents: 379
diff changeset
   163
e2eb2ab5b937 Lost methods
vrany
parents: 379
diff changeset
   164
    "Modified: / 20-08-2011 / 12:52:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
736
481186cd77cf #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 662
diff changeset
   165
    "Modified (comment): / 28-03-2019 / 11:30:38 / Claus Gittinger"
360
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
   166
!
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
   167
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
   168
selector
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
   169
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
   170
    ^testCase selector
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
   171
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
   172
    "Created: / 16-08-2011 / 15:38:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
   173
!
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
   174
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
   175
startTime
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
   176
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
   177
    ^self propertyAt: #startTime
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
   178
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
   179
    "Modified: / 16-08-2011 / 15:29:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
   180
!
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
   181
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
   182
startTime: anObject
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
   183
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
   184
    ^self propertyAt: #startTime put: anObject
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
   185
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
   186
    "Modified: / 16-08-2011 / 15:29:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
   187
!
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
   188
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
   189
testCase
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
   190
    ^ testCase
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
   191
!
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
   192
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
   193
testCase:something
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
   194
    testCase := something.
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
   195
! !
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
   196
419
e2eb2ab5b937 Lost methods
vrany
parents: 379
diff changeset
   197
!TestCaseOutcome methodsFor:'comparing'!
e2eb2ab5b937 Lost methods
vrany
parents: 379
diff changeset
   198
e2eb2ab5b937 Lost methods
vrany
parents: 379
diff changeset
   199
= anotherOutcome
610
756214d7dcca class: TestCaseOutcome
Claus Gittinger <cg@exept.de>
parents: 589
diff changeset
   200
    |myTestCase otherTestCase|
419
e2eb2ab5b937 Lost methods
vrany
parents: 379
diff changeset
   201
e2eb2ab5b937 Lost methods
vrany
parents: 379
diff changeset
   202
    ^(anotherOutcome isKindOf: self class) 
610
756214d7dcca class: TestCaseOutcome
Claus Gittinger <cg@exept.de>
parents: 589
diff changeset
   203
        and:[(myTestCase := self testCase) class == (otherTestCase := anotherOutcome testCase) class
756214d7dcca class: TestCaseOutcome
Claus Gittinger <cg@exept.de>
parents: 589
diff changeset
   204
            and:[myTestCase selector == otherTestCase selector]].
419
e2eb2ab5b937 Lost methods
vrany
parents: 379
diff changeset
   205
e2eb2ab5b937 Lost methods
vrany
parents: 379
diff changeset
   206
    "Created: / 20-08-2011 / 14:24:39 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e2eb2ab5b937 Lost methods
vrany
parents: 379
diff changeset
   207
!
e2eb2ab5b937 Lost methods
vrany
parents: 379
diff changeset
   208
e2eb2ab5b937 Lost methods
vrany
parents: 379
diff changeset
   209
hash
e2eb2ab5b937 Lost methods
vrany
parents: 379
diff changeset
   210
e2eb2ab5b937 Lost methods
vrany
parents: 379
diff changeset
   211
    ^testCase hash bitXor: result hash
e2eb2ab5b937 Lost methods
vrany
parents: 379
diff changeset
   212
e2eb2ab5b937 Lost methods
vrany
parents: 379
diff changeset
   213
    "Created: / 20-08-2011 / 14:23:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e2eb2ab5b937 Lost methods
vrany
parents: 379
diff changeset
   214
! !
e2eb2ab5b937 Lost methods
vrany
parents: 379
diff changeset
   215
589
b7cd9f791bb1 class: TestCaseOutcome
Claus Gittinger <cg@exept.de>
parents: 488
diff changeset
   216
!TestCaseOutcome methodsFor:'printing & storing'!
b7cd9f791bb1 class: TestCaseOutcome
Claus Gittinger <cg@exept.de>
parents: 488
diff changeset
   217
b7cd9f791bb1 class: TestCaseOutcome
Claus Gittinger <cg@exept.de>
parents: 488
diff changeset
   218
printOn:aStream
662
6c625b63db5c #OTHER by mawalch
mawalch
parents: 610
diff changeset
   219
    "append a printed representation of the receiver to the argument, aStream"
589
b7cd9f791bb1 class: TestCaseOutcome
Claus Gittinger <cg@exept.de>
parents: 488
diff changeset
   220
b7cd9f791bb1 class: TestCaseOutcome
Claus Gittinger <cg@exept.de>
parents: 488
diff changeset
   221
    super printOn:aStream.
b7cd9f791bb1 class: TestCaseOutcome
Claus Gittinger <cg@exept.de>
parents: 488
diff changeset
   222
    aStream nextPut:$(.
b7cd9f791bb1 class: TestCaseOutcome
Claus Gittinger <cg@exept.de>
parents: 488
diff changeset
   223
    testCase printOn: aStream.
b7cd9f791bb1 class: TestCaseOutcome
Claus Gittinger <cg@exept.de>
parents: 488
diff changeset
   224
    aStream nextPut:$).
b7cd9f791bb1 class: TestCaseOutcome
Claus Gittinger <cg@exept.de>
parents: 488
diff changeset
   225
b7cd9f791bb1 class: TestCaseOutcome
Claus Gittinger <cg@exept.de>
parents: 488
diff changeset
   226
    "Modified: / 17-07-2013 / 17:59:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
b7cd9f791bb1 class: TestCaseOutcome
Claus Gittinger <cg@exept.de>
parents: 488
diff changeset
   227
! !
b7cd9f791bb1 class: TestCaseOutcome
Claus Gittinger <cg@exept.de>
parents: 488
diff changeset
   228
419
e2eb2ab5b937 Lost methods
vrany
parents: 379
diff changeset
   229
!TestCaseOutcome methodsFor:'remembering'!
e2eb2ab5b937 Lost methods
vrany
parents: 379
diff changeset
   230
e2eb2ab5b937 Lost methods
vrany
parents: 379
diff changeset
   231
remember
e2eb2ab5b937 Lost methods
vrany
parents: 379
diff changeset
   232
e2eb2ab5b937 Lost methods
vrany
parents: 379
diff changeset
   233
    ^testCase class rememberOutcome: self.
e2eb2ab5b937 Lost methods
vrany
parents: 379
diff changeset
   234
e2eb2ab5b937 Lost methods
vrany
parents: 379
diff changeset
   235
    "Created: / 20-08-2011 / 12:45:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e2eb2ab5b937 Lost methods
vrany
parents: 379
diff changeset
   236
! !
e2eb2ab5b937 Lost methods
vrany
parents: 379
diff changeset
   237
360
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
   238
!TestCaseOutcome class methodsFor:'documentation'!
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
   239
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
   240
version_CVS
662
6c625b63db5c #OTHER by mawalch
mawalch
parents: 610
diff changeset
   241
    ^ '$Header$'
360
57c87e624dc6 initial checkin
vrany
parents:
diff changeset
   242
! !
589
b7cd9f791bb1 class: TestCaseOutcome
Claus Gittinger <cg@exept.de>
parents: 488
diff changeset
   243