Skip to content

Commit

Permalink
Add clojureslim and first cut of ATs
Browse files Browse the repository at this point in the history
  • Loading branch information
trptcolin committed Aug 6, 2011
1 parent 296074e commit de079ab
Show file tree
Hide file tree
Showing 84 changed files with 1,896 additions and 4 deletions.
5 changes: 2 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,5 @@ pom.xml
*.iml
/fitnesse/temp
/fitnesse/FitNesseRoot/ErrorLogs
/fitnesse/FitNesseRoot/RecentChange
/fitnesse/FitNesseRoot/files/testResultss

/fitnesse/FitNesseRoot/RecentChanges
/fitnesse/FitNesseRoot/files/testResults
4 changes: 3 additions & 1 deletion fitnesse/FitNesseRoot/FrontPage/content.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
!1 Welcome to [[FitNesse][FitNesse.FitNesse]]!
!3 ''The fully integrated stand-alone acceptance testing framework and wiki.''

!1 HuntTheWumpus: a Clojure adventure

# Here is a good place to add your first page (WikiWord). For example, MyTopLevelApplicationPage
To add your first "page", click the [[Edit][FrontPage?edit]] button and add a [[!-WikiWord-!][FitNesse.UserGuide.WikiWord]] to the page.

Expand All @@ -10,4 +12,4 @@ To add your first "page", click the [[Edit][FrontPage?edit]] button and add a [[
| [[User Guide][FitNesse.UserGuide]]|''Answer the rest of your questions here.''|
| [[Acceptance Tests][FitNesse.SuiteAcceptanceTests]]|''FitNesse's suite of Acceptance Tests''|

!note Release v20110104
!note Release v20110713
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
When a player moves into a cavern with arrows in it, he automatically picks those arrows up. The games tells the player that he picked up an arrow, and also tells the player how many arrows he has.

!include .HuntTheWumpus.AllRequirements.IterationOne.DonutMap

|script|
|put|player|in cavern|1|
|set quiver to|0|
|enter command|rest|
|check|message|You have no arrows.|was printed|true|

|script|
|put|arrow|in cavern|2|
|enter command|east|
|check|message|You found an arrow.|was printed|true|
|check|message|You have 1 arrow.|was printed|true|
|check|arrows in cavern|2|0|

|script|
|put|arrow|in cavern|3|
|enter command|east|
|check|message|You have 2 arrows.|was printed|true|
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0"?>
<properties>
<Edit/>
<Properties/>
<RecentChanges/>
<Refactor/>
<Search/>
<Test/>
<Versions/>
<saveId>1142260131758</saveId>
<ticketId>-5204263763241843630</ticketId>
</properties>
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Create a convenient map that looks like this:
{{{
[6]
[7]
[1][2][3][4][5]
[8]
[9]
}}}

!|Make Map|
|start|end|direction|
|1|2|E|
|2|3|E|
|3|4|E|
|4|5|E|
|6|7|S|
|7|3|S|
|3|8|S|
|8|9|S|
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0"?>
<properties>
<Edit/>
<LastModified>20060313082556</LastModified>
<Properties/>
<RecentChanges/>
<Refactor/>
<Search/>
<Versions/>
<saveId>1129755462147</saveId>
<ticketId>-1836705570830812277</ticketId>
</properties>
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
Check all the abbreviations of the shoot command.

!include .HuntTheWumpus.AllRequirements.IterationOne.ArrowS.ShootArrow.CrossMap

|script|
|note|lets have lots of arrows to shoot|
|set quiver to|100|
|put|player|in cavern|3|

!define destination {6}

* Try the north abbreviations.
|script|
|enter command|shoot north|
|check|arrows in cavern|${destination}|1|

|script|
|enter command|s north|
|check|arrows in cavern|${destination}|2|

|script|
|enter command|shoot n|
|check|arrows in cavern|${destination}|3|

|script|
|enter command|s n|
|check|arrows in cavern|${destination}|4|

|script|
|enter command|sn|
|check|arrows in cavern|${destination}|5|

!define destination {9}
* Try the south abbreviations.
|script|
|enter command|shoot south|
|check|arrows in cavern|${destination}|1|

|script|
|enter command|s south|
|check|arrows in cavern|${destination}|2|

|script|
|enter command|shoot s|
|check|arrows in cavern|${destination}|3|

|script|
|enter command|s s|
|check|arrows in cavern|${destination}|4|

|script|
|enter command|ss|
|check|arrows in cavern|${destination}|5|


!define destination {1}
* Try the west abbreviations.
|script|
|enter command|shoot west|
|check|arrows in cavern|${destination}|1|

|script|
|enter command|s west|
|check|arrows in cavern|${destination}|2|

|script|
|enter command|shoot w|
|check|arrows in cavern|${destination}|3|

|script|
|enter command|s w|
|check|arrows in cavern|${destination}|4|

|script|
|enter command|sw|
|check|arrows in cavern|${destination}|5|

!define destination {5}

* Try the east abbreviations.
|script|
|enter command|shoot east|
|check|arrows in cavern|${destination}|1|

|script|
|enter command|s east|
|check|arrows in cavern|${destination}|2|

|script|
|enter command|shoot e|
|check|arrows in cavern|${destination}|3|

|script|
|enter command|s e|
|check|arrows in cavern|${destination}|4|

|script|
|enter command|se|
|check|arrows in cavern|${destination}|5|

Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0"?>
<properties>
<Edit/>
<Properties/>
<RecentChanges/>
<Refactor/>
<Search/>
<Test/>
<Versions/>
<saveId>1129849619064</saveId>
<ticketId>-5354441296972761106</ticketId>
</properties>
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
If there are arrows in the quiver, we ought to be able to shoot.
The arrow should go as far as possible, and then hit a wall.
The arrow should be left in that cavern where it stopped.
The quiver should have one less arrow.

!include .HuntTheWumpus.AllRequirements.IterationOne.ArrowS.ShootArrow.CrossMap

|script|
|set quiver to|5|
|put|player|in cavern|3|
|enter command|shoot east|
|check|message|The arrow flies away in silence.|was printed|true|
|check|arrows in quiver|4|
|check|arrows in cavern|5|1|

|script|
|enter command|shoot south|
|check|arrows in quiver|3|
|check|arrows in cavern|9|1|

|script|
|enter command|shoot west|
|check|arrows in quiver|2|
|check|arrows in cavern|1|1|

|script|
|enter command|shoot north|
|check|arrows in quiver|1|
|check|arrows in cavern|6|1|


Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0"?>
<properties>
<Edit/>
<Properties/>
<RecentChanges/>
<Refactor/>
<Search/>
<Test/>
<Versions/>
<saveId>1129836072184</saveId>
<ticketId>3421454198660645331</ticketId>
</properties>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
If there are no arrows, then the player should not be able to shoot.

!include .HuntTheWumpus.AllRequirements.IterationOne.ArrowS.ShootArrow.CrossMap

|script|
|put|player|in cavern|3|
|set quiver to|0|
|enter command|shoot east|
|check|message|You don't have any arrows.|was printed|true|
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0"?>
<properties>
<Edit/>
<Properties/>
<RecentChanges/>
<Refactor/>
<Search/>
<Test/>
<Versions/>
<saveId>1129836165679</saveId>
<ticketId>4885275667146211546</ticketId>
</properties>
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
If the player shoots in a direction that the arrow cannot go in, then the arrow bounces off the wall and kills the player.

Create a very simple map. [1]-[2]

|Make Map|
|start|end|direction|
|1|2|E|

|script|
|put|player|in cavern|1|
|set quiver to|1|
|enter command|shoot west|
|check|message|The arrow bounced off the wall and killed you.|was printed|true|
|check|message|Game over.|was printed|true|
|check|game terminated|true|


Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0"?>
<properties>
<Edit/>
<Properties/>
<RecentChanges/>
<Refactor/>
<Search/>
<Test/>
<Versions/>
<saveId>1129836646330</saveId>
<ticketId>1502246813049425402</ticketId>
</properties>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
We need to make sure we can:
* ^TestCanShootWhenThereAreArrows
* ^TestCannotShootWhenThereAreNoArrows
* ^TestPlayerDiesWhenArrowBouncesOffWallInSameCavern
* ^TestAbbreviationsOfShootCommand
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0"?>
<properties>
<Edit/>
<LastModified>20060313082641</LastModified>
<Properties/>
<RecentChanges/>
<Refactor/>
<Search/>
<Suite/>
<Versions/>
<saveId>1142260001611</saveId>
<ticketId>-219694208611898379</ticketId>
</properties>
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Stories dealing with arrows.

^PickUpArrow
^ShootArrow
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0"?>
<properties>
<Edit/>
<Files/>
<LastModified>20060514223904</LastModified>
<Properties/>
<RecentChanges/>
<Refactor/>
<Search/>
<Suite/>
<Versions/>
<WhereUsed/>
<saveId>1147664344782</saveId>
<ticketId>1880247499665486546</ticketId>
</properties>
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
Make sure the Bats transport randomly.

use a tiny cross map
{{{
[4]
[1][2][3]
[5]
}}}

|Make map.|
|start|end|direction|
|1|2|E|
|2|3|E|
|4|2|S|
|2|5|S|

Use the ''Check random bat transport'' fixture. It looks a lot like the ''Check random wumpus movement'' fixture. It puts the bats in cavern 2, and then repeats the following 1000 times.
1 put player in cavern 1
2 move east
3 count the cavern the player winds up in.

|Check random bat transport|
|cavern|count?|
|1|>200|
|2|0|
|3|>200|
|4|>200|
|5|>200|

Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0"?>
<properties>
<Edit/>
<Files/>
<LastModified>20070904104718</LastModified>
<Properties/>
<RecentChanges/>
<Refactor/>
<Search/>
<Test/>
<Versions/>
<WhereUsed/>
<saveId>1188920838732</saveId>
<ticketId>-4316567207235644358</ticketId>
</properties>

0 comments on commit de079ab

Please sign in to comment.