diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2013-02-20 09:38:56 +0100 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2013-02-20 09:38:56 +0100 |
commit | a01003265bf80a7335b54e697cfaa5bf3d8e561a (patch) | |
tree | 803479274be4b31a370ed9c2a2c342ffb5e987dc | |
parent | ced5898a3146bf53e7ccfe377d431ea59e368e1d (diff) |
dispatcher: Add a small testcase for the dispatcher in error conditions
-rw-r--r-- | Tests.st | 16 | ||||
-rw-r--r-- | package.xml | 1 |
2 files changed, 17 insertions, 0 deletions
@@ -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'> diff --git a/package.xml b/package.xml index 7e270b5..4dbdc45 100644 --- a/package.xml +++ b/package.xml @@ -8,6 +8,7 @@ <filein>Timer.st</filein> <test> + <sunit>Osmo.DispatcherTest</sunit> <sunit>Osmo.TimerTest</sunit> <filein>Tests.st</filein> </test> |