Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

On bloc removal #278

Merged
merged 2 commits into from
Jul 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions src/BaselineOfBloc/BaselineOfBloc.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,17 @@ BaselineOfBloc >> baseline: spec [
spec
package: #'Bloc-Layout' with: [
spec requires: #('Bloc') ];
package: #'Bloc-Layout-Resizer' with: [
spec requires: #('Bloc-Layout' ) ];
package: #'Bloc-LayoutZoomable' with: [
spec requires: #('Bloc-Layout' 'Bloc-Animation') ].
"Layout depends also on compositor. See https://github.com/pharo-graphics/Bloc/issues/87"

"Infinite"
spec
package: #'Bloc-Infinite' with: [
spec requires: #('Bloc') ].

"Calypso & Spec2 Extensions"
spec
package: #'Bloc-Spec2';
Expand All @@ -114,8 +121,14 @@ BaselineOfBloc >> baseline: spec [
spec requires: #(#'Bloc-DevTool') ];
package: #'Bloc-Text-Examples' with: [
spec requires: #(#'Bloc-Examples') ];
package: #'Bloc-Infinite-Tests' with: [
spec requires: #('Bloc-Infinite') ];
package: #'Bloc-Layout-Tests' with: [
spec requires: #('Bloc-Layout' 'Bloc-Text' 'Bloc-DevTool') ].

spec
package: #'Bloc-Theme' with: [
spec requires: #(#'Bloc') ]

].
]
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Extension { #name : #BlCompositeBackgroundTest }
BlCompositeBackgroundTest >> testAeApplyTo [

| space background blElement backgroundList |
space := BlSpace new.
space := BlOSpace new.

backgroundList := OrderedCollection with: (BlBackground paint: Color blue).
background := BlCompositeBackground withAll: backgroundList.
Expand Down
2 changes: 1 addition & 1 deletion src/Bloc-Alexandrie-Tests/BlSpaceBuilder.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ BlSpaceBuilder >> initialize [

super initialize.

space := BlSpace new.
space := BlOSpace new.
spaceExtent := 100 asPoint.
host := BlOSWindowSDL2Host new.

Expand Down
13 changes: 0 additions & 13 deletions src/Bloc-Alexandrie/BlSpace.extension.st

This file was deleted.

4 changes: 2 additions & 2 deletions src/Bloc-DevTool/BlDevHalosEventListenerExample.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ BlDevHalosEventListenerExample >> activatedHalos [
anEvent modifiers
alt: true;
shift: true.
BlSpace simulateEvent: anEvent on: (aContainer childAt: 1).
BlOSpace simulateEvent: anEvent on: (aContainer childAt: 1).

theNewElements := aSpace children asArray.
"self assert: theNewElements size equals: thePriorElements size + 1."
Expand Down Expand Up @@ -86,7 +86,7 @@ BlDevHalosEventListenerExample >> newSpace [

<sampleInstance>
| aSpace |
aSpace := BlSpace new.
aSpace := BlOSpace new.
aSpace host: BlHeadlessHost new.
aSpace title: 'Async Element Examples'.
aSpace extent: 600 @ 400.
Expand Down
6 changes: 0 additions & 6 deletions src/Bloc-DevTool/BlSpace.extension.st

This file was deleted.

4 changes: 2 additions & 2 deletions src/Bloc-Examples/BlAnimationExamples.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ BlAnimationExamples class >> ballsAnim [
alp }.
els add: el ].

space := BlSpace new.
space := BlOSpace new.
space root addChildren: els.
space show.

Expand Down Expand Up @@ -88,7 +88,7 @@ BlAnimationExamples class >> sequential [
position: 100 @ 100.
element addAnimation: sequential.

space := BlSpace new.
space := BlOSpace new.
space root addChild: element.
space show
]
Expand Down
2 changes: 1 addition & 1 deletion src/Bloc-Examples/BlErrorHandlingExamples.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ BlErrorHandlingExamples >> sceneWith: aFaultyElement [

aContainer addChildren: { aLeftChild . aRightChild }.

aSpace := BlSpace new.
aSpace := BlOSpace new.
aSpace host: BlMorphicWindowHost new.
aSpace addChild: aContainer.
aSpace show.
Expand Down
2 changes: 1 addition & 1 deletion src/Bloc-Examples/BlMouseProcessorExamples.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ BlMouseProcessorExamples >> mouseProcessor [
| aMouseProcessor aSpace |
<gtExample>

aSpace := BlSpace new.
aSpace := BlOSpace new.
aMouseProcessor := BlMouseProcessor space: aSpace.

self assert: aMouseProcessor space equals: aSpace.
Expand Down
8 changes: 4 additions & 4 deletions src/Bloc-Examples/BlSharedEventDistributorExamples.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ BlSharedEventDistributorExamples >> mouseEnterEventOneOutOfTwoElements [
anElementOne when: BlMouseEnterEvent do: [ aMouseEnterOne := aMouseEnterOne + 1 ].
anElementTwo when: BlMouseEnterEvent do: [ aMouseEnterTwo := aMouseEnterTwo + 1 ].

BlSpace simulateMouseMoveInside: anElementOne.
BlOSpace simulateMouseMoveInside: anElementOne.

self assert: aMouseEnterOne equals: 1.
self assert: aMouseEnterTwo equals: 1.
Expand All @@ -118,10 +118,10 @@ BlSharedEventDistributorExamples >> mouseLeaveEventOneOutOfTwoElements [
anElementOne when: BlMouseLeaveEvent do: [ aMouseLeaveOne := aMouseLeaveOne + 1 ].
anElementTwo when: BlMouseLeaveEvent do: [ aMouseLeaveTwo := aMouseLeaveTwo + 1 ].

BlSpace
BlOSpace
simulateEvents: {
BlMouseMoveEvent new position: (BlSpace locationInside: anElementOne); screenPosition: 0@0.
BlMouseMoveEvent new position: (BlSpace locationOutside: aContainer); screenPosition: 0@0 }
BlMouseMoveEvent new position: (BlOSpace locationInside: anElementOne); screenPosition: 0@0.
BlMouseMoveEvent new position: (BlOSpace locationOutside: aContainer); screenPosition: 0@0 }
on: aContainer.

self assert: aMouseLeaveOne equals: 1.
Expand Down
2 changes: 1 addition & 1 deletion src/Bloc-Examples/BlSpaceEventExamples.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ BlSpaceEventExamples >> ignoreSpaceEventsAfterCloseRequest [
BlSpaceEventExamples >> space [
<gtExample>

^ BlSpace new host: BlHeadlessHost new
^ BlOSpace new host: BlHeadlessHost new
]

{ #category : #'show / close' }
Expand Down
2 changes: 1 addition & 1 deletion src/Bloc-Examples/BlSpaceExamplesMigrated.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ BlSpaceExamplesMigrated >> emptySpace [
<gtExample>
| aSpace |

aSpace := BlSpace new.
aSpace := BlOSpace new.
self assert: aSpace session equals: Smalltalk session.
self assert: aSpace root hasChildren not.
self assert: aSpace dirtyAreas isEmpty.
Expand Down
2 changes: 1 addition & 1 deletion src/Bloc-Examples/BlTaskTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ BlTaskTest >> testAddElementWithTaskToSpace [

| anElement aSpace aTask |
anElement := self testAddTaskToTheElementWithoutSpace.
aSpace := BlSpace new.
aSpace := BlOSpace new.
aSpace root addChild: anElement.
"task were moved to the space"
self assert: anElement taskQueue tasks isEmpty.
Expand Down
2 changes: 1 addition & 1 deletion src/Bloc-Examples/TBlExample.trait.st
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Trait {
TBlExample classSide >> openInWindow: anElement named: aTitleString extent: aPoint [
"Open a given element in a window of a provided extent and specified title"
| aSpace |
aSpace := BlSpace new
aSpace := BlOSpace new
extent: aPoint;
title: aTitleString.

Expand Down
75 changes: 75 additions & 0 deletions src/Bloc-Infinite-Tests/BlParameterizedTest.class.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
Class {
#name : #BlParameterizedTest,
#superclass : #ParametrizedTestCase,
#instVars : [
'testingSpaces',
'hostClass'
],
#category : #'Bloc-Infinite-Tests'
}

{ #category : #testing }
BlParameterizedTest class >> isAbstract [

^ self == BlParameterizedTest
]

{ #category : #tests }
BlParameterizedTest class >> testParameters [

^ ParametrizedTestMatrix new
forSelector: #hostClass
addOptions: {
BlOSWindowSDL2Host.
BlMockedHost.
BlMorphicWindowHost }
]

{ #category : #accessing }
BlParameterizedTest >> hostClass [

^ hostClass
]

{ #category : #accessing }
BlParameterizedTest >> hostClass: aClass [

hostClass := aClass
]

{ #category : #'instance creation' }
BlParameterizedTest >> newTestingSpace [

| aSpace |
aSpace := BlSpace new.
aSpace host: hostClass new.
testingSpaces add: aSpace.
^ aSpace
]

{ #category : #running }
BlParameterizedTest >> setUp [
super setUp.

testingSpaces := OrderedCollection new.
]

{ #category : #running }
BlParameterizedTest >> tearDown [

self waitTestingSpaces.
testingSpaces do: [ :each | each close ].
self waitTestingSpaces.

super tearDown.

]

{ #category : #tests }
BlParameterizedTest >> waitTestingSpaces [

testingSpaces do: [ :each |
self assert: (BlSpace
pulseUntilEmptyTaskQueue: each
timeout: 200 milliSeconds) ]
]
Loading
Loading