Skip to content

Commit

Permalink
Merge pull request #63 from pavel-krivanek/fixDependentPackages
Browse files Browse the repository at this point in the history
Fix usage of removed dependentPackages
  • Loading branch information
jecisc authored May 6, 2024
2 parents f926555 + 50107fd commit 3af02a4
Show file tree
Hide file tree
Showing 26 changed files with 314 additions and 262 deletions.
36 changes: 19 additions & 17 deletions src/Roassal-Global-Tests/RSAdjacencyMatrixBuilderTest.class.st
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
Class {
#name : #RSAdjacencyMatrixBuilderTest,
#superclass : #RSTest,
#name : 'RSAdjacencyMatrixBuilderTest',
#superclass : 'RSTest',
#instVars : [
'empty',
'b'
],
#category : 'Roassal-Global-Tests-Examples'
#category : 'Roassal-Global-Tests-Examples',
#package : 'Roassal-Global-Tests',
#tag : 'Examples'
}

{ #category : #running }
{ #category : 'running' }
RSAdjacencyMatrixBuilderTest >> setUp [

super setUp.
Expand All @@ -19,30 +21,30 @@ RSAdjacencyMatrixBuilderTest >> setUp [
b connections: { 1 -> 2 . 1 -> 3 . 2 -> 4 }
]

{ #category : #tests }
{ #category : 'tests' }
RSAdjacencyMatrixBuilderTest >> testBasic01 [

self assert: empty numberOfObjects equals: 0.
self assert: empty numberOfConnections equals: 0
]

{ #category : #tests }
{ #category : 'tests' }
RSAdjacencyMatrixBuilderTest >> testBasic02 [

empty objects: (1 to: 10).
self assert: empty numberOfObjects equals: 10.
self assert: empty numberOfConnections equals: 0
]

{ #category : #tests }
{ #category : 'tests' }
RSAdjacencyMatrixBuilderTest >> testBasic03 [

empty objects: #( 'hello' 'bonjour' 'Guten Morgen' ).
self assert: empty numberOfObjects equals: 3.
self assert: empty numberOfConnections equals: 0
]

{ #category : #tests }
{ #category : 'tests' }
RSAdjacencyMatrixBuilderTest >> testConnections01 [

empty connections: {
Expand All @@ -56,13 +58,13 @@ RSAdjacencyMatrixBuilderTest >> testConnections01 [
self deny: (empty does: 1 dependsOn: 42)
]

{ #category : #tests }
{ #category : 'tests' }
RSAdjacencyMatrixBuilderTest >> testCycle01 [

self deny: b hasCycle
]

{ #category : #tests }
{ #category : 'tests' }
RSAdjacencyMatrixBuilderTest >> testCycle02 [

b := RSAdjacencyMatrixBuilder new.
Expand All @@ -80,13 +82,13 @@ RSAdjacencyMatrixBuilderTest >> testCycle02 [
self assert: b hasCycle
]

{ #category : #tests }
{ #category : 'tests' }
RSAdjacencyMatrixBuilderTest >> testCycle03 [

self deny: empty hasCycle
]

{ #category : #tests }
{ #category : 'tests' }
RSAdjacencyMatrixBuilderTest >> testCycle04 [

b := RSAdjacencyMatrixBuilder new.
Expand Down Expand Up @@ -122,7 +124,7 @@ RSAdjacencyMatrixBuilderTest >> testCycle04 [
self assert: (b getAllCycles includes: (Set withAll: #(3 4)))
]

{ #category : #tests }
{ #category : 'tests' }
RSAdjacencyMatrixBuilderTest >> testIncomingConnectionsOf [
self assert: (b incomingConnectionsOf: 3) equals: #(3).
self assert: (b numberOfIncomingConnectionsOf: 4) equals: 1.
Expand All @@ -131,14 +133,14 @@ RSAdjacencyMatrixBuilderTest >> testIncomingConnectionsOf [
self assert: (b numberOfIncomingConnectionsOf: 1) equals: 0
]

{ #category : #tests }
{ #category : 'tests' }
RSAdjacencyMatrixBuilderTest >> testOutgoingConnectionsOf [
self assert: (b outgoingConnectionsOf: 1) equals: #(2 3).
self assert: (b numberOfOutgoingConnectionsOf: 1) equals: 2.
self assert: (b numberOfOutgoingConnectionsOf: 2) equals: 1
]

{ #category : #tests }
{ #category : 'tests' }
RSAdjacencyMatrixBuilderTest >> testRendering01 [
| canvas allCells |
canvas := b build.
Expand All @@ -155,13 +157,13 @@ RSAdjacencyMatrixBuilderTest >> testRendering01 [
self assert: allCells second color equals: b connectingColor
]

{ #category : #tests }
{ #category : 'tests' }
RSAdjacencyMatrixBuilderTest >> testSorting01 [
b build.
self assert: b objects equals: (1 to: 4)
]

{ #category : #tests }
{ #category : 'tests' }
RSAdjacencyMatrixBuilderTest >> testSorting02 [
b := RSAdjacencyMatrixBuilder new.
b objects: (1 to: 4).
Expand Down
18 changes: 10 additions & 8 deletions src/Roassal-Global-Tests/RSAttachPointTest.class.st
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
Class {
#name : #RSAttachPointTest,
#superclass : #RSTest,
#category : 'Roassal-Global-Tests-Shapes'
#name : 'RSAttachPointTest',
#superclass : 'RSTest',
#category : 'Roassal-Global-Tests-Shapes',
#package : 'Roassal-Global-Tests',
#tag : 'Shapes'
}

{ #category : #tests }
{ #category : 'tests' }
RSAttachPointTest >> testBorderAttachPoint [
| b1 b2 l c |
b1 := RSBox new size: 20.
Expand All @@ -25,7 +27,7 @@ RSAttachPointTest >> testBorderAttachPoint [
self assert: (l attachPoint endingPointOf: l) equals: 50 @ 45
]

{ #category : #tests }
{ #category : 'tests' }
RSAttachPointTest >> testCenteredAttachPoint [
| b1 b2 l c |
b1 := RSBox new size: 20.
Expand All @@ -46,7 +48,7 @@ RSAttachPointTest >> testCenteredAttachPoint [
self assert: (l attachPoint endingPointOf: l) equals: 60 @ 50
]

{ #category : #tests }
{ #category : 'tests' }
RSAttachPointTest >> testHorizontalAttachPoint [
| b1 b2 l c |
b1 := RSBox new size: 20.
Expand All @@ -67,7 +69,7 @@ RSAttachPointTest >> testHorizontalAttachPoint [
self assert: (l attachPoint endingPointOf: l) equals: 50 @ 50
]

{ #category : #tests }
{ #category : 'tests' }
RSAttachPointTest >> testInverted [
| ap e1 e2 line |
ap := RSCenteredAttachPoint new.
Expand All @@ -87,7 +89,7 @@ RSAttachPointTest >> testInverted [
self assert: e1 position equals: line endPoint
]

{ #category : #tests }
{ #category : 'tests' }
RSAttachPointTest >> testVerticalAttachPoint [
| b1 b2 l c |
b1 := RSBox new size: 20.
Expand Down
20 changes: 11 additions & 9 deletions src/Roassal-Global-Tests/RSCameraTest.class.st
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
Class {
#name : #RSCameraTest,
#superclass : #RSTest,
#category : 'Roassal-Global-Tests-Core'
#name : 'RSCameraTest',
#superclass : 'RSTest',
#category : 'Roassal-Global-Tests-Core',
#package : 'Roassal-Global-Tests',
#tag : 'Core'
}

{ #category : #tests }
{ #category : 'tests' }
RSCameraTest >> testMatrix [
| canvas |
canvas := RSCanvas new.
self assert: canvas camera matrix isIdentity
]

{ #category : #tests }
{ #category : 'tests' }
RSCameraTest >> testPosition [

| c |
Expand All @@ -21,15 +23,15 @@ RSCameraTest >> testPosition [
self assert: c camera position equals: 25 @ 15
]

{ #category : #tests }
{ #category : 'tests' }
RSCameraTest >> testVisibleArea [
| canvas |
canvas := RSCanvas new.
canvas extent: 100 asPoint.
self assert: canvas visibleRectangle equals: (-50 asPoint corner: 50 asPoint)
]

{ #category : #tests }
{ #category : 'tests' }
RSCameraTest >> testVisibleAreaTopLeft [
| canvas |
canvas := RSCanvas new.
Expand All @@ -38,7 +40,7 @@ RSCameraTest >> testVisibleAreaTopLeft [
self assert: canvas visibleRectangle equals: (0 asPoint corner: 100 asPoint)
]

{ #category : #tests }
{ #category : 'tests' }
RSCameraTest >> testVisibleAreaWTopLeftWithScale [
| canvas |
canvas := RSCanvas new.
Expand All @@ -48,7 +50,7 @@ RSCameraTest >> testVisibleAreaWTopLeftWithScale [
self assert: canvas visibleRectangle equals: (0 asPoint corner: 50 asPoint)
]

{ #category : #tests }
{ #category : 'tests' }
RSCameraTest >> testVisibleAreaWithScale [
| canvas |
canvas := RSCanvas new.
Expand Down
16 changes: 9 additions & 7 deletions src/Roassal-Global-Tests/RSChannelTest.class.st
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
Class {
#name : #RSChannelTest,
#superclass : #RSTest,
#category : 'Roassal-Global-Tests-Mondrian'
#name : 'RSChannelTest',
#superclass : 'RSTest',
#category : 'Roassal-Global-Tests-Mondrian',
#package : 'Roassal-Global-Tests',
#tag : 'Mondrian'
}

{ #category : #tests }
{ #category : 'tests' }
RSChannelTest >> testAnnouncement [

| c start end channel |
Expand All @@ -23,7 +25,7 @@ RSChannelTest >> testAnnouncement [
self assert: start announcer numberOfSubscriptions equals: 5
]

{ #category : #tests }
{ #category : 'tests' }
RSChannelTest >> testBasic [

| c m mondrianNodes oddLabel evenLabel bigLabel smallLabel g channel |
Expand Down Expand Up @@ -82,7 +84,7 @@ RSChannelTest >> testBasic [
oddLabel announce: RSMouseClick
]

{ #category : #tests }
{ #category : 'tests' }
RSChannelTest >> testBasicWithCallbacks [

| c m mondrianNodes oddLabel evenLabel bigLabel smallLabel g channel value |
Expand Down Expand Up @@ -149,7 +151,7 @@ RSChannelTest >> testBasicWithCallbacks [
self assert: value asArray equals: #('ONOdd' 'OFFOdd')
]

{ #category : #tests }
{ #category : 'tests' }
RSChannelTest >> testLocationsOfUnderlines [

| c lbl1 lbl2 box channel1 channel2 markBlue markRed |
Expand Down
20 changes: 11 additions & 9 deletions src/Roassal-Global-Tests/RSCircleVennDiagramTest.class.st
Original file line number Diff line number Diff line change
@@ -1,50 +1,52 @@
Class {
#name : #RSCircleVennDiagramTest,
#superclass : #RSTest,
#name : 'RSCircleVennDiagramTest',
#superclass : 'RSTest',
#instVars : [
'vennDiagram'
],
#category : 'Roassal-Global-Tests-Builder'
#category : 'Roassal-Global-Tests-Builder',
#package : 'Roassal-Global-Tests',
#tag : 'Builder'
}

{ #category : #running }
{ #category : 'running' }
RSCircleVennDiagramTest >> setUp [
super setUp.

vennDiagram := RSCircleVennDiagram new
]

{ #category : #tests }
{ #category : 'tests' }
RSCircleVennDiagramTest >> testBasicVennDiagramOpen [

| window |
window := vennDiagram open.
window delete
]

{ #category : #tests }
{ #category : 'tests' }
RSCircleVennDiagramTest >> testVennDiagramConvertsBigSetInputToSet [

vennDiagram bigSet: { 1 . 2 }.
self assert: vennDiagram bigSet class equals: Set
]

{ #category : #tests }
{ #category : 'tests' }
RSCircleVennDiagramTest >> testVennDiagramConvertsSmallSetInputToSet [

vennDiagram smallSet: { 1 . 2 }.
self assert: vennDiagram smallSet class equals: Set
]

{ #category : #tests }
{ #category : 'tests' }
RSCircleVennDiagramTest >> testVennDiagramOneSet [

vennDiagram bigSet: { 3 . 2 }.
vennDiagram build.
self assert: vennDiagram canvas shapes size equals: 0
]

{ #category : #tests }
{ #category : 'tests' }
RSCircleVennDiagramTest >> testVennDiagramTwoSets [

vennDiagram bigSet: { 3 . 2 }.
Expand Down
Loading

0 comments on commit 3af02a4

Please sign in to comment.