Skip to content

Commit

Permalink
Renamed package and baseline
Browse files Browse the repository at this point in the history
  • Loading branch information
JanBliznicenko committed Nov 10, 2024
1 parent cbc45f4 commit 28a6d8a
Show file tree
Hide file tree
Showing 17 changed files with 732 additions and 732 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
"
Baseline for https://github.com/OpenPonk/synchronized-links
"
Class {
#name : 'BaselineOfOpenPonkSynchronizedLinks',
#superclass : 'BaselineOf',
#category : 'BaselineOfOpenPonkSynchronizedLinks',
#package : 'BaselineOfOpenPonkSynchronizedLinks'
}

{ #category : 'baselines' }
BaselineOfOpenPonkSynchronizedLinks >> baseline: spec [
<baseline>
spec
for: #common
do: [ spec package: 'OpenPonk-SynchronizedLinks'.
spec group: 'default' with: #('OpenPonk-SynchronizedLinks') ]
]
1 change: 1 addition & 0 deletions repository/BaselineOfOpenPonkSynchronizedLinks/package.st
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Package { #name : 'BaselineOfOpenPonkSynchronizedLinks' }

This file was deleted.

1 change: 0 additions & 1 deletion repository/BaselineOfSynchronizedLinks/package.st

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,81 +1,81 @@
Class {
#name : 'SRManyToManyLinkInterfaceTest',
#superclass : 'TestCase',
#instVars : [
'a1',
'b1',
'b2'
],
#category : 'SynchronizedLinks-Tests',
#package : 'SynchronizedLinks',
#tag : 'Tests'
}

{ #category : 'initialization' }
SRManyToManyLinkInterfaceTest >> setUp [
a1 := SRTestAuthor new.
b1 := SRTestBook new.
b2 := SRTestBook new.
a1 books add: b1.
a1 books add: b2
]

{ #category : 'tests' }
SRManyToManyLinkInterfaceTest >> testAt [
self assert: (a1 books at: 1) equals: a1 books first.
self assert: (a1 books at: 2) equals: a1 books second
]

{ #category : 'tests' }
SRManyToManyLinkInterfaceTest >> testAtLast [
self assert: (a1 books atLast: 2) equals: a1 books first.
self assert: (a1 books atLast: 1) equals: a1 books second
]

{ #category : 'tests' }
SRManyToManyLinkInterfaceTest >> testCopy [
| books copy |
books := a1 books.
copy := books copy.
self assert: books size equals: 2.
self assert: copy size equals: 2.
copy remove: copy first.
self assert: books size equals: 2.
self assert: copy size equals: 1.
copy remove: copy first.
self assert: books size equals: 2.
self assert: copy size equals: 0
]

{ #category : 'tests' }
SRManyToManyLinkInterfaceTest >> testCopyEmpty [
| empty |
empty := a1 books copyEmpty.
self assert: empty isEmpty.
self assert: empty species equals: a1 books species
]

{ #category : 'tests' }
SRManyToManyLinkInterfaceTest >> testFirst [
self assert: a1 books first equals: b1
]

{ #category : 'tests' }
SRManyToManyLinkInterfaceTest >> testLast [
self assert: a1 books last equals: b2
]

{ #category : 'tests' }
SRManyToManyLinkInterfaceTest >> testLastN [
self assert: (a1 books last: 2) asArray equals: (Array with: b1 with: b2)
]

{ #category : 'tests' }
SRManyToManyLinkInterfaceTest >> testSecond [
self assert: a1 books second equals: b2
]

{ #category : 'tests' }
SRManyToManyLinkInterfaceTest >> testSpecies [
self assert: a1 books species equals: OrderedCollection
]
Class {
#name : 'SRManyToManyLinkInterfaceTest',
#superclass : 'TestCase',
#instVars : [
'a1',
'b1',
'b2'
],
#category : 'OpenPonk-SynchronizedLinks-Tests',
#package : 'OpenPonk-SynchronizedLinks',
#tag : 'Tests'
}

{ #category : 'initialization' }
SRManyToManyLinkInterfaceTest >> setUp [
a1 := SRTestAuthor new.
b1 := SRTestBook new.
b2 := SRTestBook new.
a1 books add: b1.
a1 books add: b2
]

{ #category : 'tests' }
SRManyToManyLinkInterfaceTest >> testAt [
self assert: (a1 books at: 1) equals: a1 books first.
self assert: (a1 books at: 2) equals: a1 books second
]

{ #category : 'tests' }
SRManyToManyLinkInterfaceTest >> testAtLast [
self assert: (a1 books atLast: 2) equals: a1 books first.
self assert: (a1 books atLast: 1) equals: a1 books second
]

{ #category : 'tests' }
SRManyToManyLinkInterfaceTest >> testCopy [
| books copy |
books := a1 books.
copy := books copy.
self assert: books size equals: 2.
self assert: copy size equals: 2.
copy remove: copy first.
self assert: books size equals: 2.
self assert: copy size equals: 1.
copy remove: copy first.
self assert: books size equals: 2.
self assert: copy size equals: 0
]

{ #category : 'tests' }
SRManyToManyLinkInterfaceTest >> testCopyEmpty [
| empty |
empty := a1 books copyEmpty.
self assert: empty isEmpty.
self assert: empty species equals: a1 books species
]

{ #category : 'tests' }
SRManyToManyLinkInterfaceTest >> testFirst [
self assert: a1 books first equals: b1
]

{ #category : 'tests' }
SRManyToManyLinkInterfaceTest >> testLast [
self assert: a1 books last equals: b2
]

{ #category : 'tests' }
SRManyToManyLinkInterfaceTest >> testLastN [
self assert: (a1 books last: 2) asArray equals: (Array with: b1 with: b2)
]

{ #category : 'tests' }
SRManyToManyLinkInterfaceTest >> testSecond [
self assert: a1 books second equals: b2
]

{ #category : 'tests' }
SRManyToManyLinkInterfaceTest >> testSpecies [
self assert: a1 books species equals: OrderedCollection
]
Original file line number Diff line number Diff line change
@@ -1,92 +1,92 @@
Class {
#name : 'SRManyToManyLinkTest',
#superclass : 'TestCase',
#category : 'SynchronizedLinks-Tests',
#package : 'SynchronizedLinks',
#tag : 'Tests'
}

{ #category : 'tests' }
SRManyToManyLinkTest >> testChangePair [
| a1 b1 a2 b2 |
a1 := SRTestAuthor new.
b1 := SRTestBook new.
a1 books add: b1.
a2 := SRTestAuthor new.
b2 := SRTestBook new.
a2 books add: b2.
a2 books add: b1.
self assert: a1 books asArray equals: {b1}.
self assert: a2 books asArray equals: (Array with: b2 with: b1).
self assert: b1 authors asArray equals: (Array with: a1 with: a2).
self assert: b2 authors asArray equals: {a2}
]

{ #category : 'tests' }
SRManyToManyLinkTest >> testFromCollection [
| a1 b1 b2 |
a1 := SRTestAuthor new.
b1 := SRTestBook new.
a1 books add: b1.
b2 := SRTestBook new.
a1 books: {b2}.
self assert: a1 books asArray equals: {b2}.
self assert: b2 authors asArray equals: {a1}.
self assert: b1 authors asArray equals: {}
]

{ #category : 'tests' }
SRManyToManyLinkTest >> testFromCollectionMultiple [
| b1 a1 a2 |
b1 := SRTestBook new.
a1 := SRTestAuthor new.
a2 := SRTestAuthor new.
b1 authors: (Array with: a1 with: a2).
self assert: b1 authors asArray equals: (Array with: a1 with: a2).
self assert: a1 books asArray equals: {b1}.
self assert: a2 books asArray equals: {b1}.
b1 authors: {}.
self assert: b1 authors asArray equals: {}.
self assert: a1 books asArray equals: {}.
self assert: a2 books asArray equals: {}
]

{ #category : 'tests' }
SRManyToManyLinkTest >> testFromNone [
| a1 b1 |
a1 := SRTestAuthor new.
b1 := SRTestBook new.
a1 books add: b1.
self assert: a1 books asArray equals: {b1}.
self assert: b1 authors asArray equals: {a1}
]

{ #category : 'tests' }
SRManyToManyLinkTest >> testSton [
| author b1 b2 ston materializedA2 |
author := SRTestAuthor new.
b1 := SRTestBook new.
b2 := SRTestBook new.
author books add: b1.
author books add: b2.
ston := STON toStringPretty: author.
materializedA2 := STON fromString: ston.
self assertCollection: materializedA2 books size equals: 2.
self
assertCollection: materializedA2 books first authors size
equals: 1.
self
assertCollection: materializedA2 books first authors first
equals: materializedA2
]

{ #category : 'tests' }
SRManyToManyLinkTest >> testToNone [
| a1 b1 |
a1 := SRTestAuthor new.
b1 := SRTestBook new.
a1 books add: b1.
a1 books remove: b1.
self assert: a1 books asArray equals: {}.
self assert: b1 authors asArray equals: {}
]
Class {
#name : 'SRManyToManyLinkTest',
#superclass : 'TestCase',
#category : 'OpenPonk-SynchronizedLinks-Tests',
#package : 'OpenPonk-SynchronizedLinks',
#tag : 'Tests'
}

{ #category : 'tests' }
SRManyToManyLinkTest >> testChangePair [
| a1 b1 a2 b2 |
a1 := SRTestAuthor new.
b1 := SRTestBook new.
a1 books add: b1.
a2 := SRTestAuthor new.
b2 := SRTestBook new.
a2 books add: b2.
a2 books add: b1.
self assert: a1 books asArray equals: {b1}.
self assert: a2 books asArray equals: (Array with: b2 with: b1).
self assert: b1 authors asArray equals: (Array with: a1 with: a2).
self assert: b2 authors asArray equals: {a2}
]

{ #category : 'tests' }
SRManyToManyLinkTest >> testFromCollection [
| a1 b1 b2 |
a1 := SRTestAuthor new.
b1 := SRTestBook new.
a1 books add: b1.
b2 := SRTestBook new.
a1 books: {b2}.
self assert: a1 books asArray equals: {b2}.
self assert: b2 authors asArray equals: {a1}.
self assert: b1 authors asArray equals: {}
]

{ #category : 'tests' }
SRManyToManyLinkTest >> testFromCollectionMultiple [
| b1 a1 a2 |
b1 := SRTestBook new.
a1 := SRTestAuthor new.
a2 := SRTestAuthor new.
b1 authors: (Array with: a1 with: a2).
self assert: b1 authors asArray equals: (Array with: a1 with: a2).
self assert: a1 books asArray equals: {b1}.
self assert: a2 books asArray equals: {b1}.
b1 authors: {}.
self assert: b1 authors asArray equals: {}.
self assert: a1 books asArray equals: {}.
self assert: a2 books asArray equals: {}
]

{ #category : 'tests' }
SRManyToManyLinkTest >> testFromNone [
| a1 b1 |
a1 := SRTestAuthor new.
b1 := SRTestBook new.
a1 books add: b1.
self assert: a1 books asArray equals: {b1}.
self assert: b1 authors asArray equals: {a1}
]

{ #category : 'tests' }
SRManyToManyLinkTest >> testSton [
| author b1 b2 ston materializedA2 |
author := SRTestAuthor new.
b1 := SRTestBook new.
b2 := SRTestBook new.
author books add: b1.
author books add: b2.
ston := STON toStringPretty: author.
materializedA2 := STON fromString: ston.
self assertCollection: materializedA2 books size equals: 2.
self
assertCollection: materializedA2 books first authors size
equals: 1.
self
assertCollection: materializedA2 books first authors first
equals: materializedA2
]

{ #category : 'tests' }
SRManyToManyLinkTest >> testToNone [
| a1 b1 |
a1 := SRTestAuthor new.
b1 := SRTestBook new.
a1 books add: b1.
a1 books remove: b1.
self assert: a1 books asArray equals: {}.
self assert: b1 authors asArray equals: {}
]
Loading

0 comments on commit 28a6d8a

Please sign in to comment.