Skip to content

Commit

Permalink
Replace assert = in packages starting by F.
Browse files Browse the repository at this point in the history
Replace:

- assert: = by assert: equals:
- deny = by deny: equals:
- assert: == by assert: identicalTo:
- deny: == by deny: identicalTo:
  • Loading branch information
jecisc committed Nov 18, 2019
1 parent 8c46bba commit b26308c
Show file tree
Hide file tree
Showing 24 changed files with 552 additions and 621 deletions.
8 changes: 4 additions & 4 deletions src/FileSystem-Tests-Core/FileLocatorTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ FileLocatorTest >> testEqual [
| a b |
a := FileLocator image.
b := FileLocator image.
self deny: a == b.
self assert: a = b.
self deny: a identicalTo: b.
self assert: a equals: b
]

{ #category : #'compatibility tests' }
Expand Down Expand Up @@ -158,8 +158,8 @@ FileLocatorTest >> testResolveAbsoluteReference [
| result reference |
locator := FileLocator image / 'plonk'.
reference := FileSystem memory / 'griffle'.
result := locator resolve: reference..
self assert: result == reference
result := locator resolve: reference.
self assert: result identicalTo: reference
]

{ #category : #'resolution tests' }
Expand Down
24 changes: 12 additions & 12 deletions src/FileSystem-Tests-Core/FileReferenceTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -96,14 +96,14 @@ FileReferenceTest >> testAsAbsoluteConverted [
FileReferenceTest >> testAsAbsoluteIdentity [
| ref |
ref := filesystem / 'plonk'.
self assert: ref asAbsolute == ref
self assert: ref asAbsolute identicalTo: ref
]

{ #category : #tests }
FileReferenceTest >> testAsReference [
| ref |
ref := filesystem * 'plonk'.
self assert: ref asFileReference == ref
self assert: ref asFileReference identicalTo: ref
]

{ #category : #tests }
Expand Down Expand Up @@ -459,7 +459,7 @@ FileReferenceTest >> testEqual [
| a b |
a := filesystem * 'plonk'.
b := filesystem * 'plonk'.
self deny: a == b.
self deny: a identicalTo: b.
self assert: a equals: b
]

Expand Down Expand Up @@ -492,11 +492,11 @@ FileReferenceTest >> testGlob [
filesystem createDirectory: '/alpha/gamma'.
ref := filesystem root.
children := ref glob: [ :node | true ].
self assert: children size == 4. "including root"
self assert: children size identicalTo: 4. "including root"
children := ref glob: [ :node | node basename size > 1 ].
self assert: children size == 3. "without root"
self assert: children size identicalTo: 3. "without root"
children := ref glob: [ :node | node basename = #gamma ].
self assert: children size == 1. "gamma"
self assert: children size identicalTo: 1. "gamma"
self assert: children first basename equals: #gamma ]
ensure: [ (filesystem / 'alpha') ensureDeleteAll ]
]
Expand Down Expand Up @@ -795,7 +795,7 @@ FileReferenceTest >> testParentResolutionWithAbsoluteReference [
base := filesystem / '/plonk' / 'pinto'.
relative := filesystem / 'griffle' / 'zonk'.
absolute := base resolve: relative.
self assert: absolute fileSystem == relative fileSystem.
self assert: absolute fileSystem identicalTo: relative fileSystem.
self assert: absolute isAbsolute.
self assert: (absolute path at: 1) equals: 'griffle'.
self assert: (absolute path at: 2) equals: 'zonk'
Expand Down Expand Up @@ -981,14 +981,14 @@ FileReferenceTest >> testRenameTargetExists [
FileReferenceTest >> testResolve [
| ref |
ref := filesystem / 'griffle'.
self assert: ref resolve == ref
self assert: ref resolve identicalTo: ref
]

{ #category : #tests }
FileReferenceTest >> testRootParent [
| root |
root := filesystem root.
self assert: root parent == root
self assert: root parent identicalTo: root
]

{ #category : #tests }
Expand Down Expand Up @@ -1057,15 +1057,15 @@ FileReferenceTest >> testUnequalContent [
| a b |
a := filesystem * 'plonk'.
b := filesystem * 'griffle'.
self deny: a = b.
self deny: a equals: b
]

{ #category : #tests }
FileReferenceTest >> testUnequalSize [
| a b |
a := filesystem * 'plonk'.
b := filesystem / 'plonk' / 'griffle'.
self deny: a = b.
self deny: a equals: b
]

{ #category : #tests }
Expand Down Expand Up @@ -1152,7 +1152,7 @@ FileReferenceTest >> testWithExtentionReplacesExtension [
ref := filesystem * 'plonk.griffle'.
result := ref withExtension: 'nurp'.
self assert: result isRelative.
self assert: result basename = 'plonk.nurp'
self assert: result basename equals: 'plonk.nurp'
]

{ #category : #tests }
Expand Down
4 changes: 2 additions & 2 deletions src/FileSystem-Tests-Core/FileSystemTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -681,10 +681,10 @@ FileSystemTest >> testReadingAfterWriting [

{ #category : #tests }
FileSystemTest >> testReferenceTo [
|path|
| path |
"use a relative path since absolute path behavior differs on mac, linux vs win native filesystems"
path := Path * 'a' / 'b'.
self assert: (filesystem referenceTo: 'a/b') path = path.
self assert: (filesystem referenceTo: 'a/b') path equals: path
]

{ #category : #tests }
Expand Down
6 changes: 3 additions & 3 deletions src/FileSystem-Tests-Core/PathTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ PathTest >> testEqual [
| a b |
a := Path * 'plonk'.
b := Path * 'plonk'.
self deny: a == b.
self deny: a identicalTo: b.
self assert: a equals: b
]

Expand Down Expand Up @@ -600,7 +600,7 @@ PathTest >> testRelativeWithParents [
| path allPaths |
path := Path * 'plonk' / 'griffle' / 'nurb'.
allPaths := path withParents.

self assert: allPaths size equals: 3.
self assert: allPaths first basename equals: 'plonk'.
self assert: allPaths first size equals: 1.
Expand All @@ -610,7 +610,7 @@ PathTest >> testRelativeWithParents [
self assert: allPaths third basename equals: 'nurb'.
self assert: allPaths third size equals: 3.
self assert: (allPaths third isChildOf: allPaths second).
self assert: allPaths third == path
self assert: allPaths third identicalTo: path
]

{ #category : #tests }
Expand Down
2 changes: 1 addition & 1 deletion src/FileSystem-Tests-Disk/DiskFileSystemTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ DiskFileSystemTest >> testEntriesHaveAttributes [
DiskFileSystemTest >> testEqual [
| other |
other := self createFileSystem.
self assert: filesystem = other
self assert: filesystem equals: other
]

{ #category : #tests }
Expand Down
Loading

0 comments on commit b26308c

Please sign in to comment.