The Trunk: GraphicsTests-fbs.36.mcz

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

The Trunk: GraphicsTests-fbs.36.mcz

commits-2
Frank Shearar uploaded a new version of GraphicsTests to project The Trunk:
http://source.squeak.org/trunk/GraphicsTests-fbs.36.mcz

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

Name: GraphicsTests-fbs.36
Author: fbs
Time: 6 November 2013, 6:32:22.764 pm
UUID: fe4e1768-0ce3-2541-8356-7a9143ee5ad7
Ancestors: GraphicsTests-nice.35

More #shouldnt:raise: Error fixes.

=============== Diff against GraphicsTests-nice.35 ===============

Item was changed:
  ----- Method: BitBltTest>>testPeekerUnhibernateBug (in category 'bugs') -----
  testPeekerUnhibernateBug
  "self run: #testPeekerUnhibernateBug"
 
  | bitBlt |
  bitBlt := BitBlt bitPeekerFromForm: Display.
  bitBlt destForm hibernate.
+
+ "This should not throw an exception."
+ bitBlt pixelAt: 1@1.!
- self shouldnt:[bitBlt pixelAt: 1@1] raise: Error.!

Item was changed:
  ----- Method: BitBltTest>>testPokerUnhibernateBug (in category 'bugs') -----
  testPokerUnhibernateBug
  "self run: #testPokerUnhibernateBug"
 
  | bitBlt |
  bitBlt := BitBlt bitPokerToForm: Display.
  bitBlt sourceForm hibernate.
+
+ "This should not throw an exception."
+ bitBlt pixelAt: 1@1 put: 0.!
- self shouldnt:[bitBlt pixelAt: 1@1 put: 0] raise: Error.!

Item was changed:
  ----- Method: ColorTest>>testPrintHtmlString (in category 'tests') -----
  testPrintHtmlString
  "self debug: #testPrintHtmlString"
 
- self shouldnt: [Color white printHtmlString ] raise: Error.
  self assert: Color white printHtmlString = 'FFFFFF'.
  self assert: Color red printHtmlString =  'FF0000'.
  self assert: Color black printHtmlString = '000000'.!

Item was changed:
  ----- Method: JPEGReadWriter2Test>>testHighEntropyImageCanBeWrittenInHighQuality (in category 'tests') -----
  testHighEntropyImageCanBeWrittenInHighQuality
+ "This should not throw an exception."
+ ByteArray streamContents: [ :stream |
+ | form rng |
+ form := Form extent: 20 @ 20 depth: 32.
+ rng := Random seed: 36rSQUEAK.
+ 0 to: form height do: [ :y |
+ 0 to: form width do: [ :x |
+ form pixelValueAt: x @ y put: (rng nextInt: 16r100000000) - 1 ] ].
+ (JPEGReadWriter2 on: stream)
+ nextPutImage: form quality: 100 progressiveJPEG: true ]!
-
- self
- shouldnt: [
- ByteArray streamContents: [ :stream |
- | form rng |
- form := Form extent: 20 @ 20 depth: 32.
- rng := Random seed: 36rSQUEAK.
- 0 to: form height do: [ :y |
- 0 to: form width do: [ :x |
- form pixelValueAt: x @ y put: (rng nextInt: 16r100000000) - 1 ] ].
- (JPEGReadWriter2 on: stream)
- nextPutImage: form quality: 100 progressiveJPEG: true ] ]
- raise: Error!

Item was changed:
  ----- Method: PointTest>>testSign (in category 'testing - testing') -----
  testSign
+ | samples results rejects |
+ samples := 0 asPoint eightNeighbors , (Array with: 0 asPoint).
 
+ results := samples collect: [ :each | each sign ].
- | samples results rejects |
- samples :=
- 0 asPoint eightNeighbors
- , (Array with: 0 asPoint) .
-
- self shouldnt: [ results :=
- samples collect: [ :each | each sign ] ]
- raise: Error .
 
+ rejects := (1 to: samples size ) reject: [ :each |
- rejects :=
- (1 to: samples size ) reject: [ :each |
  (samples at: each) = (results at: each) ] .
 
+ self assert: (rejects isEmpty)
- self assert: ( rejects isEmpty)
 
 
  !

Item was changed:
  ----- Method: PointTest>>testZeroPointNormal (in category 'testing - testing') -----
  testZeroPointNormal
+ "old: normal of zero point raised divide by zero error.
+ new: normal of zero point returns a direction right rotated from zero points direction."
- "old: normal of zero point raised divide by zero error.
- new: normal of zero point returns a direction right rotated from zero points direction."
 
+ self assert: 90 equals: (0 asPoint normal bearingToPoint: 0 asPoint).!
-
- self shouldnt: [ (0 asPoint normal bearingToPoint: 0 asPoint) = 90 ] raise: Error.  
- !

Item was changed:
  ----- Method: RectangleTest>>testStoreOn (in category 'tests') -----
  testStoreOn
-
  | assoc assoc2 |
  assoc := (0@0 extent: 1@1) -> 0.
+ assoc2 := Compiler evaluate: assoc storeString.
- self shouldnt: [assoc2 := Compiler evaluate: assoc storeString] raise: Error.
  self assert: assoc key = assoc2 key.
  self assert: assoc value = assoc2 value.!