[squeak-dev] The Inbox: KernelTests-it.68.mcz

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

[squeak-dev] The Inbox: KernelTests-it.68.mcz

commits-2
A new version of KernelTests was added to project The Inbox:
http://source.squeak.org/inbox/KernelTests-it.68.mcz

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

Name: KernelTests-it.68
Author: it
Time: 14 July 2009, 1:43:32 am
UUID: 7d043e3b-d3b3-f649-b4ee-7434452df39a
Ancestors: KernelTests-ar.67

Added tests for Month>>indexOfMonth and Month>>nameOfMonth.

=============== Diff against KernelTests-dtl.465 ===============

Item was added:
+ ----- Method: TrueTest>>testAnd (in category 'testing') -----
+ testAnd
+
+ self assert: (true and: ['alternativeBlock']) = 'alternativeBlock'.!

Item was added:
+ ----- Method: TrueTest>>testIfTrue (in category 'testing') -----
+ testIfTrue
+
+ self assert: (true ifTrue: ['alternativeBlock']) = 'alternativeBlock'. !

Item was added:
+ ----- Method: TrueTest>>testOR (in category 'testing') -----
+ testOR
+
+ self assert: (true | true) = true.
+ self assert: (true | false) = true.!

Item was added:
+ ----- Method: MonthTest>>testNameOfMonth (in category 'Tests') -----
+ testNameOfMonth
+
+ | m |
+ m := #(#January #February #March #April #May #June #July #August #September #October #November #December).
+
+ m withIndexDo: [:item :index | self assert: (Month nameOfMonth: index) = item].
+
+ self should: [Month nameOfMonth: 0] raise: TestResult error.
+ self should: [Month nameOfMonth: 13] raise: TestResult error.
+ self should: [Month nameOfMonth: #January] raise: TestResult error.!

Item was changed:
  ----- Method: TrueTest>>testNot (in category 'testing') -----
  testNot
 
+ self assert: (true not = false).!
- self assert: (false not = true).!

Item was added:
+ ----- Method: TrueTest>>testIfTrueIfFalse (in category 'testing') -----
+ testIfTrueIfFalse
+
+ self assert: (true ifTrue: ['trueAlternativeBlock']
+                       ifFalse: ['falseAlternativeBlock']) = 'trueAlternativeBlock'. !

Item was added:
+ ----- Method: TrueTest>>testIfFalse (in category 'testing') -----
+ testIfFalse
+
+ self assert: (true ifFalse: ['alternativeBlock']) = nil. !

Item was added:
+ ----- Method: MonthTest>>testIndexOfMonth (in category 'Tests') -----
+ testIndexOfMonth
+
+ | m |
+ m := #(#January #February #March #April #May #June #July #August #September #October #November #December).
+
+ m withIndexDo: [:item :index | self assert: (Month indexOfMonth: item) = index].
+
+ self should: [Month indexOfMonth: 1] raise: TestResult error.
+ self should: [Month indexOfMonth: #1] raise: TestResult error.
+ self should: [Month indexOfMonth: #Marsh] raise: TestResult error. "notice the misspell!!"
+ self should: [Month indexOfMonth: #UnexistingMonth] raise: TestResult error.!

Item was added:
+ ----- Method: ClassBuilderFormatTests>>testChangeToVariableSubclass (in category 'testing') -----
+ testChangeToVariableSubclass
+ "Ensure that the invariants for superclass/subclass format are preserved"
+ baseClass := Object subclass: self baseClassName
+ instanceVariableNames: ''
+ classVariableNames: ''
+ poolDictionaries: ''
+ category: 'Kernel-Tests-ClassBuilder'.
+ [
+ self shouldnt:[baseClass := Object variableSubclass: self baseClassName
+ instanceVariableNames: ''
+ classVariableNames: ''
+ poolDictionaries: ''
+ category: 'Kernel-Tests-ClassBuilder'] raise: Error.
+
+ ] ensure:[self cleanup].!

Item was added:
+ ----- Method: FalseTest>>testAsBit (in category 'tests') -----
+ testAsBit
+
+ self assert: (false asBit = 0).!

Item was changed:
  ----- Method: TrueTest>>testInMemory (in category 'testing') -----
  testInMemory
 
+ self assert: (true isInMemory = true).!
- self assert: (false isInMemory = true).!

Item was added:
+ ----- Method: TrueTest>>testIfFalseIfTrue (in category 'testing') -----
+ testIfFalseIfTrue
+
+ self assert: (true ifFalse: ['falseAlternativeBlock']
+                       ifTrue: ['trueAlternativeBlock']) = 'trueAlternativeBlock'. !

Item was added:
+ ----- Method: FalseTest>>testInMemory (in category 'tests') -----
+ testInMemory
+
+ self assert: (false isInMemory = true).!

Item was added:
+ ----- Method: TrueTest>>testOr (in category 'testing') -----
+ testOr
+
+ self assert: (true or: ['alternativeBlock']) = true.!

Item was added:
+ ----- Method: TrueTest>>testAsBit (in category 'testing') -----
+ testAsBit
+
+ self assert: (true asBit = 1).!