The Trunk: Tests-nice.55.mcz

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

The Trunk: Tests-nice.55.mcz

commits-2
Nicolas Cellier uploaded a new version of Tests to project The Trunk:
http://source.squeak.org/trunk/Tests-nice.55.mcz

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

Name: Tests-nice.55
Author: nice
Time: 4 March 2010, 10:32:53.259 pm
UUID: eb4f6277-4477-4a3e-a2d5-02c4f6fcf48a
Ancestors: Tests-ar.54

Add a test for a Decompiler bug
(not solved yet)

=============== Diff against Tests-ar.54 ===============

Item was added:
+ ----- Method: DecompilerTests>>testRemoteTemp (in category 'tests') -----
+ testRemoteTemp
+ | aBlock |
+ aBlock := Compiler evaluate: '| x y |  [:a :b | x := a. y := b. x+y]'.
+ self shouldnt: [aBlock decompile] raise: Error
+ !

Item was changed:
  ----- Method: ExpandedSourceFileArrayTest>>testCompatibilityWithStandardSourceFileArray (in category 'testing') -----
  testCompatibilityWithStandardSourceFileArray
  "Test compatibility with StandardSourceFileArray across the address range of
  StandardSourceFileArray, including the unused address space below 16r1000000"
 
  | ssf esf i1 i2 p1 p2 a1 a2 |
  ssf := StandardSourceFileArray new.
  esf := ExpandedSourceFileArray new.
+ 0 to: 16rFFFFFF by: 811 do: [:e |
- (0 to: 16rFFFFFF by: 811) do: [:e |
  i1 := ssf fileIndexFromSourcePointer: e.
  i2 := esf fileIndexFromSourcePointer: e.
  self assert: i1 = i2.
  self assert: i1 = 0. "This is unused address space"
  p1 := ssf filePositionFromSourcePointer: e.
  p2 := esf filePositionFromSourcePointer: e.
  self assert: p1 = p2].
+ 16r4FFFFFF to: 16r4FFFFFF by: 811 do: [:e |
- (16r4FFFFFF to: 16r4FFFFFF by: 811) do: [:e |
  i1 := ssf fileIndexFromSourcePointer: e.
  i2 := esf fileIndexFromSourcePointer: e.
  self assert: i1 = i2.
  p1 := ssf filePositionFromSourcePointer: e.
  p2 := esf filePositionFromSourcePointer: e.
  self assert: p1 = p2.
  a1 := ssf sourcePointerFromFileIndex: i1 andPosition: p1.
  a2 := esf sourcePointerFromFileIndex: i2 andPosition: p2.
  self assert: a1 = a2.
  self assert: a1= e]
 
  !

Item was changed:
  ----- Method: ExpandedSourceFileArrayTest>>testChangesFileAddressRange (in category 'testing') -----
  testChangesFileAddressRange
  "Test file position to source pointer address translation for the changes file"
 
  | sf i p a a2 |
  sf := ExpandedSourceFileArray new.
+ 0 to: 16r1FFFFFFF by: 4093 do: [:e |
- (0 to: 16r1FFFFFFF by: 4093) do: [:e |
  a := sf sourcePointerFromFileIndex: 2 andPosition: e.
  i := sf fileIndexFromSourcePointer: a.
  self assert: i == 2.
  p := sf filePositionFromSourcePointer: a.
  self assert: p = e.
  a2 := sf sourcePointerFromFileIndex: 2 andPosition: p.
  self assert: a2 = a].
+ 0 to: 16rFFFFFF by: 811 do: [:e |
- (0 to: 16rFFFFFF by: 811) do: [:e |
  a := sf sourcePointerFromFileIndex: 2 andPosition: e.
  self assert: (a between: 16r2000000 and: 16r2FFFFFF)].
+ 16r1000000 to: 16r1FFFFFF by: 811 do: [:e |
- (16r1000000 to: 16r1FFFFFF by: 811) do: [:e |
  a := sf sourcePointerFromFileIndex: 2 andPosition: e.
  self assert: (a between: 16r4000000 and: 16r4FFFFFF)].
+ 16r2000000 to: 16r2FFFFFF by: 811 do: [:e |
- (16r2000000 to: 16r2FFFFFF by: 811) do: [:e |
  a := sf sourcePointerFromFileIndex: 2 andPosition: e.
  self assert: (a between: 16r6000000 and: 16r6FFFFFF)].
+ 16r3000000 to: 16r3FFFFFF by: 811 do: [:e |
- (16r3000000 to: 16r3FFFFFF by: 811) do: [:e |
  a := sf sourcePointerFromFileIndex: 2 andPosition: e.
  self assert: (a between: 16r8000000 and: 16r8FFFFFF)].
+ 16r4000000 to: 16r4FFFFFF by: 811 do: [:e |
- (16r4000000 to: 16r4FFFFFF by: 811) do: [:e |
  a := sf sourcePointerFromFileIndex: 2 andPosition: e.
  self assert: (a between: 16rA000000 and: 16rAFFFFFF)].
+ 16r5000000 to: 16r5FFFFFF by: 811 do: [:e |
- (16r5000000 to: 16r5FFFFFF by: 811) do: [:e |
  a := sf sourcePointerFromFileIndex: 2 andPosition: e.
  self assert: (a between: 16rC000000 and: 16rCFFFFFF)].
+ 16r6000000 to: 16r6FFFFFF by: 811 do: [:e |
- (16r6000000 to: 16r6FFFFFF by: 811) do: [:e |
  a := sf sourcePointerFromFileIndex: 2 andPosition: e.
  self assert: (a between: 16rE000000 and: 16rEFFFFFF)].
+ 16r7000000 to: 16r7FFFFFF by: 811 do: [:e |
- (16r7000000 to: 16r7FFFFFF by: 811) do: [:e |
  a := sf sourcePointerFromFileIndex: 2 andPosition: e.
  self assert: (a between: 16r10000000 and: 16r10FFFFFF)]
 
 
 
  !

Item was changed:
  ----- Method: ExpandedSourceFileArrayTest>>testSourcesFileAddressRange (in category 'testing') -----
  testSourcesFileAddressRange
  "Test file position to source pointer address translation for the sources file"
 
  | sf i p a a2 |
  sf := ExpandedSourceFileArray new.
+ 0 to: 16r1FFFFFFF by: 4093 do: [:e |
- (0 to: 16r1FFFFFFF by: 4093) do: [:e |
  a := sf sourcePointerFromFileIndex: 1 andPosition: e.
  i := sf fileIndexFromSourcePointer: a.
  self assert: i == 1.
  p := sf filePositionFromSourcePointer: a.
  self assert: p = e.
  a2 := sf sourcePointerFromFileIndex: 1 andPosition: p.
  self assert: a2 = a].
+ 0 to: 16rFFFFFF by: 811 do: [:e |
- (0 to: 16rFFFFFF by: 811) do: [:e |
  a := sf sourcePointerFromFileIndex: 1 andPosition: e.
  self assert: (a between: 16r1000000 and: 16r1FFFFFF)].
+ 16r1000000 to: 16r1FFFFFF by: 811 do: [:e |
- (16r1000000 to: 16r1FFFFFF by: 811) do: [:e |
  a := sf sourcePointerFromFileIndex: 1 andPosition: e.
  self assert: (a between: 16r3000000 and: 16r3FFFFFF)].
 
+ 16r2000000 to: 16r2FFFFFF by: 811 do: [:e |
- (16r2000000 to: 16r2FFFFFF by: 811) do: [:e |
  a := sf sourcePointerFromFileIndex: 1 andPosition: e.
  self assert: (a between: 16r5000000 and: 16r5FFFFFF)].
+ 16r3000000 to: 16r3FFFFFF by: 811 do: [:e |
- (16r3000000 to: 16r3FFFFFF by: 811) do: [:e |
  a := sf sourcePointerFromFileIndex: 1 andPosition: e.
  self assert: (a between: 16r7000000 and: 16r7FFFFFF)].
+ 16r4000000 to: 16r4FFFFFF by: 811 do: [:e |
- (16r4000000 to: 16r4FFFFFF by: 811) do: [:e |
  a := sf sourcePointerFromFileIndex: 1 andPosition: e.
  self assert: (a between: 16r9000000 and: 16r9FFFFFF)].
+ 16r5000000 to: 16r5FFFFFF by: 811 do: [:e |
- (16r5000000 to: 16r5FFFFFF by: 811) do: [:e |
  a := sf sourcePointerFromFileIndex: 1 andPosition: e.
  self assert: (a between: 16rB000000 and: 16rBFFFFFF)].
+ 16r6000000 to: 16r6FFFFFF by: 811 do: [:e |
- (16r6000000 to: 16r6FFFFFF by: 811) do: [:e |
  a := sf sourcePointerFromFileIndex: 1 andPosition: e.
  self assert: (a between: 16rD000000 and: 16rDFFFFFF)].
+ 16r7000000 to: 16r7FFFFFF by: 811 do: [:e |
- (16r7000000 to: 16r7FFFFFF by: 811) do: [:e |
  a := sf sourcePointerFromFileIndex: 1 andPosition: e.
  self assert: (a between: 16rF000000 and: 16rFFFFFFF)]
  !

Item was changed:
  ----- Method: ExpandedSourceFileArrayTest>>testAddressRange (in category 'testing') -----
  testAddressRange
  "Test source pointer to file position address translation across a wide address range"
 
  | sf i p a |
  sf := ExpandedSourceFileArray new.
+ 16r1000000 to: 16r10000000 by: 4093 do: [:e |
- (16r1000000 to: 16r10000000 by: 4093) do: [:e |
  i := sf fileIndexFromSourcePointer: e.
  p := sf filePositionFromSourcePointer: e.
  a := sf sourcePointerFromFileIndex: i andPosition: p.
  self assert: a = e]
  !