codersdojo 1.1.00 → 1.1.01
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/app/scheduler.rb +1 -0
- data/spec/scheduler_spec.rb +14 -0
- data/templates/forth.tester/%kata_file%.fth +7 -0
- data/templates/forth.tester/README +8 -0
- data/templates/forth.tester/run-endless.%sh% +1 -0
- data/templates/forth.tester/run-once.%sh% +1 -0
- data/templates/forth.tester/tester.fr +53 -0
- metadata +11 -4
data/app/scheduler.rb
CHANGED
@@ -0,0 +1 @@
|
|
1
|
+
codersdojo start run-once.sh %kata_file%.fth
|
@@ -0,0 +1 @@
|
|
1
|
+
forth %kata_file%.fth
|
@@ -0,0 +1,53 @@
|
|
1
|
+
\ From: John Hayes S1I
|
2
|
+
\ Subject: tester.fr
|
3
|
+
\ Date: Mon, 27 Nov 95 13:10:09 PST
|
4
|
+
|
5
|
+
\ (C) 1995 JOHNS HOPKINS UNIVERSITY / APPLIED PHYSICS LABORATORY
|
6
|
+
\ MAY BE DISTRIBUTED FREELY AS LONG AS THIS COPYRIGHT NOTICE REMAINS.
|
7
|
+
\ VERSION 1.1
|
8
|
+
HEX
|
9
|
+
|
10
|
+
\ SET THE FOLLOWING FLAG TO TRUE FOR MORE VERBOSE OUTPUT; THIS MAY
|
11
|
+
\ ALLOW YOU TO TELL WHICH TEST CAUSED YOUR SYSTEM TO HANG.
|
12
|
+
VARIABLE VERBOSE
|
13
|
+
TRUE VERBOSE !
|
14
|
+
|
15
|
+
: EMPTY-STACK \ ( ... -- ) EMPTY STACK: HANDLES UNDERFLOWED STACK TOO.
|
16
|
+
DEPTH ?DUP IF DUP 0< IF NEGATE 0 DO 0 LOOP ELSE 0 DO DROP LOOP THEN THEN ;
|
17
|
+
|
18
|
+
: ERROR \ ( C-ADDR U -- ) DISPLAY AN ERROR MESSAGE FOLLOWED BY
|
19
|
+
\ THE LINE THAT HAD THE ERROR.
|
20
|
+
TYPE SOURCE TYPE CR \ DISPLAY LINE CORRESPONDING TO ERROR
|
21
|
+
EMPTY-STACK \ THROW AWAY EVERY THING ELSE
|
22
|
+
;
|
23
|
+
|
24
|
+
VARIABLE ACTUAL-DEPTH \ STACK RECORD
|
25
|
+
CREATE ACTUAL-RESULTS 20 CELLS ALLOT
|
26
|
+
|
27
|
+
: { \ ( -- ) SYNTACTIC SUGAR.
|
28
|
+
;
|
29
|
+
|
30
|
+
: -> \ ( ... -- ) RECORD DEPTH AND CONTENT OF STACK.
|
31
|
+
DEPTH DUP ACTUAL-DEPTH ! \ RECORD DEPTH
|
32
|
+
?DUP IF \ IF THERE IS SOMETHING ON STACK
|
33
|
+
0 DO ACTUAL-RESULTS I CELLS + ! LOOP \ SAVE THEM
|
34
|
+
THEN ;
|
35
|
+
|
36
|
+
: } \ ( ... -- ) COMPARE STACK (EXPECTED) CONTENTS WITH SAVED
|
37
|
+
\ (ACTUAL) CONTENTS.
|
38
|
+
DEPTH ACTUAL-DEPTH @ = IF \ IF DEPTHS MATCH
|
39
|
+
DEPTH ?DUP IF \ IF THERE IS SOMETHING ON THE STACK
|
40
|
+
0 DO \ FOR EACH STACK ITEM
|
41
|
+
ACTUAL-RESULTS I CELLS + @ \ COMPARE ACTUAL WITH EXPECTED
|
42
|
+
<> IF S" INCORRECT RESULT: " ERROR LEAVE THEN
|
43
|
+
LOOP
|
44
|
+
THEN
|
45
|
+
ELSE \ DEPTH MISMATCH
|
46
|
+
S" WRONG NUMBER OF RESULTS: " .s ERROR
|
47
|
+
THEN ;
|
48
|
+
|
49
|
+
: TESTING \ ( -- ) TALKING COMMENT.
|
50
|
+
SOURCE VERBOSE @
|
51
|
+
IF DUP >R TYPE CR R> >IN !
|
52
|
+
ELSE >IN ! DROP
|
53
|
+
THEN ;
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: codersdojo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 17
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 1.1.
|
9
|
+
- 1
|
10
|
+
version: 1.1.01
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- CodersDojo-Team
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-01-
|
18
|
+
date: 2011-01-22 00:00:00 +01:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -66,6 +66,11 @@ files:
|
|
66
66
|
- templates/clojure.is-test/README
|
67
67
|
- templates/clojure.is-test/run-endless.%sh%
|
68
68
|
- templates/clojure.is-test/run-once.%sh%
|
69
|
+
- templates/forth.tester/%kata_file%.fth
|
70
|
+
- templates/forth.tester/README
|
71
|
+
- templates/forth.tester/run-endless.%sh%
|
72
|
+
- templates/forth.tester/run-once.%sh%
|
73
|
+
- templates/forth.tester/tester.fr
|
69
74
|
- templates/java.junit/%Kata_file%Test.java
|
70
75
|
- templates/java.junit/bin/place_your_class_files_here
|
71
76
|
- templates/java.junit/lib/place_your_libs_here
|
@@ -90,6 +95,7 @@ files:
|
|
90
95
|
- spec/progress_spec.rb
|
91
96
|
- spec/runner_spec.rb
|
92
97
|
- spec/scaffolder_spec.rb
|
98
|
+
- spec/scheduler_spec.rb
|
93
99
|
- spec/session_id_generator_spec.rb
|
94
100
|
- spec/state_reader_spec.rb
|
95
101
|
- spec/text_converter_spec.rb
|
@@ -137,6 +143,7 @@ test_files:
|
|
137
143
|
- spec/progress_spec.rb
|
138
144
|
- spec/runner_spec.rb
|
139
145
|
- spec/scaffolder_spec.rb
|
146
|
+
- spec/scheduler_spec.rb
|
140
147
|
- spec/session_id_generator_spec.rb
|
141
148
|
- spec/state_reader_spec.rb
|
142
149
|
- spec/text_converter_spec.rb
|