The Trunk: Tests-ar.78.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-ar.78.mcz

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

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

Name: Tests-ar.78
Author: ar
Time: 4 May 2010, 8:56:05.066 am
UUID: 65cef0b6-4fc2-4545-8c10-04b17455cf10
Ancestors: Tests-ul.77

Add SumBugs from http://bugs.squeak.org/view.php?id=6560

=============== Diff against Tests-ul.77 ===============

Item was added:
+ ----- Method: SumBugs>>testSummingToTen (in category 'as yet unclassified') -----
+ testSummingToTen
+ "self run: #testSummingToTen"
+
+ | cases |
+ cases :={
+ { 1 . 2 . 3 . 4 }.
+ { 2.0 . 2.0 . 2.0 . 2.0 . 2.0  }.
+ { 2/5 . 5/2 . 5/2 . 3/5 . 4 }
+ } .
+
+ cases do: [ :each |
+ self assert: (each  sum = 10 )
+ ] .!

Item was added:
+ ----- Method: SumBugs>>testSummingColors (in category 'as yet unclassified') -----
+ testSummingColors
+ "self run: #testSummingColors"
+ | cases |
+ cases := {
+ Color black.
+ Color red.
+ Color green.
+ Color blue.
+ Color cyan.
+ Color magenta.
+ Color yellow.
+ Color white.
+ }.
+
+ cases do: [ :each |
+ self assert: ((Array with: each) sum = each)
+ ].
+ !

Item was added:
+ TestCase subclass: #SumBugs
+ instanceVariableNames: ''
+ classVariableNames: ''
+ poolDictionaries: ''
+ category: 'Tests-Bugs'!

Item was added:
+ ----- Method: SumBugs>>testSummingWithWhite (in category 'as yet unclassified') -----
+ testSummingWithWhite
+ "self run: #testSummingWithWhite"
+
+ | cases |
+ cases := {
+ Color black.
+ Color red.
+ Color green.
+ Color blue.
+ Color cyan.
+ Color magenta.
+ Color yellow.
+ Color white.
+ } .
+
+ cases do: [ :each |
+ self assert: ((Array with: Color white with: each ) sum = Color white)
+ ] .
+
+
+
+ !

Item was added:
+ ----- Method: SumBugs>>testSummingToWhite (in category 'as yet unclassified') -----
+ testSummingToWhite
+ "self run: #testSummingToWhite"
+
+ | cases |
+ cases := {
+ { Color black . Color white }.
+ { Color red . Color green. Color blue }.
+ { Color gray . Color gray }.
+ { Color cyan. Color magenta. Color yellow }.
+ { Color cyan. Color magenta.  }.
+ {  Color magenta. Color yellow }.
+ { Color cyan.  Color yellow }.
+ { Color cyan. Color red }.
+ { Color green .Color magenta.  }.
+ { Color blue. Color yellow }.
+ } .
+
+ cases do: [ :each |
+ self assert: (each  sum = Color white)
+ ] .
+
+
+
+ !

Item was added:
+ ----- Method: SumBugs>>testSummingWithBlack (in category 'as yet unclassified') -----
+ testSummingWithBlack
+ "self run: #testSummingWithBlack"
+
+ | cases |
+ cases := {
+ Color black.
+ Color red.
+ Color green.
+ Color blue.
+ Color cyan.
+ Color magenta.
+ Color yellow.
+ Color white.
+ }.
+
+ cases do: [ :each |
+ self assert: ((Array with: each with: Color black) sum = each)
+ ] .
+
+
+
+ !