Skip to content

Commit

Permalink
Quick fix for P13
Browse files Browse the repository at this point in the history
  • Loading branch information
astares committed May 28, 2024
1 parent 7d0faef commit 68489c6
Show file tree
Hide file tree
Showing 4 changed files with 96 additions and 85 deletions.
12 changes: 7 additions & 5 deletions src/XML-Writer-Tests/ManifestXMLWriterTests.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,21 @@
Please describe the package using the class comment of the included manifest class. The manifest class also includes other additional metadata for the package. These meta data are used by other tools such as the SmalllintManifestChecker and the critics Browser
"
Class {
#name : #ManifestXMLWriterTests,
#superclass : #PackageManifest,
#category : #'XML-Writer-Tests-Manifest'
#name : 'ManifestXMLWriterTests',
#superclass : 'PackageManifest',
#category : 'XML-Writer-Tests-Manifest',
#package : 'XML-Writer-Tests',
#tag : 'Manifest'
}

{ #category : #'code-critics' }
{ #category : 'code-critics' }
ManifestXMLWriterTests class >> ruleDetectContainsRuleV1FalsePositive [

<ignoreForCoverage>
^ #(#(#(#RGMethodDefinition #(#XMLWriterRecordingFormatterProxy #receivedNextAll:with: #false)) #'2023-10-26T02:25:37.729304+02:00') )
]

{ #category : #'code-critics' }
{ #category : 'code-critics' }
ManifestXMLWriterTests class >> ruleLiteralArrayContainsSuspiciousTrueFalseOrNilRuleV1FalsePositive [

<ignoreForCoverage>
Expand Down
25 changes: 16 additions & 9 deletions src/XML-Writer-Tests/XMLWriterRecordingFormatterProxy.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,42 @@
Records sent formatter messages in a queue for testing.
"
Class {
#name : #XMLWriterRecordingFormatterProxy,
#superclass : #Object,
#name : 'XMLWriterRecordingFormatterProxy',
#superclass : 'Object',
#instVars : [
'messageQueue'
],
#category : #'XML-Writer-Tests-Utilities'
#category : 'XML-Writer-Tests-Utilities',
#package : 'XML-Writer-Tests',
#tag : 'Utilities'
}

{ #category : #'reflective operations' }
{ #category : 'reflective operations' }
XMLWriterRecordingFormatterProxy >> doesNotUnderstand: aMessage [

(XMLWriterFormatter whichCategoryIncludesSelector: aMessage selector)
= #formatting ifTrue: [ messageQueue addLast: aMessage ]
| name |
name := (SystemVersion current major < 13)
ifTrue: [ XMLWriterFormatter whichCategoryIncludesSelector: aMessage selector ]
ifFalse: [ XMLWriterFormatter protocolNameOfSelector: aMessage selector ].

name = #formatting ifTrue: [ messageQueue addLast: aMessage ]

]

{ #category : #initialization }
{ #category : 'initialization' }
XMLWriterRecordingFormatterProxy >> initialize [

super initialize.
messageQueue := OrderedCollection new
]

{ #category : #testing }
{ #category : 'testing' }
XMLWriterRecordingFormatterProxy >> receivedNext: aSelector with: anArgument [

^ self receivedNextAll: (Array with: aSelector) with: anArgument
]

{ #category : #testing }
{ #category : 'testing' }
XMLWriterRecordingFormatterProxy >> receivedNextAll: aNameCollection with: anArgument [

aNameCollection do: [ :each |
Expand Down
Loading

0 comments on commit 68489c6

Please sign in to comment.