[BUG][FIX][TEST] Default Flap entries that don't exist in3.6-5424-basic (v1.01)

Christian Eitner Christian.Eitner at cern.ch
Sun Oct 12 18:04:21 UTC 2003


Okay,

Here comes BrowseUnit compatible renaming and my first SmallLint 
refactoring. :-)

   Christian
-------------- next part --------------
'From Squeak3.6 of ''6 October 2003'' [latest update: #5424] on 12 October 2003 at 8:02:21 pm'!
TestCase subclass: #FlapsTest
	instanceVariableNames: ''
	classVariableNames: ''
	poolDictionaries: ''
	category: 'Tests-Morphic-Flaps'!
!FlapsTest commentStamp: '<historical>' prior: 0!
A TestCase is a Command representing the future running of a test case. Create one with the class method #selector: aSymbol, passing the name of the method to be run when the test case runs.

When you discover a new fixture, subclass TestCase, declare instance variables for the objects in the fixture, override #setUp to initialize the variables, and possibly override# tearDown to deallocate any external resources allocated in #setUp.

When you are writing a test case method, send #assert: aBoolean when you want to check for an expected value. For example, you might say "self assert: socket isOpen" to test whether or not a socket is open at a point in a test.!


!FlapsTest methodsFor: 'initialize-release' stamp: 'cE 10/10/2003 19:08'!
setUp
	"I am the method in which your test is initialized. 
If you have ressources to build, put them here."! !

!FlapsTest methodsFor: 'initialize-release' stamp: 'cE 10/10/2003 19:08'!
tearDown
	"I am called whenever your test ends. 
I am the place where you release the ressources"! !


!FlapsTest methodsFor: 'testing' stamp: 'cE 10/12/2003 19:54'!
testRegisteredFlapsQuads
	"Defaults are defined in Flaps class>>defaultQuadsDefining...
	If you change something there, do the following afterwards:
	Flaps initializeFlapsQuads"

	| allQuads absentClasses absentSelectors |
	allQuads _ OrderedCollection new.
	absentClasses _ OrderedCollection new.
	Flaps registeredFlapsQuads valuesDo: [:each | allQuads addAll: each].
	allQuads do: [:each | | theObject |
		theObject _ each at: 1.
		Smalltalk
			at: theObject
			ifAbsent: [absentClasses add: each]].
	self
		assert: absentClasses isEmpty
		description: 'There are absent classes: ' , absentClasses asString.
	absentSelectors _ OrderedCollection new.
	allQuads do: [:each | | theClass theSelector |
		theClass _ (Smalltalk at: (each at: 1)) class.
		theSelector _ each at: 2.
		(theClass canUnderstand: theSelector)
			ifFalse: [absentSelectors add: each]].
	self
		assert: absentSelectors isEmpty
		description: 'There are absent selectors: ' , absentSelectors asString! !


More information about the Squeak-dev mailing list