The Trunk: Tests-ul.97.mcz

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

The Trunk: Tests-ul.97.mcz

commits-2
Levente Uzonyi uploaded a new version of Tests to project The Trunk:
http://source.squeak.org/trunk/Tests-ul.97.mcz

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

Name: Tests-ul.97
Author: ul
Time: 24 October 2010, 6:06:56.495 am
UUID: f5f99e31-06dd-3048-b380-77cc97804a79
Ancestors: Tests-eem.96

Bitmap >> #writeOn: raises an error, because it evaluates code which sends #inline: and #var:declareC:, etc. Since these methods were moved to VMMaker these sends result in a DNU.

=============== Diff against Tests-eem.96 ===============

Item was changed:
+ ----- Method: BitmapBugz>>testBitmapByteAt (in category 'tests') -----
- ----- Method: BitmapBugz>>testBitmapByteAt (in category 'as yet unclassified') -----
  testBitmapByteAt
  | bm |
  bm := Bitmap new: 1.
  1 to: 4 do:[:i|
  self should:[bm byteAt: i put: 1000] raise: Error.
  ].!

Item was added:
+ ----- Method: BitmapBugz>>testWriteOn (in category 'tests') -----
+ testWriteOn
+
+ | original binary copy |
+ original := Bitmap new: 1.
+ original byteAt: 1 put: 42.
+ binary := ByteArray streamContents: [ :stream |
+ original writeOn: stream ].
+ copy := Bitmap newFromStream: binary readStream.
+ self assert: original = copy!


Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Tests-ul.97.mcz

Levente Uzonyi-2
On Sun, 24 Oct 2010, [hidden email] wrote:

> Levente Uzonyi uploaded a new version of Tests to project The Trunk:
> http://source.squeak.org/trunk/Tests-ul.97.mcz
>
> ==================== Summary ====================
>
> Name: Tests-ul.97
> Author: ul
> Time: 24 October 2010, 6:06:56.495 am
> UUID: f5f99e31-06dd-3048-b380-77cc97804a79
> Ancestors: Tests-eem.96
>
> Bitmap >> #writeOn: raises an error, because it evaluates code which sends #inline: and #var:declareC:, etc. Since these methods were moved to VMMaker these sends result in a DNU.

The easiest solution is to change these sends to the new pragma format
which is supported by all current VMMakers. What do you think?


Levente

>
> =============== Diff against Tests-eem.96 ===============
>
> Item was changed:
> + ----- Method: BitmapBugz>>testBitmapByteAt (in category 'tests') -----
> - ----- Method: BitmapBugz>>testBitmapByteAt (in category 'as yet unclassified') -----
>  testBitmapByteAt
>   | bm |
>   bm := Bitmap new: 1.
>   1 to: 4 do:[:i|
>   self should:[bm byteAt: i put: 1000] raise: Error.
>   ].!
>
> Item was added:
> + ----- Method: BitmapBugz>>testWriteOn (in category 'tests') -----
> + testWriteOn
> +
> + | original binary copy |
> + original := Bitmap new: 1.
> + original byteAt: 1 put: 42.
> + binary := ByteArray streamContents: [ :stream |
> + original writeOn: stream ].
> + copy := Bitmap newFromStream: binary readStream.
> + self assert: original = copy!
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Tests-ul.97.mcz

Eliot Miranda-2


On Sat, Oct 23, 2010 at 9:17 PM, Levente Uzonyi <[hidden email]> wrote:
On Sun, 24 Oct 2010, [hidden email] wrote:

Levente Uzonyi uploaded a new version of Tests to project The Trunk:
http://source.squeak.org/trunk/Tests-ul.97.mcz

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

Name: Tests-ul.97
Author: ul
Time: 24 October 2010, 6:06:56.495 am
UUID: f5f99e31-06dd-3048-b380-77cc97804a79
Ancestors: Tests-eem.96

Bitmap >> #writeOn: raises an error, because it evaluates code which sends #inline: and #var:declareC:, etc. Since these methods were moved to VMMaker these sends result in a DNU.

Oops.  I didn't see that coming when I moved these into VMMaker.  Sorry.
 

The easiest solution is to change these sends to the new pragma format which is supported by all current VMMakers. What do you think?

+1
 


Levente



=============== Diff against Tests-eem.96 ===============

Item was changed:
+ ----- Method: BitmapBugz>>testBitmapByteAt (in category 'tests') -----
- ----- Method: BitmapBugz>>testBitmapByteAt (in category 'as yet unclassified') -----
 testBitmapByteAt
       | bm |
       bm := Bitmap new: 1.
       1 to: 4 do:[:i|
               self should:[bm byteAt: i put: 1000] raise: Error.
       ].!

Item was added:
+ ----- Method: BitmapBugz>>testWriteOn (in category 'tests') -----
+ testWriteOn
+
+       | original binary copy |
+       original := Bitmap new: 1.
+       original byteAt: 1 put: 42.
+       binary := ByteArray streamContents: [ :stream |
+               original writeOn: stream ].
+       copy := Bitmap newFromStream: binary readStream.
+       self assert: original = copy!