smalltalk
/
osmo-st-core
Archived
1
0
Fork 0

dispatcher: Add a small testcase for the dispatcher in error conditions

This commit is contained in:
Holger Hans Peter Freyther 2013-02-20 09:38:56 +01:00
parent ced5898a31
commit a01003265b
2 changed files with 17 additions and 0 deletions

View File

@ -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'>

View File

@ -8,6 +8,7 @@
<filein>Timer.st</filein>
<test>
<sunit>Osmo.DispatcherTest</sunit>
<sunit>Osmo.TimerTest</sunit>
<filein>Tests.st</filein>
</test>