The Trunk: MorphicTests-mt.46.mcz

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

The Trunk: MorphicTests-mt.46.mcz

commits-2
Marcel Taeumel uploaded a new version of MorphicTests to project The Trunk:
http://source.squeak.org/trunk/MorphicTests-mt.46.mcz

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

Name: MorphicTests-mt.46
Author: mt
Time: 6 May 2018, 3:12:17.556836 pm
UUID: da7669ef-c6b9-1e4b-a096-8ecab904367e
Ancestors: MorphicTests-mt.45

Supplement to refactoring in Morphic-mt.1427.

=============== Diff against MorphicTests-mt.45 ===============

Item was added:
+ TestCase subclass: #BorderedMorphTests
+ instanceVariableNames: ''
+ classVariableNames: ''
+ poolDictionaries: ''
+ category: 'MorphicTests-Basic'!

Item was added:
+ ----- Method: BorderedMorphTests>>test01OldInstVarRefs (in category 'tests') -----
+ test01OldInstVarRefs
+ "Only BorderedMorph should reference the (deprecated) borderWidth and borderColor isntance variables."
+
+ self
+ assert: 2
+ equals: (SystemNavigation default allAccessesTo: #borderWidth from: BorderedMorph) size.
+
+ self
+ assert: 2
+ equals: (SystemNavigation default allAccessesTo: #borderColor from: BorderedMorph) size.!

Item was added:
+ ----- Method: BorderedMorphTests>>test02ConvertColorSymbols (in category 'tests') -----
+ test02ConvertColorSymbols
+ "The use of #inset or #raised as border color should result in the use of a new border style."
+
+ | sut |
+ sut := BorderedMorph new.
+ self
+ assert: #simple equals: sut borderStyle style;
+ assert: Color black equals: sut borderStyle color.
+
+ sut borderColor: #raised.
+ self
+ assert: #raised equals: sut borderStyle style;
+ assert: Color black equals: sut borderStyle color.
+
+ "Enable color tracking."
+ sut borderColor: Color transparent.
+ self assert: sut color equals: sut borderStyle color.
+
+ sut borderColor: #inset.
+ self
+ assert: #inset equals: sut borderStyle style;
+ assert: sut color equals: sut borderStyle color.
+ !

Item was added:
+ ----- Method: BorderedMorphTests>>test03ColorTracking (in category 'tests') -----
+ test03ColorTracking
+
+ | sut c1 c2 |
+ sut := BorderedMorph new.
+ self assert: Color black equals: sut borderStyle baseColor.
+
+ sut borderInset.
+ self
+ assert: Color transparent equals: sut borderStyle baseColor;
+ assert: sut borderStyle topLeftColor ~= sut color;
+ assert: sut borderStyle bottomRightColor ~= sut color;
+ assert: sut borderStyle bottomRightColor ~= sut borderStyle topLeftColor.
+
+ c1 := sut borderStyle topLeftColor.
+ c2 := sut borderStyle bottomRightColor.
+ sut color: Color yellow.
+ self
+ assert: Color transparent equals: sut borderStyle baseColor;
+ assert: sut borderStyle topLeftColor ~= c1;
+ assert: sut borderStyle bottomRightColor ~= c2.
+
+ c1 := sut borderStyle topLeftColor.
+ c2 := sut borderStyle bottomRightColor.
+ sut borderStyle: BorderStyle raised.
+ self
+ assert: Color transparent equals: sut borderStyle baseColor;
+ assert: sut borderStyle topLeftColor = c2;
+ assert: sut borderStyle bottomRightColor = c1.!