RegressionTests__Helper.st
author sr
Wed, 15 Nov 2017 16:41:47 +0100
changeset 1890 9367c7639c2d
parent 1885 28600545d805
child 1917 46bcef094b5d
permissions -rw-r--r--
removed not existing Class from project definition

"{ Encoding: utf8 }"

"{ Package: 'stx:goodies/regression' }"

"{ NameSpace: RegressionTests }"

Object subclass:#Helper
	instanceVariableNames:''
	classVariableNames:''
	poolDictionaries:''
	category:'tests-Regression-Helper'
!

!Helper class methodsFor:'documentation'!

documentation
"
    documentation to be added.

    [author:]
        sr

    [instance variables:]

    [class variables:]

    [see also:]

"
! !

!Helper class methodsFor:'queries'!

isStcCompiledMethod:aMethod
    in:instance

    ^ self 
        isStcCompiledMethod:aMethod
        inClass:instance class
!

isStcCompiledMethod:aMethod
    inClass:aClass

    |compiledMethod|

    compiledMethod := aClass compiledMethodAt:aMethod.

    ^ (compiledMethod notNil 
    and:[compiledMethod byteCode isNil])
!

packageDirectoryForRegressionTests
    ^ self workDirectory / 'stx' / 'goodies' / 'regression'     
!

smalltalkDirectory
    ^ self workDirectory / 'stx' / 'projects' / 'smalltalk'     
!

workDirectory
    |directoryOfStandaloneBinary|

    directoryOfStandaloneBinary := OperatingSystem nameOfSTXExecutable asFilename directory.
    (directoryOfStandaloneBinary pathName includesSubString:'quickSelfTest') ifTrue:[
        "this test is called by /stx/goodies/builder/quickSelfTest"
        ^ directoryOfStandaloneBinary directory directory directory directory
    ].

    ^ directoryOfStandaloneBinary directory directory directory 
! !

!Helper class methodsFor:'documentation'!

version
    ^ '$Header$'
!

version_CVS
    ^ '$Header$'
! !