Refactored remembering of TestCaseOutcomes.
TestCaseOutcomes are no longer remembered in class instance var of the TestCase but
rather in one global dictionary on TestCaseOutcome class.
The top-level weak dictionary uses test method as a key and second-level dictionary as value.
This ensures that when a test method is changed, sooner or later (now obsolete) remebered
outcomes are reclamed by the GC.
The second-level dictionary uses test case class as a key and outcome as value. This is used
to keep outcomes for inherited test cases. This dictionary is also weak, ensuring that when
the class is unloaded or changed, outcomes are reclamed.
To reduce a number of weak objects a special TestCaseOutcomeWeakIdentityDictionary is
used. It optimizes the most common case when there are no inherited testcases.
"{ Package: 'stx:goodies/sunit' }"
LibraryDefinition subclass:#stx_goodies_sunit
instanceVariableNames:''
classVariableNames:''
poolDictionaries:''
category:'* Projects & Packages *'
!
!stx_goodies_sunit class methodsFor:'documentation'!
documentation
"
Build- and package information for creation of the st/x standard library: stx_goodies_sunit
This library contains the sunit test framework.
"
! !
!stx_goodies_sunit class methodsFor:'accessing - hg - settings'!
hgEnsureCopyrightMethod
"If true, then #copyright method is automatically compiled in each class
(but iff project definition defines it)
Default is true (compile such method) but if the repository is mirror of CVS and
you want to merge back to CVS at some point, you may want to not compile them
to keep changes against CVS minimal"
^false
"Created: / 09-07-2014 / 21:30:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
hgEnsureVersion_HGMethod
"If true, then #version_HG method is automatically compiled in each class.
Default is true (compile such method) but if the repository is mirror of CVS and
you want to merge back to CVS at some point, you may want to not compile them
to keep changes against CVS minimal.
If false, version_HG is compiled only in classes that has been modified
and commited.
Note that Mercurial can live without them
just fine"
^false
"Created: / 09-07-2014 / 21:30:43 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
hgRemoveContainesForDeletedClasses
"If true, then containers for removed classes are __AUTOMATICALLY__ removed from the
repositoru. If false, obsolete containes are kept.
Default is true (remove obsolete containers) but if the repository is mirror of CVS and
you want to merge back to CVS at some point, you may want to return false to avoid deletions
of obsolete files. Usefull when branching off an old CVS repo with loads of mess."
^false
"Created: / 09-07-2014 / 21:30:54 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!stx_goodies_sunit class methodsFor:'description'!
excludedFromPreRequisites
"list all packages which should be ignored in the automatic
preRequisites scan. See #preRequisites for more."
^ #(
)
!
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' "ArrayedCollection - extended"
#'stx:libbasic3' "Change - extended"
#'stx:libview2' "ApplicationModel - superclass of TestRunner"
)
!
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:libbasic2' "LineNumberReadStream - referenced by TestResultStX>>printLineForContextForJavaCompatibleStackTrace:on:"
#'stx:libview' "Color - referenced by TestRunner class>>colorForFailedTests"
)
!
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_goodies_sunit 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"
MetricsReporter
SUnitDelay
SUnitNameResolver
TestAsserter
TestCaseOutcome
TestCaseOutcomeWeakIdentityDictionary
TestCoverageReporter
TestFailure
TestResult
TestResultReporter
TestRunner
TestSuite
TestSuitesScripter
#'stx_goodies_sunit'
ResumableTestFailure
TestCase
TestResource
TestResultStX
TestSkipped
(ExampleSetTest autoload)
(ExampleTestResource autoload)
(ResumableTestFailureTestCase autoload)
(SUnitTest autoload)
(SUnitTests2 autoload)
(SimpleTestResource autoload)
(SimpleTestResourceTestCase autoload)
(TestCaseWithArguments autoload)
TestResultForRunWithDebug
(FailingTestResourceTestCase autoload)
(ManyTestResourceTestCase autoload)
(SimpleTestResourceA autoload)
(SimpleTestResourceA1 autoload)
(SimpleTestResourceA2 autoload)
(SimpleTestResourceB autoload)
(SimpleTestResourceB1 autoload)
(SimpleTestResourceCircular autoload)
(SimpleTestResourceCircular1 autoload)
(TestSuitesHierarchyScriptTest autoload)
(TestSuitesScriptTest autoload)
(CircularTestResourceTestCase autoload)
(TestSuitesCompoundScriptTest autoload)
)
!
extensionMethodNames
"list class/selector pairs of extensions.
A correponding method with real names must be present in my concrete subclasses"
^ #(
Block sunitEnsure:
Block sunitOn:do:
GenericException sunitAnnounce:toResult:
GenericException sunitExitWith:
Object sunitAddDependent:
Object sunitChanged:
Object sunitRemoveDependent:
String sunitAsSymbol
String sunitMatch:
String sunitSubStrings
Symbol sunitAsClass
'GenericException class' sunitSignalWith:
Behavior sunitSelectors
Class sunitName
MethodChange changeMethod
)
! !
!stx_goodies_sunit class methodsFor:'description - project information'!
applicationIconFileName
"Return the name (without suffix) of an icon-file (the app's icon); will be included in the rc-resource file"
^ nil
"/ ^ self applicationName
!
companyName
"Return a companyname which will appear in <lib>.rc"
^ 'eXept Software AG'
!
description
"Return a description string which will appear in nt.def / bc.def"
^ 'Smalltalk/X Unit Testing'
!
legalCopyright
"Return a copyright string which will appear in <lib>.rc"
^ 'Copyright eXept Software AG 1998-2007'
"Modified: / 08-11-2007 / 16:57:33 / cg"
!
productName
"Return a product name which will appear in <lib>.rc"
^ 'Smalltalk/X'
! !
!stx_goodies_sunit class methodsFor:'description - svn'!
svnRevisionNr
"Return a SVN revision number of myself.
This number is updated after a commit"
^ "$SVN-Revision:"'Nicht versioniertes Verzeichnis'"$"
! !
!stx_goodies_sunit class methodsFor:'documentation'!
version
^ '$Header: /cvs/stx/stx/goodies/sunit/stx_goodies_sunit.st,v 1.41 2014-03-23 21:08:48 cg Exp $'
!
version_CVS
^ '$Header: /cvs/stx/stx/goodies/sunit/stx_goodies_sunit.st,v 1.41 2014-03-23 21:08:48 cg Exp $'
!
version_HG
^ '$Changeset: <not expanded> $'
!
version_SVN
^ '$Id: stx_goodies_sunit.st,v 1.41 2014-03-23 21:08:48 cg Exp $'
! !