Skip to content

Commit

Permalink
Merge pull request #292 from astares/290-Do-not-use-notNil---use-isNo…
Browse files Browse the repository at this point in the history
…tNil-instead

Do not use notNil - use isNotNil instead
  • Loading branch information
theseion authored Jan 27, 2024
2 parents d276a70 + ffd30c0 commit cfde462
Show file tree
Hide file tree
Showing 16 changed files with 17 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ testBlockClosureChangeDifferentBytecodes
in: aClass.
aClosure := aClass new perform: #methodWithClosure.
self assert: aClosure isClean.
self assert: aClosure notNil.
self assert: aClosure isNotNil.

self serialize: aClosure.
self classFactory
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ testBlockClosureChangeSameBytecodes
in: aClass.
aClosure := aClass new perform: #methodWithClosure.
self assert: aClosure isClean.
self assert: aClosure outerContext notNil.
self assert: aClosure outerContext isNotNil.

self serialize: aClosure.
self classFactory
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ testBlockClosureRemoved
in: aClass.
aClosure := aClass new perform: #methodWithClosure.
self assert: aClosure isClean.
self assert: aClosure outerContext notNil.
self assert: aClosure outerContext isNotNil.

self serialize: aClosure.
aClass removeSelectorSilently: #methodWithClosure.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ testBlockClosureRemovedNonClean
in: aClass.
aClosure := aClass new perform: #methodWithClosure.
self deny: aClosure isClean.
self assert: aClosure outerContext notNil.
self assert: aClosure outerContext isNotNil.

self serialize: aClosure.
aClass removeSelectorSilently: #methodWithClosure.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ testDoIt
self deny: materialized isInstalled.
self assert: materialized isDoIt.
"we serialized the source, trailer is cleared"
self assert: materialized sourceCode notNil.
self assert: materialized sourceCode isNotNil.
self deny: materialized hasSourcePointer.

self assert: (materialized isEqualRegardlessTrailerTo: theCompiledMethod)
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ testInstalledModified
self deny: materialized isInstalled.
self deny: materialized isDoIt.
"we serialized the source"
self assert: materialized sourceCode notNil.
self assert: materialized sourceCode isNotNil.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ testNotInstalled
self deny: materialized isInstalled.
self deny: materialized isDoIt.
"we serialized the source, trailer is empty"
self assert: materialized sourceCode notNil.
self assert: materialized sourceCode isNotNil.
self deny: materialized hasSourcePointer.

self assert: (materialized isEqualRegardlessTrailerTo: theCompiledMethod)
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ testBlockClosureChangeDifferentBytecodes
in: aClass.
aClosure := aClass new perform: #methodWithClosure.
self assert: aClosure isClean.
self assert: aClosure outerContext notNil.
self assert: aClosure outerContext isNotNil.

self serializer fullySerializeMethod: aClosure compiledBlock method.
self serialize: aClosure.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ testBlockClosureChangeDifferentBytecodesNonClean
in: aClass.
aClosure := aClass new perform: #methodWithClosure.
self deny: aClosure isClean.
self assert: aClosure outerContext notNil.
self assert: aClosure outerContext isNotNil.

self serializer fullySerializeMethod: aClosure compiledBlock method.
self serialize: aClosure.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ testBlockClosureRemoved
in: aClass.
aClosure := aClass new perform: #methodWithClosure.
self assert: aClosure isClean.
self assert: aClosure outerContext notNil.
self assert: aClosure outerContext isNotNil.

self serializer fullySerializeMethod: aClosure compiledBlock method.
self serialize: aClosure.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ testBlockClosureRemovedNonClean
in: aClass.
aClosure := aClass new perform: #methodWithClosure.
self deny: aClosure isClean.
self assert: aClosure outerContext notNil.
self assert: aClosure outerContext isNotNil.

self serializer fullySerializeMethod: aClosure compiledBlock method.
self serialize: aClosure.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ testDepthLimit
serialize.

materialized := self materialized.
self assert: materialized left notNil.
self assert: materialized left isNotNil.
self assert: materialized right equals: 1.
self assert: materialized left left notNil.
self assert: materialized left left isNotNil.
self assert: materialized left right equals: 2.
self assert: materialized left left left isNil.
self assert: materialized left left right isNil
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ testEnableObjectsLimitWarning
do: [ :ex | ex resume ].

materialized := self materialized.
self assert: materialized left notNil.
self assert: materialized left isNotNil.
self assert: materialized right equals: 1.
self assert: materialized left left isNil.
self assert: materialized left right isNil
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ testObjectLimit
serialize.

materialized := self materialized.
self assert: materialized left notNil.
self assert: materialized left isNotNil.
self assert: materialized right equals: 1.
self assert: materialized left left isNil.
self assert: materialized left right equals: 2
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ mapAndTrace: anObject
ifTrue: [ depth := depth + 1 ].
previousStackSize := objectStack size.

(anObject notNil and: [
(anObject isNotNil and: [
depth > depthLimit])
ifTrue: [
firstMapper
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"commentStamp" : "MaxLeske 6/21/2021 12:59",
"commentStamp" : "",
"super" : "FLAnalysis",
"category" : "Fuel-Core-Base",
"classinstvars" : [ ],
Expand Down

0 comments on commit cfde462

Please sign in to comment.