tests/stx_libjava_tests.st
author Claus Gittinger <cg@exept.de>
Sat, 27 Oct 2018 08:43:11 +0200
branchcvs_MAIN
changeset 3859 0c49a3597caa
parent 3336 08a79331ec58
child 3370 0d56a220d44c
permissions -rw-r--r--
#BUGFIX by cg class: JavaScannerBase class removed: #scanNumberFrom:

"{ Package: 'stx:libjava/tests' }"

"{ NameSpace: Smalltalk }"

LibraryDefinition subclass:#stx_libjava_tests
	instanceVariableNames:''
	classVariableNames:''
	poolDictionaries:''
	category:'* Projects & Packages *'
!


!stx_libjava_tests class methodsFor:'accessing - tests'!

excludedFromTestSuite  
    "List of testcases and/or tests excluded from testsuite.
     Entries maybe ClassName or #(ClassName testName)
    "
    ^ #(
        LookupTests
    )

    "Created: / 03-06-2011 / 17:04:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

testSuite

    | suite javaTestCases stTests |
    suite := super testSuite.
    stTests := suite tests.
    suite := TestSuite new.
    suite name: self package.
    JavaTestsLoader load.

    javaTestCases := OrderedCollection new.

    Java allClassesDo:
        [:jclass|
        (jclass binaryName ~~ #'stx/libjava/tests/JUnit3Tests'
            and:[jclass binaryName ~~  #'stx/libjava/tests/JUnit4Tests'
                and:[jclass isTestCaseLike]])
                    ifTrue:
                        [ | tc |
                        tc := jclass asTestCase.
                        tc isAbstract ifFalse:[javaTestCases add:tc ]]].

    javaTestCases do:
                [:each | 
                suite addTests:each buildSuite tests ].


    suite tests addAll: stTests.

    suite tests withIndexDo:
        [:t :i|
        Stdout nextPutAll: i printString; space; nextPutAll: t printString; cr].

    Java dumpConfigOn: Stdout.
    ^suite

    "
        stx_libjava testSuite

    "

    "Created: / 07-05-2011 / 19:58:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    "Modified: / 04-06-2011 / 17:23:05 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
    "Modified: / 08-02-2013 / 10:24:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !

!stx_libjava_tests class methodsFor:'description'!

excludedFromPreRequisites
    "list packages which are to be explicitely excluded from the automatic constructed
     prerequisites list. If empty, everything that is found along the inheritance of any of
     my classes is considered to be a prerequisite package."

    ^ #(
    )
!

mandatoryPreRequisites
    "list packages which are mandatory as a prerequisite.
     This are packages containing superclasses of my classes and classes which
     are extended by myself.
     They are mandatory, because we need these packages as a prerequisite for loading and compiling.
     This method is generated automatically,
     by searching along the inheritance chain of all of my classes."

    ^ #(
        #'stx:libbasic'    "LibraryDefinition - superclass of stx_libjava_tests"
    )
!

referencedPreRequisites
    "list packages which are a prerequisite, because they contain
     classes which are referenced by my classes.
     We do not need these packages as a prerequisite for loading or compiling.
     This method is generated automatically,
     by searching all classes (and their packages) which are referenced by my classes."

    ^ #(
        #'stx:goodies/sunit'    "TestSuite - referenced by stx_libjava_tests class>>testSuite"
        #'stx:libjava'    "Java - referenced by stx_libjava_tests class>>testSuite"
	#'stx:libjava/tests'
    )
!

subProjects
    "list packages which are known as subprojects.
     The generated makefile will enter those and make there as well.
     However: they are not forced to be loaded when a package is loaded;
     for those, redefine requiredPrerequisites."

    ^ #(
    )
! !

!stx_libjava_tests class methodsFor:'description - contents'!

classNamesAndAttributes
    "lists the classes which are to be included in the project.
     Each entry in the list may be: a single class-name (symbol),
     or an array-literal consisting of class name and attributes.
     Attributes are: #autoload or #<os> where os is one of win32, unix,..."

    ^ #(
        "<className> or (<className> attributes...) in load order"
        #'stx_libjava_tests'
    )
!

extensionMethodNames
    "list class/selector pairs of extensions.
     A correponding method with real names must be present in my concrete subclasses"

    ^ #(
    )
! !

!stx_libjava_tests class methodsFor:'description - java'!

javaBundle

    ^JavaCodeBundle standardPackageBundleFor: self package

    "Created: / 15-01-2013 / 17:35:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !

!stx_libjava_tests class methodsFor:'description - project information'!

companyName
    "Returns a company string which will appear in <lib>.rc.
     Under win32, this is placed into the dlls file-info"

    ^ 'eXept Software AG'
!

description
    "Returns a description string which will appear in nt.def / bc.def"

    ^ 'Smalltalk/X Class library'
!

legalCopyright
    "Returns a copyright string which will appear in <lib>.rc.
     Under win32, this is placed into the dlls file-info"

    ^ 'Copyright Claus Gittinger 1988-2015\nCopyright eXept Software AG 1998-2015'
!

productName
    "Returns a product name which will appear in <lib>.rc.
     Under win32, this is placed into the dlls file-info.
     This method is usually redefined in a concrete application definition"

    ^ 'Smalltalk/X'
! !

!stx_libjava_tests class methodsFor:'documentation'!

version_HG

    ^ '$Changeset: <not expanded> $'
! !