tests/stx_libjava_tests.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Mon, 04 Feb 2019 00:24:10 +0000
changeset 3886 292b73957757
parent 3601 4f1b473722cb
permissions -rw-r--r--
Fix initialization of system propertirs ...and use `amd64` consistenly instead of `x86_64`.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3336
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     1
"{ Package: 'stx:libjava/tests' }"
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     2
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     3
"{ NameSpace: Smalltalk }"
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     4
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     5
LibraryDefinition subclass:#stx_libjava_tests
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     6
	instanceVariableNames:''
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     7
	classVariableNames:''
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     8
	poolDictionaries:''
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     9
	category:'* Projects & Packages *'
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    10
!
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    11
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    12
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    13
!stx_libjava_tests class methodsFor:'accessing - tests'!
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    14
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    15
excludedFromTestSuite  
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    16
    "List of testcases and/or tests excluded from testsuite.
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    17
     Entries maybe ClassName or #(ClassName testName)
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    18
    "
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    19
    ^ #(
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    20
        LookupTests
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    21
    )
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    22
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    23
    "Created: / 03-06-2011 / 17:04:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    24
!
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    25
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    26
testSuite
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    27
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    28
    | suite javaTestCases stTests |
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    29
    suite := super testSuite.
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    30
    stTests := suite tests.
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    31
    suite := TestSuite new.
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    32
    suite name: self package.
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    33
    JavaTestsLoader load.
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    34
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    35
    javaTestCases := OrderedCollection new.
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    36
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    37
    Java allClassesDo:
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    38
        [:jclass|
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    39
        (jclass binaryName ~~ #'stx/libjava/tests/JUnit3Tests'
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    40
            and:[jclass binaryName ~~  #'stx/libjava/tests/JUnit4Tests'
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    41
                and:[jclass isTestCaseLike]])
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    42
                    ifTrue:
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    43
                        [ | tc |
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    44
                        tc := jclass asTestCase.
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    45
                        tc isAbstract ifFalse:[javaTestCases add:tc ]]].
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    46
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    47
    javaTestCases do:
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    48
                [:each | 
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    49
                suite addTests:each buildSuite tests ].
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    50
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    51
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    52
    suite tests addAll: stTests.
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    53
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    54
    suite tests withIndexDo:
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    55
        [:t :i|
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    56
        Stdout nextPutAll: i printString; space; nextPutAll: t printString; cr].
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    57
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    58
    Java dumpConfigOn: Stdout.
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    59
    ^suite
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    60
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    61
    "
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    62
        stx_libjava testSuite
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    63
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    64
    "
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    65
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    66
    "Created: / 07-05-2011 / 19:58:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    67
    "Modified: / 04-06-2011 / 17:23:05 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    68
    "Modified: / 08-02-2013 / 10:24:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    69
! !
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    70
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    71
!stx_libjava_tests class methodsFor:'description'!
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    72
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    73
excludedFromPreRequisites
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    74
    "list packages which are to be explicitely excluded from the automatic constructed
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    75
     prerequisites list. If empty, everything that is found along the inheritance of any of
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    76
     my classes is considered to be a prerequisite package."
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    77
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    78
    ^ #(
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    79
    )
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    80
!
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    81
3538
437fc55b3eed Added tests for INVOKE? instruction when invoked method is missing
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3514
diff changeset
    82
includedInPreRequisites
437fc55b3eed Added tests for INVOKE? instruction when invoked method is missing
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3514
diff changeset
    83
    "list packages which are to be implicitely included in the prerequisites list,
437fc55b3eed Added tests for INVOKE? instruction when invoked method is missing
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3514
diff changeset
    84
     even if not found by the automatic search.
437fc55b3eed Added tests for INVOKE? instruction when invoked method is missing
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3514
diff changeset
    85
     Redefine this, if classes from other packages are referred to via reflection
437fc55b3eed Added tests for INVOKE? instruction when invoked method is missing
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3514
diff changeset
    86
     or by constructing names dynamically (i.e. the search cannot find it)"
437fc55b3eed Added tests for INVOKE? instruction when invoked method is missing
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3514
diff changeset
    87
437fc55b3eed Added tests for INVOKE? instruction when invoked method is missing
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3514
diff changeset
    88
    ^ #(
437fc55b3eed Added tests for INVOKE? instruction when invoked method is missing
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3514
diff changeset
    89
        #'stx:libjava/libs' "/ For tests to compile
437fc55b3eed Added tests for INVOKE? instruction when invoked method is missing
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3514
diff changeset
    90
    )
437fc55b3eed Added tests for INVOKE? instruction when invoked method is missing
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3514
diff changeset
    91
437fc55b3eed Added tests for INVOKE? instruction when invoked method is missing
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3514
diff changeset
    92
    "Created: / 21-03-2016 / 00:27:45 / Jan Vrany <jan.vrany@fit.cvut.cz>"
437fc55b3eed Added tests for INVOKE? instruction when invoked method is missing
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3514
diff changeset
    93
!
437fc55b3eed Added tests for INVOKE? instruction when invoked method is missing
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3514
diff changeset
    94
3336
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    95
mandatoryPreRequisites
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    96
    "list packages which are mandatory as a prerequisite.
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    97
     This are packages containing superclasses of my classes and classes which
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    98
     are extended by myself.
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    99
     They are mandatory, because we need these packages as a prerequisite for loading and compiling.
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   100
     This method is generated automatically,
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   101
     by searching along the inheritance chain of all of my classes."
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   102
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   103
    ^ #(
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   104
        #'stx:libbasic'    "LibraryDefinition - superclass of stx_libjava_tests"
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   105
    )
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   106
!
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   107
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   108
referencedPreRequisites
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   109
    "list packages which are a prerequisite, because they contain
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   110
     classes which are referenced by my classes.
3538
437fc55b3eed Added tests for INVOKE? instruction when invoked method is missing
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3514
diff changeset
   111
     We do not need these packages as a prerequisite for compiling or loading,
437fc55b3eed Added tests for INVOKE? instruction when invoked method is missing
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3514
diff changeset
   112
     however, a class from it may be referenced during execution and having it
437fc55b3eed Added tests for INVOKE? instruction when invoked method is missing
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3514
diff changeset
   113
     unloaded then may lead to a runtime doesNotUnderstand error, unless the caller
437fc55b3eed Added tests for INVOKE? instruction when invoked method is missing
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3514
diff changeset
   114
     includes explicit checks for the package being present.
3336
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   115
     This method is generated automatically,
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   116
     by searching all classes (and their packages) which are referenced by my classes."
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   117
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   118
    ^ #(
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   119
        #'stx:goodies/sunit'    "TestSuite - referenced by stx_libjava_tests class>>testSuite"
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   120
        #'stx:libjava'    "Java - referenced by stx_libjava_tests class>>testSuite"
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   121
    )
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   122
!
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   123
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   124
subProjects
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   125
    "list packages which are known as subprojects.
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   126
     The generated makefile will enter those and make there as well.
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   127
     However: they are not forced to be loaded when a package is loaded;
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   128
     for those, redefine requiredPrerequisites."
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   129
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   130
    ^ #(
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   131
    )
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   132
! !
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   133
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   134
!stx_libjava_tests class methodsFor:'description - contents'!
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   135
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   136
classNamesAndAttributes
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   137
    "lists the classes which are to be included in the project.
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   138
     Each entry in the list may be: a single class-name (symbol),
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   139
     or an array-literal consisting of class name and attributes.
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   140
     Attributes are: #autoload or #<os> where os is one of win32, unix,..."
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   141
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   142
    ^ #(
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   143
        "<className> or (<className> attributes...) in load order"
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   144
        #'stx_libjava_tests'
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   145
    )
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   146
!
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   147
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   148
extensionMethodNames
3601
4f1b473722cb Interop: return Java `char` value as instance of Character
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3538
diff changeset
   149
    "lists the extension methods which are to be included in the project.
4f1b473722cb Interop: return Java `char` value as instance of Character
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3538
diff changeset
   150
     Entries are 2-element array literals, consisting of class-name and selector.
4f1b473722cb Interop: return Java `char` value as instance of Character
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3538
diff changeset
   151
     A correponding method with real names must be present in my concrete subclasses
4f1b473722cb Interop: return Java `char` value as instance of Character
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3538
diff changeset
   152
     if it has extensions."
3336
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   153
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   154
    ^ #(
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   155
    )
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   156
! !
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   157
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   158
!stx_libjava_tests class methodsFor:'description - java'!
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   159
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   160
javaBundle
3538
437fc55b3eed Added tests for INVOKE? instruction when invoked method is missing
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3514
diff changeset
   161
    
437fc55b3eed Added tests for INVOKE? instruction when invoked method is missing
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3514
diff changeset
   162
    ^ JavaCodeBundle standardPackageBundleFor: self package
3336
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   163
! !
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   164
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   165
!stx_libjava_tests class methodsFor:'description - project information'!
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   166
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   167
companyName
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   168
    "Returns a company string which will appear in <lib>.rc.
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   169
     Under win32, this is placed into the dlls file-info"
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   170
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   171
    ^ 'eXept Software AG'
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   172
!
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   173
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   174
description
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   175
    "Returns a description string which will appear in nt.def / bc.def"
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   176
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   177
    ^ 'Smalltalk/X Class library'
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   178
!
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   179
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   180
legalCopyright
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   181
    "Returns a copyright string which will appear in <lib>.rc.
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   182
     Under win32, this is placed into the dlls file-info"
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   183
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   184
    ^ 'Copyright Claus Gittinger 1988-2015\nCopyright eXept Software AG 1998-2015'
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   185
!
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   186
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   187
productName
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   188
    "Returns a product name which will appear in <lib>.rc.
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   189
     Under win32, this is placed into the dlls file-info.
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   190
     This method is usually redefined in a concrete application definition"
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   191
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   192
    ^ 'Smalltalk/X'
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   193
! !
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   194
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   195
!stx_libjava_tests class methodsFor:'documentation'!
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   196
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   197
version_HG
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   198
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   199
    ^ '$Changeset: <not expanded> $'
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   200
! !
08a79331ec58 Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   201