Actually added missing tests this time?
This commit is contained in:
parent
de470d6c33
commit
aa7176e798
@ -14,3 +14,23 @@ CounterTest >> testCountIsSetAndRead [
|
||||
c count: 7.
|
||||
self assert: c count equals: 7.
|
||||
]
|
||||
|
||||
{ #category : #tests }
|
||||
CounterTest >> testDecrement [
|
||||
self assert: (Counter new count: 2 ; decrement ; decrement) count equals: 0
|
||||
]
|
||||
|
||||
{ #category : #tests }
|
||||
CounterTest >> testIncrement [
|
||||
self assert: (Counter new increment; increment) count equals: 2
|
||||
]
|
||||
|
||||
{ #category : #tests }
|
||||
CounterTest >> testInitialize [
|
||||
self assert: (Counter new count) equals: 0
|
||||
]
|
||||
|
||||
{ #category : #tests }
|
||||
CounterTest >> testPrintOn [
|
||||
self assert: (Counter new printString) equals: 'a Counter with value: 0'
|
||||
]
|
||||
|
||||
@ -31,7 +31,7 @@ Counter >> count [
|
||||
Counter >> count: val [
|
||||
"sets the counter to a specific value"
|
||||
count := val.
|
||||
^ val
|
||||
^ self
|
||||
|
||||
]
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user