Skip to content

Commit

Permalink
Improve Testcode and MarkdownSettings
Browse files Browse the repository at this point in the history
  • Loading branch information
JulianEgbert committed Jun 2, 2021
1 parent 9ce020b commit 586b1a6
Show file tree
Hide file tree
Showing 17 changed files with 38 additions and 47 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
constants
blockStylerMorphExtent

^ 500 @ 70

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@ initialize
initialize

super initialize.
self blockStylerMorphs: OrderedCollection new.
self editors: OrderedCollection new.
self window: self noWindow.

self initializeBlockStylerMorphs.
self currentStyleSettings: MarkdownStyleSettings default
editors := OrderedCollection new.
self blockStylerMorphs: OrderedCollection new;
window: self noWindow;
initializeBlockStylerMorphs;
currentStyleSettings: MarkdownStyleSettings default

Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ initializeBlockStylerMorphsFor: aBlockClass
with: aBlockClass canChangeFontSize
and: aBlockClass canChangeFontColor
and: aBlockClass blockCategory.
blockStylerMorph extent: 500 @ 70.
blockStylerMorph extent: self blockStylerMorphExtent.

blockStylerMorph addDependent: self.
self blockStylerMorphs add: blockStylerMorph]
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"addStylerMorphsFor:" : "jh 6/1/2021 20:20",
"applyBarContent:" : "JE 5/31/2021 19:10",
"applyUserInterfaceTheme" : "mf 5/30/2021 00:34",
"blockStylerMorphExtent" : "JE 6/2/2021 14:59",
"blockStylerMorphs" : "jh 5/19/2021 11:38",
"blockStylerMorphs:" : "JE 5/31/2021 19:12",
"buildApplyBarWith:" : "JE 5/31/2021 19:10",
Expand All @@ -25,13 +26,12 @@
"currentStyleSettings" : "jh 5/19/2021 11:38",
"currentStyleSettings:" : "jh 5/19/2021 16:19",
"editors" : "jh 5/20/2021 18:15",
"editors:" : "JE 5/31/2021 19:13",
"handleApply" : "jh 5/19/2021 16:20",
"handleCancel" : "jh 5/19/2021 18:29",
"ifWindowNotPresent:" : "jh 5/29/2021 10:57",
"initialize" : "jh 5/29/2021 10:49",
"initialize" : "JE 6/2/2021 15:14",
"initializeBlockStylerMorphs" : "jh 5/19/2021 13:12",
"initializeBlockStylerMorphsFor:" : "jh 6/1/2021 20:39",
"initializeBlockStylerMorphsFor:" : "JE 6/2/2021 14:59",
"label" : "jh 5/27/2021 09:58",
"menuBarHeight" : "JE 5/31/2021 19:38",
"menubarContent:" : "JE 5/31/2021 19:11",
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"default" : "azi 8/6/2020 07:19",
"maxFontSize" : "azi 6/12/2020 02:58",
"minFontSize" : "azi 6/12/2020 02:58",
"newFrom:" : "JE 5/31/2021 19:52",
"setColorsToDefaultOf:" : "jh 5/30/2021 16:46",
"themeButtonMorphColor" : "JE 5/31/2021 19:52",
"themeButtonMorphTextColor" : "JE 5/31/2021 19:52",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
as yet unclassified
constants
boxPositionsForWidth250AndHeight70

^ {0 @ 13.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
as yet unclassified
constants
boxPositionsForWidth400AndHeight80

^ {0 @ 17.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
as yet unclassified
running
setUp

chooser := MarkdownColorChooser new.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
as yet unclassified
running
tearDown

chooser delete
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
as yet unclassified
tests
testLayoutProportions

chooser width: 300.
| width |
width := 300.
chooser width: width.

self assert: advancedPicker width = 200.
self assert: chooser advancedPickerWidth = 200.
self assert: chooser simpleChooserWidth = 100
self assert: width * 2/3 equals: advancedPicker width.
self assert: width * 2/3 equals: chooser advancedPickerWidth.
self assert: width * 1/3 equals: chooser simpleChooserWidth
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
as yet unclassified
tests
testNumberOfSimpleChoosersIs6

self assert: chooser totalSimpleColorChooser = 6
self assert: 6 equals: chooser totalSimpleColorChooser
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
as yet unclassified
tests
testSimpleBoxPositions

| positions |
Expand All @@ -9,6 +9,4 @@ testSimpleBoxPositions
positions := OrderedCollection new.
simpleChoosers do: [:box | positions add: box position].

Transcript show: self boxPositionsForWidth250AndHeight70 class.

self assert: positions = self boxPositionsForWidth250AndHeight70
self assert: self boxPositionsForWidth250AndHeight70 equals: positions
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
as yet unclassified
tests
testSimpleBoxPositionsExtent

| positions |
Expand All @@ -8,5 +8,5 @@ testSimpleBoxPositionsExtent
positions := OrderedCollection new.
simpleChoosers do: [:box | positions add: box position].

self deny: positions = self boxPositionsForWidth250AndHeight70.
self assert: positions = self boxPositionsForWidth400AndHeight80
self deny: self boxPositionsForWidth250AndHeight70 equals: positions.
self assert: self boxPositionsForWidth400AndHeight80 equals: positions
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
as yet unclassified
tests
testSimpleColorChooserSizeIs15

self assert: chooser simpleColorChoosersSize = 15
self assert: 15 equals: chooser simpleColorChoosersSize
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"boxPositionsForWidth400AndHeight80" : "jh 6/1/2021 11:40",
"setUp" : "jh 6/1/2021 11:32",
"tearDown" : "jh 6/1/2021 11:12",
"testLayoutProportions" : "jh 6/1/2021 11:34",
"testNumberOfSimpleChoosersIs6" : "jh 6/1/2021 11:36",
"testSimpleBoxPositions" : "jh 6/1/2021 11:32",
"testSimpleBoxPositionsExtent" : "jh 6/1/2021 11:40",
"testSimpleColorChooserSizeIs15" : "jh 6/1/2021 11:37" } }
"testLayoutProportions" : "JE 6/2/2021 15:11",
"testNumberOfSimpleChoosersIs6" : "JE 6/2/2021 15:11",
"testSimpleBoxPositions" : "JE 6/2/2021 15:11",
"testSimpleBoxPositionsExtent" : "JE 6/2/2021 15:08",
"testSimpleColorChooserSizeIs15" : "JE 6/2/2021 15:08" } }

0 comments on commit 586b1a6

Please sign in to comment.