Skip to content

Commit

Permalink
remove testSpecifyPackageNamesUnderTest since it uses RPackage and ot…
Browse files Browse the repository at this point in the history
…hers and I do not see the value of the tests
  • Loading branch information
Ducasse committed Jul 19, 2024
1 parent 5fd8b06 commit 610ca03
Show file tree
Hide file tree
Showing 37 changed files with 667 additions and 609 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
I store metadata for this package. These meta data are used by other tools such as the SmalllintManifestChecker and the critics Browser
"
Class {
#name : #ManifestPillarTestsExporterCore,
#superclass : #PackageManifest,
#category : #'Pillar-Tests-ExporterCore-Manifest'
#name : 'ManifestPillarTestsExporterCore',
#superclass : 'PackageManifest',
#category : 'Pillar-Tests-ExporterCore-Manifest',
#package : 'Pillar-Tests-ExporterCore',
#tag : 'Manifest'
}
14 changes: 8 additions & 6 deletions src/Pillar-Tests-ExporterCore/MicTransformDocumentTest.class.st
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
Class {
#name : #MicTransformDocumentTest,
#superclass : #TestCase,
#name : 'MicTransformDocumentTest',
#superclass : 'TestCase',
#instVars : [
'filesystem',
'builder',
'project',
'file',
'aPRPDFDocument'
],
#category : #'Pillar-Tests-ExporterCore-Base'
#category : 'Pillar-Tests-ExporterCore-Base',
#package : 'Pillar-Tests-ExporterCore',
#tag : 'Base'
}

{ #category : #running }
{ #category : 'running' }
MicTransformDocumentTest >> generateFilesystemExample [

| file |
Expand All @@ -26,7 +28,7 @@ Pharo is cool

]

{ #category : #initialization }
{ #category : 'initialization' }
MicTransformDocumentTest >> setUp [
super setUp.
filesystem := FileSystem memory.
Expand All @@ -40,7 +42,7 @@ MicTransformDocumentTest >> setUp [
target: PRPdfOutput new.
]

{ #category : #initialization }
{ #category : 'initialization' }
MicTransformDocumentTest >> testTransformDocumentFor [

| parsedDocument transformedDocument |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
Class {
#name : #PRAbstractOutputDocumentTest,
#superclass : #PRTestWithMemoryFileSystem,
#category : #'Pillar-Tests-ExporterCore-Base'
#name : 'PRAbstractOutputDocumentTest',
#superclass : 'PRTestWithMemoryFileSystem',
#category : 'Pillar-Tests-ExporterCore-Base',
#package : 'Pillar-Tests-ExporterCore',
#tag : 'Base'
}

{ #category : #tests }
{ #category : 'tests' }
PRAbstractOutputDocumentTest >> testParseInput [

| doc |
Expand Down
20 changes: 11 additions & 9 deletions src/Pillar-Tests-ExporterCore/PRAnchorOfSectionTest.class.st
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
Class {
#name : #PRAnchorOfSectionTest,
#superclass : #PRNodeTransformerTest,
#category : 'Pillar-Tests-ExporterCore-Transformers'
#name : 'PRAnchorOfSectionTest',
#superclass : 'PRNodeTransformerTest',
#category : 'Pillar-Tests-ExporterCore-Transformers',
#package : 'Pillar-Tests-ExporterCore',
#tag : 'Transformers'
}

{ #category : #private }
{ #category : 'private' }
PRAnchorOfSectionTest >> actualClass [
^ PRAnchorOfSection
]

{ #category : #tests }
{ #category : 'tests' }
PRAnchorOfSectionTest >> testAnchorWithSimpleTitle [

| input expected config |
Expand All @@ -27,7 +29,7 @@ PRAnchorOfSectionTest >> testAnchorWithSimpleTitle [
self assert: (self executePhase: input with: config) equals: expected
]

{ #category : #tests }
{ #category : 'tests' }
PRAnchorOfSectionTest >> testAnchorWithSimpleTitleAndAnchorNumberName [
| input expected config |
config := self configuration.
Expand All @@ -48,7 +50,7 @@ PRAnchorOfSectionTest >> testAnchorWithSimpleTitleAndAnchorNumberName [
self assert: (self executePhase: input with: config) equals: expected
]

{ #category : #tests }
{ #category : 'tests' }
PRAnchorOfSectionTest >> testAnchorWithSimpleTitleAndAnchorWithSameName [
| input expected config |
config := self configuration.
Expand All @@ -70,7 +72,7 @@ PRAnchorOfSectionTest >> testAnchorWithSimpleTitleAndAnchorWithSameName [
self assert: (self executePhase: input with: config) equals: expected
]

{ #category : #tests }
{ #category : 'tests' }
PRAnchorOfSectionTest >> testAnchorWithTwoSameTitle [
| input expected config |
config := self configuration.
Expand All @@ -88,7 +90,7 @@ PRAnchorOfSectionTest >> testAnchorWithTwoSameTitle [
self assert: (self executePhase: input with: config) equals: expected
]

{ #category : #tests }
{ #category : 'tests' }
PRAnchorOfSectionTest >> testAnchorWithoutTitle [
| input config |
config := self configuration.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,24 +1,26 @@
Class {
#name : #PRBuildRootMainStrategyTest,
#superclass : #PRBuildStrategyTest,
#category : #'Pillar-Tests-ExporterCore-Base'
#name : 'PRBuildRootMainStrategyTest',
#superclass : 'PRBuildStrategyTest',
#category : 'Pillar-Tests-ExporterCore-Base',
#package : 'Pillar-Tests-ExporterCore',
#tag : 'Base'
}

{ #category : #tests }
{ #category : 'tests' }
PRBuildRootMainStrategyTest >> testFilesToBuildOnCorrect [
| outputProject |
outputProject := PRBuildRootMainStrategy new filesToBuildOn: project.
self assert: outputProject first class equals: PRPillarInputDocument.
self assert: outputProject first file path equals: Path / 'index.pillar'
]

{ #category : #tests }
{ #category : 'tests' }
PRBuildRootMainStrategyTest >> testFilesToBuildOnErrorNoFile [
project baseDirectory: ((project baseDirectory / 'index.pillar') delete; parent).
self should: [ PRBuildRootMainStrategy new filesToBuildOn: project ] raise: Error
]

{ #category : #tests }
{ #category : 'tests' }
PRBuildRootMainStrategyTest >> testFilesToBuildOnErrorSeveralFiles [
project baseDirectory: ((project baseDirectory / 'chap3.pillar') ensureCreateFile; parent).
self should: [ PRBuildRootMainStrategy new filesToBuildOn: project ] raise: Error
Expand Down
26 changes: 14 additions & 12 deletions src/Pillar-Tests-ExporterCore/PRBuildStrategyTest.class.st
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
Class {
#name : #PRBuildStrategyTest,
#superclass : #TestCase,
#name : 'PRBuildStrategyTest',
#superclass : 'TestCase',
#instVars : [
'project'
],
#category : #'Pillar-Tests-ExporterCore-Base'
#category : 'Pillar-Tests-ExporterCore-Base',
#package : 'Pillar-Tests-ExporterCore',
#tag : 'Base'
}

{ #category : #data }
{ #category : 'data' }
PRBuildStrategyTest >> chap1Content [
^
'
Expand All @@ -21,7 +23,7 @@ If you do not know Pillar, check its documentation at *http://github.com/pillar-
'
]

{ #category : #data }
{ #category : 'data' }
PRBuildStrategyTest >> chap2Content [
^
'
Expand All @@ -35,7 +37,7 @@ Some template are already written, but if you want to have your own, you had two
'
]

{ #category : #data }
{ #category : 'data' }
PRBuildStrategyTest >> configContent [
^ '{
"base_url": "",
Expand All @@ -49,7 +51,7 @@ PRBuildStrategyTest >> configContent [
}'
]

{ #category : #data }
{ #category : 'data' }
PRBuildStrategyTest >> indexContent [
^
'!My First book
Expand All @@ -59,7 +61,7 @@ PRBuildStrategyTest >> indexContent [
'
]

{ #category : #running }
{ #category : 'running' }
PRBuildStrategyTest >> setUp [
"Create a setup project with: index.pillar, a conf, and Chapters with Chap1 and Chap2"

Expand All @@ -74,7 +76,7 @@ PRBuildStrategyTest >> setUp [
project := PRProject new baseDirectory: fileSystem
]

{ #category : #tests }
{ #category : 'tests' }
PRBuildStrategyTest >> testPRBuildAllStrategy [
| f fsorted|
f := PRBuildAllStrategy new filesToBuildOn: project.
Expand All @@ -92,7 +94,7 @@ PRBuildStrategyTest >> testPRBuildAllStrategy [
self assert: f fourth file fullName equals: '/index.pillar'
]

{ #category : #tests }
{ #category : 'tests' }
PRBuildStrategyTest >> testPRBuildListStrategy [
| f |
f := PRBuildListStrategy new
Expand All @@ -103,7 +105,7 @@ PRBuildStrategyTest >> testPRBuildListStrategy [
includesAll: #('/index.pillar' '/chapter1.pillar')).
]

{ #category : #tests }
{ #category : 'tests' }
PRBuildStrategyTest >> testPRBuildListStrategyDoubleEntry [
| f |
f := PRBuildListStrategy new
Expand All @@ -113,7 +115,7 @@ PRBuildStrategyTest >> testPRBuildListStrategyDoubleEntry [
self assert: f anyOne file fullName equals: '/chapter1.pillar'
]

{ #category : #tests }
{ #category : 'tests' }
PRBuildStrategyTest >> testPRBuildRootMainStrategy [
| f |
f := PRBuildRootMainStrategy new filesToBuildOn: project.
Expand Down
16 changes: 9 additions & 7 deletions src/Pillar-Tests-ExporterCore/PRCascadingCounterTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,19 @@
I test the PRCascadingCounter class.
"
Class {
#name : #PRCascadingCounterTest,
#superclass : #TestCase,
#category : #'Pillar-Tests-ExporterCore-Various'
#name : 'PRCascadingCounterTest',
#superclass : 'TestCase',
#category : 'Pillar-Tests-ExporterCore-Various',
#package : 'Pillar-Tests-ExporterCore',
#tag : 'Various'
}

{ #category : #accessing }
{ #category : 'accessing' }
PRCascadingCounterTest >> packageNamesUnderTest [
^ #('Pillar-ExporterCore')
]

{ #category : #tests }
{ #category : 'tests' }
PRCascadingCounterTest >> testElementsForNonSimpleCounter [
| counter |
counter := PRCascadingCounter maxLevel: 5.
Expand All @@ -21,7 +23,7 @@ PRCascadingCounterTest >> testElementsForNonSimpleCounter [
self assert: counter elements equals: { 0 . 1 }
]

{ #category : #tests }
{ #category : 'tests' }
PRCascadingCounterTest >> testElementsForSimpleCounter [
| counter |
counter := PRCascadingCounter maxLevel: 5.
Expand All @@ -30,7 +32,7 @@ PRCascadingCounterTest >> testElementsForSimpleCounter [
self assert: counter elements equals: { 1 }
]

{ #category : #tests }
{ #category : 'tests' }
PRCascadingCounterTest >> testIsValidCounter [
self assert: (PRCascadingCounter maxLevel: 5) isValidCounter.
self deny: (PRNotFoundCounter maxLevel: 5) isValidCounter
Expand Down
18 changes: 10 additions & 8 deletions src/Pillar-Tests-ExporterCore/PRCitationTransformerTest.class.st
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
Class {
#name : #PRCitationTransformerTest,
#superclass : #PRNodeTransformerTest,
#category : 'Pillar-Tests-ExporterCore-Transformers'
#name : 'PRCitationTransformerTest',
#superclass : 'PRNodeTransformerTest',
#category : 'Pillar-Tests-ExporterCore-Transformers',
#package : 'Pillar-Tests-ExporterCore',
#tag : 'Transformers'
}

{ #category : #private }
{ #category : 'private' }
PRCitationTransformerTest >> actualClass [
^PRCitationTransformer
]

{ #category : #tests }
{ #category : 'tests' }
PRCitationTransformerTest >> testTransformWithAnnotationAndText [
| input expected |
input := PRDocument new
Expand All @@ -29,7 +31,7 @@ PRCitationTransformerTest >> testTransformWithAnnotationAndText [
self assert: (self executePhase: input with: self configuration) equals: expected
]

{ #category : #tests }
{ #category : 'tests' }
PRCitationTransformerTest >> testTransformWithListInList [
| input expected |
input := PRDocument new
Expand All @@ -51,7 +53,7 @@ PRCitationTransformerTest >> testTransformWithListInList [
self assert: (self executePhase: input with: self configuration) equals: expected
]

{ #category : #tests }
{ #category : 'tests' }
PRCitationTransformerTest >> testTransformWithOneAnnotation [
| input expected |
input := PRDocument new
Expand All @@ -61,7 +63,7 @@ PRCitationTransformerTest >> testTransformWithOneAnnotation [
self assert: (self executePhase: input with: self configuration) equals: expected
]

{ #category : #tests }
{ #category : 'tests' }
PRCitationTransformerTest >> testTransformWithOneAnnotationithRef [
| input expected |
input := PRDocument new
Expand Down
Loading

0 comments on commit 610ca03

Please sign in to comment.