From f2bff5040d8274eb9f14dfdc834d9864e071c04a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phaneDucasse?= Date: Sat, 2 Nov 2024 21:07:42 +0100 Subject: [PATCH] cleaning old pillar left over --- archetypes/tester-example/sample/index.pillar | 124 ------------------ archetypes/tester-example/sample/pillar.conf | 11 -- archetypes/tester-example/support/README.txt | 1 - 3 files changed, 136 deletions(-) delete mode 100644 archetypes/tester-example/sample/index.pillar delete mode 100644 archetypes/tester-example/sample/pillar.conf delete mode 100644 archetypes/tester-example/support/README.txt diff --git a/archetypes/tester-example/sample/index.pillar b/archetypes/tester-example/sample/index.pillar deleted file mode 100644 index a9ccc9d3..00000000 --- a/archetypes/tester-example/sample/index.pillar +++ /dev/null @@ -1,124 +0,0 @@ -!!Superheroes - -Sample of a book that could be real, other examples later in the book - -Let's define a class, one of its methods and test it. - -[[[classDefinition=true -Object subclass: #Superhero - instanceVariableNames: 'name powers currentCity vilain' - classVariableNames: '' - package: 'Superheroes' -]]] - -[[[methodDefinition=true -Superhero >> defendCity: aCity against: aSuperVilain - self currentCity: aCity. - self vilain: aSuperVilain. -]]] - -by defining the accessors: - -[[[methodDefinition=true -Superhero >> currentCity: aCity - currentCity := aCity -]]] - -[[[methodDefinition=true -Superhero >> currentCity - ^ currentCity -]]] - -%In order to avoid overflowing the reader with all the accessors, we define them but hide them -%name - -[[[hidden=true|methodDefinition=true -Superhero >> name: aName - name := aName -]]] -[[[hidden=true|methodDefinition=true -Superhero >> name - ^ name -]]] - -%vilain - -[[[hidden=true|methodDefinition=true -Superhero >> vilain: aVilain - vilain := aVilain -]]] -[[[hidden=true|methodDefinition=true -Superhero >> vilain - ^ vilain -]]] - -%powers - -[[[hidden=true|methodDefinition=true -Superhero >> powers: aPowerList - powers := aPowerList -]]] -[[[hidden=true|methodDefinition=true -Superhero >> powers - ^ powers -]]] -(same for ==vilain== and all the other instance variable) - -We will now define tests around this method. - -[[[classDefinition=true -TestCase subclass: #SuperheroTest - instanceVariableNames: '' - classVariableNames: '' - package: 'Superheroes-Tests' -]]] - -[[[methodDefinition=true -SuperheroTest >> testDefendCityAgainstJoker - | batman | - batman := Superhero new. - batman defendCity: 'Gotham' against: 'The Joker'. - self assert: batman currentCity equals: 'Gotham'. - self assert: batman vilain equals: 'The Joker'. -]]] - -Our test should be green! - -${run:testClass=SuperheroTest}$ - -!!Other tests - -Examples: - -[[[example=true -1+1 ->>>2 -]]] - -[[[example=true|expectedFailure=true -1+1 ->>>3 -]]] - -[[[example=true|expectedFailure=true -1+'1' ->>>2 -]]] - -Method Definition: -[[[methodDefinition|expectedFailure -Bla>>bla - hmm ^'bla' -]]] - -Class definition: -[[[classDefinition=true|expectedFailure=true -Object subclass: #Foo - instanceVariableNames: '' - classVariableNames: '' - "package: 'Superheroes-Tests'" - "failing due to the lack of the key package" -]]] - - - diff --git a/archetypes/tester-example/sample/pillar.conf b/archetypes/tester-example/sample/pillar.conf deleted file mode 100644 index ffb7cdcf..00000000 --- a/archetypes/tester-example/sample/pillar.conf +++ /dev/null @@ -1,11 +0,0 @@ -{ - "title": "Pillar-Booktester", - "attribution": "The Pillar team", - "series": "", - "keywords": "books, Pillar, Pharo, Smalltalk", - "language": "en-UK", - "epub-id": "", - - "latexWriter" : #'latex:sbabook', - "htmlWriter": #html -} \ No newline at end of file diff --git a/archetypes/tester-example/support/README.txt b/archetypes/tester-example/support/README.txt deleted file mode 100644 index 112ff0b3..00000000 --- a/archetypes/tester-example/support/README.txt +++ /dev/null @@ -1 +0,0 @@ -This file is here because pillar requires a support directory. Otherwise Git will not commit the directory. \ No newline at end of file