Skip to content

Commit

Permalink
feature/fix tests (#39)
Browse files Browse the repository at this point in the history
* Removed animation tests
* Added accessing tests for all propertys
* Restructured animations editor tests
* Update .smalltalk.ston

Co-authored-by: Tim <49529745+1T1m@users.noreply.github.com>
  • Loading branch information
dmatuschek and 1T1m committed Aug 7, 2020
1 parent b404d1c commit 3d0cd68
Show file tree
Hide file tree
Showing 69 changed files with 378 additions and 82 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
defaults
defaultEmptyPanels
^ OrderedCollection new.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
accessing
emptyPanels
emptyPanels
ifNil: [self emptyPanels: OrderedCollection new].
ifNil: [self emptyPanels: self defaultEmptyPanels].

^ emptyPanels.
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
buildComponents
accessing
informationBar: aPluggableTextSpec
informationBar := aPluggableTextSpec.
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
buildComponents
accessing
informationBar
^ informationBar.
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,11 @@
"createPositionPropertyFrom:" : "DM 8/6/2020 10:09",
"createRotationPropertyFrom:" : "DM 7/8/2020 14:29",
"createSizePropertyFrom:" : "DM 7/8/2020 14:29",
"defaultEmptyPanels" : "DM 8/7/2020 17:37",
"defaultPropertyPanelPosition" : "DM 8/6/2020 10:38",
"editorTitle" : "LH 8/4/2020 10:31",
"editorTitle:" : "DM 8/3/2020 15:40",
"emptyPanels" : "DM 8/6/2020 10:40",
"emptyPanels" : "DM 8/7/2020 17:37",
"emptyPanels:" : "DM 6/12/2020 20:40",
"getDeepestMorph:at:" : "DM 6/22/2020 01:25",
"handleListenEvent:" : "DM 8/5/2020 21:11",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
default
defaults
defaultSubproperties
^ (OrderedCollection new).
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
default
defaults
defaultTargetDuration
^ 500.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ animationString
startValue: 1.0;
endValue: 0.0;
duration: ', (self targetDuration//2),';
finishBlock: [aMorph color: ', self colorAsString, '.]);
finishBlock: [aMorph color: ', self targetColorAsString, '.]);
add: (AnimAlphaBlendAnimation new
morph: aMorph;
startValue: 0.0;
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
defaults
defaultTargetColor
^ Color white.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
accessing
targetColor
targetColor
ifNil: [self targetColor: Color veryLightGray].
ifNil: [self targetColor: self defaultTargetColor].

^ targetColor.
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
"class" : {
},
"instance" : {
"animationString" : "DM 8/6/2020 10:15",
"animationString" : "DM 8/7/2020 17:18",
"buildInputColorWith:" : "DM 8/7/2020 10:49",
"buildPanelWith:" : "DM 7/7/2020 10:13",
"buildUIWith:" : "JIZ 6/3/2020 17:10",
"canCreateAnimation" : "DM 8/6/2020 10:26",
"canRenderUI" : "DM 8/5/2020 21:07",
"colorAsString" : "DM 8/6/2020 10:42",
"createAnimationFor:" : "DM 8/6/2020 10:20",
"createAnimationFor:withDuration:" : "DM 8/6/2020 11:03",
"defaultTargetColor" : "DM 8/7/2020 17:34",
"initialize" : "DM 7/7/2020 10:44",
"targetColor" : "DM 8/6/2020 10:43",
"targetColor" : "DM 8/7/2020 17:19",
"targetColor:" : "DM 8/6/2020 10:41",
"targetColorAsString" : "DM 8/7/2020 10:49" } }
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
as yet unclassified
testCanCreateAnimation
| p |
p := AnimationsEditorPropertyColor new.

self assert: (p canCreateAnimation = true).
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
as yet unclassified
testCanRenderUI
| p |
p := AnimationsEditorPropertyColor new.

self assert: (p canRenderUI = true).
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
as yet unclassified
testInstanceCreation
self assert: (AnimationsEditorPropertyColor new = nil) not.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
as yet unclassified
testTargetColorGetter
| p |
p := AnimationsEditorPropertyColor new.

self assert: (p targetColor = p defaultTargetColor).
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
as yet unclassified
testTargetColorGetterAsString
| p |
p := AnimationsEditorPropertyColor new.

self assert: (p targetColorAsString = p defaultTargetColor asString).
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
as yet unclassified
testTargetColorSetter
| p testColor |
p := AnimationsEditorPropertyColor new.

testColor := 'red'.
p targetColor: testColor.
self assert: (p targetColor = Color red).
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"class" : {
},
"instance" : {
"testCanCreateAnimation" : "DM 8/7/2020 17:19",
"testCanRenderUI" : "DM 8/7/2020 17:19",
"testInstanceCreation" : "DM 8/7/2020 17:19",
"testTargetColorGetter" : "DM 8/7/2020 17:32",
"testTargetColorGetterAsString" : "DM 8/7/2020 17:31",
"testTargetColorSetter" : "DM 8/7/2020 17:21" } }
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"category" : "AnimationsEditor-Tests",
"classinstvars" : [
],
"classvars" : [
],
"commentStamp" : "",
"instvars" : [
],
"name" : "AnimationsEditorPropertyColorTest",
"pools" : [
],
"super" : "TestCase",
"type" : "normal" }
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
as yet unclassified
testCanCreateAnimation
| p |
p := AnimationsEditorPropertyPosition new.

self assert: (p canCreateAnimation = true).
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
as yet unclassified
testCanRenderUI
| p |
p := AnimationsEditorPropertyPosition new.

self assert: (p canRenderUI = true).

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
as yet unclassified
testPositionXGetter
| p |
p := AnimationsEditorPropertyPosition new.
self assert: (p positionX = (p defaultTargetPosition x) asString).
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
as yet unclassified
testPositionXSetter
| p testX |
p := AnimationsEditorPropertyPosition new.

testX := 3423.
p positionX: testX.
self assert: (p positionX = testX asString).
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
as yet unclassified
testPositionYGetter
| p |
p := AnimationsEditorPropertyPosition new.
self assert: (p positionY = (p defaultTargetPosition y) asString).
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
as yet unclassified
testPositionYSetter
| p testY |
p := AnimationsEditorPropertyPosition new.

testY := 3423.
p positionY: testY.
self assert: (p positionY = testY asString).

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
as yet unclassified
testTargetPositionGetter
| p |
p := AnimationsEditorPropertyPosition new.
self assert: (p targetPosition = p defaultTargetPosition).
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
as yet unclassified
testTargetPositionSetter
| p tempPosition |
p := AnimationsEditorPropertyPosition new.
tempPosition := 200@100.
p targetPosition: tempPosition.

self assert: (p targetPosition = tempPosition).
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@
"class" : {
},
"instance" : {
"testCreateAnimation" : "DM 8/4/2020 13:37",
"testCanCreateAnimation" : "DM 8/7/2020 13:41",
"testCanRenderUI" : "DM 8/7/2020 13:42",
"testInstanceCreation" : "DM 8/4/2020 13:33",
"testPositionAccessors" : "DM 8/4/2020 13:44",
"testSetPosition" : "DM 8/4/2020 13:44" } }
"testPositionXGetter" : "DM 8/7/2020 13:15",
"testPositionXSetter" : "DM 8/7/2020 13:13",
"testPositionYGetter" : "DM 8/7/2020 13:15",
"testPositionYSetter" : "DM 8/7/2020 13:14",
"testTargetPositionGetter" : "DM 8/7/2020 13:38",
"testTargetPositionSetter" : "DM 8/7/2020 13:39" } }
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
as yet unclassified
testCanCreateAnimation
| p |
p := AnimationsEditorPropertyRotation new.

self assert: (p canCreateAnimation = true).
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
as yet unclassified
testCanRenderUI
| p |
p := AnimationsEditorPropertyRotation new.

self assert: (p canRenderUI = true).
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
as yet unclassified
testInstanceCreation
self assert: (AnimationsEditorPropertyRotation new = nil) not.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
as yet unclassified
testTargetRotationGetter
| p |
p := AnimationsEditorPropertyRotation new.
self assert: (p targetRotation = p defaultTargetRotation).
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
as yet unclassified
testTargetRotationGetterAsString
| p |
p := AnimationsEditorPropertyRotation new.
self assert: (p targetRotationAsString = p defaultTargetRotation asString).
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
as yet unclassified
testTargetRotationSetter
| p testRotation |
p := AnimationsEditorPropertyRotation new.

testRotation := 3423.
p targetRotation: testRotation.
self assert: (p targetRotation = testRotation).
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"class" : {
},
"instance" : {
"testCanCreateAnimation" : "DM 8/7/2020 17:14",
"testCanRenderUI" : "DM 8/7/2020 17:14",
"testInstanceCreation" : "DM 8/7/2020 17:14",
"testTargetRotationGetter" : "DM 8/7/2020 17:17",
"testTargetRotationGetterAsString" : "DM 8/7/2020 17:17",
"testTargetRotationSetter" : "DM 8/7/2020 17:16" } }
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"category" : "AnimationsEditor-Tests",
"classinstvars" : [
],
"classvars" : [
],
"commentStamp" : "",
"instvars" : [
],
"name" : "AnimationsEditorPropertyRotationTest",
"pools" : [
],
"super" : "TestCase",
"type" : "normal" }
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
as yet unclassified
testCanCreateAnimation
| p |
p := AnimationsEditorPropertySize new.

self assert: (p canCreateAnimation = true).
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
as yet unclassified
testCanRenderUI
| p |
p := AnimationsEditorPropertySize new.

self assert: (p canRenderUI = true).
Loading

0 comments on commit 3d0cd68

Please sign in to comment.