dispatcher: Add a small testcase for the dispatcher in error conditions
This commit is contained in:
parent
ced5898a31
commit
a01003265b
16
Tests.st
16
Tests.st
|
@ -16,6 +16,22 @@
|
|||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
"
|
||||
|
||||
TestCase subclass: DispatcherTest [
|
||||
<category: 'OsmoCore-Tests'>
|
||||
|
||||
testDispatcher [
|
||||
| sem |
|
||||
sem := Semaphore new.
|
||||
|
||||
self assert: sem signals = 0.
|
||||
"Force a debugger or some abortion? And a log message"
|
||||
OsmoDispatcher dispatchBlock: [123 unknownMessageForSmallInteger].
|
||||
OsmoDispatcher dispatchBlock: [Processor activeProcess terminate].
|
||||
OsmoDispatcher dispatchBlock: [sem signal].
|
||||
self assert: sem signals = 1.
|
||||
]
|
||||
]
|
||||
|
||||
TestCase subclass: TimerTest [
|
||||
<category: 'OsmoCore-Tests'>
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
<filein>Timer.st</filein>
|
||||
|
||||
<test>
|
||||
<sunit>Osmo.DispatcherTest</sunit>
|
||||
<sunit>Osmo.TimerTest</sunit>
|
||||
<filein>Tests.st</filein>
|
||||
</test>
|
||||
|
|
Reference in New Issue