The Trunk: KernelTests-ar.123.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: KernelTests-ar.123.mcz

commits-2
Andreas Raab uploaded a new version of KernelTests to project The Trunk:
http://source.squeak.org/trunk/KernelTests-ar.123.mcz

==================== Summary ====================

Name: KernelTests-ar.123
Author: ar
Time: 22 December 2009, 12:41:36 pm
UUID: 7f17f415-8460-5d4a-89ba-cfb1be9cfaf7
Ancestors: KernelTests-ul.122

CompiledMethodTrailer phase 1: Main classes

=============== Diff against KernelTests-ul.122 ===============

Item was added:
+ ----- Method: CompledMethodTrailerTest>>testEmbeddingSourceCode (in category 'as yet unclassified') -----
+ testEmbeddingSourceCode
+
+ | trailer newTrailer code |
+
+ trailer := CompiledMethodTrailer new.
+
+ code := 'foo'.
+ trailer sourceCode: code.
+ newTrailer := trailer testEncoding.
+
+ self assert: (trailer kind == #EmbeddedSourceQCompress ).
+ self assert: (newTrailer sourceCode = code).
+
+ "the last bytecode index must be at 0"
+ self assert: (newTrailer endPC = 0).
+
+ code := 'testEmbeddingSourceCode
+
+ | trailer newTrailer code |
+
+ trailer := CompiledMethodTrailer new.
+
+ trailer sourceCode: code.
+ newTrailer := trailer testEncoding.
+
+ self assert: (newTrailer sourceCode = code).'.
+
+ trailer sourceCode: code.
+ self assert: (trailer kind == #EmbeddedSourceZip ).
+ newTrailer := trailer testEncoding.
+
+ self assert: (newTrailer sourceCode = code).
+ "the last bytecode index must be at 0"
+ self assert: (newTrailer endPC = 0).
+ !

Item was added:
+ ----- Method: CompledMethodTrailerTest>>testEncodingVarLengthSourcePointer (in category 'as yet unclassified') -----
+ testEncodingVarLengthSourcePointer
+
+ | trailer newTrailer |
+
+ trailer := CompiledMethodTrailer new.
+
+ trailer sourcePointer: 1.
+ newTrailer := trailer testEncoding.
+
+ self assert: (newTrailer sourcePointer = 1).
+
+ trailer sourcePointer: 16r100000000000000.
+ newTrailer := trailer testEncoding.
+ self assert: (newTrailer sourcePointer = 16r100000000000000).
+ "the last bytecode index must be at 0"
+ self assert: (newTrailer endPC = 0).
+ !

Item was added:
+ ----- Method: CompledMethodTrailerTest>>testEncodingNoTrailer (in category 'as yet unclassified') -----
+ testEncodingNoTrailer
+
+ | trailer |
+
+ trailer := CompiledMethodTrailer new.
+
+ "by default it should be a no-trailer"
+ self assert: (trailer kind == #NoTrailer ).
+ self assert: (trailer size = 1).
+
+ trailer := trailer testEncoding.
+
+ self assert: (trailer kind == #NoTrailer ).
+ self assert: (trailer size = 1).
+ "the last bytecode index must be at 0"
+ self assert: (trailer endPC = 0).
+ !

Item was added:
+ TestCase subclass: #CompledMethodTrailerTest
+ instanceVariableNames: ''
+ classVariableNames: ''
+ poolDictionaries: ''
+ category: 'KernelTests-Methods'!

Item was added:
+ ----- Method: CompledMethodTrailerTest>>testSourceByIdentifierEncoding (in category 'as yet unclassified') -----
+ testSourceByIdentifierEncoding
+
+ | trailer id |
+
+ trailer := CompiledMethodTrailer new.
+
+ id := UUID new asString.
+ trailer sourceIdentifier: id.
+
+ self assert: (trailer kind == #SourceByStringIdentifier ).
+
+ trailer := trailer testEncoding.
+
+ self assert: (trailer kind == #SourceByStringIdentifier ).
+ self assert: (trailer sourceIdentifier = id).
+ "the last bytecode index must be at 0"
+ self assert: (trailer endPC = 0).
+ !

Item was added:
+ ----- Method: CompledMethodTrailerTest>>testEmbeddingTempNames (in category 'as yet unclassified') -----
+ testEmbeddingTempNames
+
+ | trailer newTrailer code |
+
+ trailer := CompiledMethodTrailer new.
+
+ code := 'foo'.
+ trailer tempNames: code.
+ newTrailer := trailer testEncoding.
+
+ self assert: (trailer kind == #TempsNamesQCompress ).
+ self assert: (newTrailer tempNames = code).
+ "the last bytecode index must be at 0"
+ self assert: (newTrailer endPC = 0).
+
+
+ code := 'testEmbeddingSourceCode
+
+ | trailer newTrailer code |
+
+ trailer := CompiledMethodTrailer new.
+
+ trailer sourceCode: code.
+ newTrailer := trailer testEncoding.
+
+ self assert: (newTrailer sourceCode = code).'.
+
+ trailer tempNames: code.
+ self assert: (trailer kind == #TempsNamesZip ).
+ newTrailer := trailer testEncoding.
+
+ self assert: (newTrailer tempNames = code).
+ "the last bytecode index must be at 0"
+ self assert: (newTrailer endPC = 0).
+ !

Item was added:
+ ----- Method: CompledMethodTrailerTest>>testSourceBySelectorEncoding (in category 'as yet unclassified') -----
+ testSourceBySelectorEncoding
+
+ | trailer |
+
+ trailer := CompiledMethodTrailer new.
+
+ trailer setSourceBySelector.
+
+ self assert: (trailer kind == #SourceBySelector ).
+ self assert: (trailer size = 1).
+
+ trailer := trailer testEncoding.
+
+ self assert: (trailer kind == #SourceBySelector ).
+ self assert: (trailer size = 1).
+ "the last bytecode index must be at 0"
+ self assert: (trailer endPC = 0).
+ !

Item was added:
+ ----- Method: CompledMethodTrailerTest>>testEncodingSourcePointer (in category 'as yet unclassified') -----
+ testEncodingSourcePointer
+
+ | trailer |
+
+ trailer := CompiledMethodTrailer new.
+
+ CompiledMethod allInstancesDo: [:method | | ptr |
+ trailer method: method.
+ self assert: ( (ptr := method sourcePointer) == trailer sourcePointer).
+ "the last bytecode index must be at 0"
+ ptr ~= 0 ifTrue: [
+ self assert: (method endPC = trailer endPC) ].
+ ].!