Skip to content

Commit 9c95d98

Browse files
committed
Add some more tests as well as improve the readme
1 parent 473f6f2 commit 9c95d98

4 files changed

Lines changed: 38 additions & 3 deletions

File tree

README.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
1-
# ZenScript
1+
# ZenCode
22

3-
This is the main ZenScript project, containing various sub-projects.
3+
This is the main ZenCode project, containing various sub-projects.
4+
5+
## Building
6+
7+
At the moment, the project is undergoing a major refactor. As such, it will not fully compile.
8+
9+
## Testing
10+
11+
ZenCode has a test suite, which can be run using `gradlew :ScriptingExample:test`,
12+
or `./gradlew :ScriptingExample:test`, depending on your platform.
13+
14+
Tests can be located under the `ScriptingEngineTester` project in the form of ZenCode scripts, as well as under the `test` source set in
15+
the `ScriptingExample` project in the form of Junit tests.
416

5-
TODO readme.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#output: Hello
2+
3+
function foo(func as function(a as string) as void) as void {
4+
func("Hello");
5+
}
6+
7+
foo(s => println(s));
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#output: 55
2+
3+
function fib(n as int) as int {
4+
if (n < 2) return n;
5+
return fib(n - 1) + fib(n - 2);
6+
}
7+
8+
println("" + fib(10));
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#output: Undetermined
2+
3+
//Should this error?
4+
5+
function println(a as string) {
6+
7+
}
8+
9+
println("Hello");

0 commit comments

Comments
 (0)