RegressionTests__SemaphoreTest.st
author Stefan Vogel <sv@exept.de>
Tue, 11 Jun 2019 10:34:41 +0200
changeset 2321 32ea6329f5ad
parent 2051 62ebd7e42570
permissions -rw-r--r--
class: stx_goodies_regression class changed: #classNamesAndAttributes make classes autoloaded that stc cannot compile (yet)
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1447
2351db93aa5b package changes
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
     1
"{ Package: 'stx:goodies/regression' }"
223
6df67eb3f53c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     2
6df67eb3f53c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     3
"{ NameSpace: RegressionTests }"
6df67eb3f53c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     4
6df67eb3f53c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     5
TestCase subclass:#SemaphoreTest
6df67eb3f53c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     6
	instanceVariableNames:''
6df67eb3f53c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     7
	classVariableNames:''
6df67eb3f53c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     8
	poolDictionaries:''
2051
62ebd7e42570 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 1447
diff changeset
     9
	category:'tests-Regression-Processes'
223
6df67eb3f53c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    10
!
6df67eb3f53c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    11
6df67eb3f53c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    12
6df67eb3f53c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    13
!SemaphoreTest methodsFor:'tests'!
6df67eb3f53c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    14
6df67eb3f53c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    15
testSpeed01
6df67eb3f53c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    16
    |s t|
6df67eb3f53c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    17
6df67eb3f53c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    18
    s := Semaphore forMutualExclusion.
6df67eb3f53c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    19
    t := Time millisecondsToRun:[
6df67eb3f53c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    20
       1000000 timesRepeat:[ s critical:[1+1] ]
6df67eb3f53c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    21
    ].
6df67eb3f53c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    22
    Transcript showCR:t
6df67eb3f53c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    23
6df67eb3f53c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    24
    "
6df67eb3f53c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    25
     self run:#testSpeed01
6df67eb3f53c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    26
    "
6df67eb3f53c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    27
! !
6df67eb3f53c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    28
6df67eb3f53c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    29
!SemaphoreTest class methodsFor:'documentation'!
6df67eb3f53c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    30
6df67eb3f53c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    31
version
6df67eb3f53c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    32
    ^ '$Header$'
6df67eb3f53c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    33
! !
2051
62ebd7e42570 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 1447
diff changeset
    34