refactor: move benchmark directory under test and update all references

The benchmark directory is relocated from the project root into the test directory, and all scripts, documentation links, and gitignore paths are updated accordingly. The test runner is also refactored to explicitly walk subdirectories (core, io, language, limit) instead of using a single test root, and a new test/README.md is added to document the test suite structure. Additionally, the constructor test for the Foo class is updated to add a zero-arity constructor and adjust expected output strings.
This commit is contained in:
Bob Nystrom
2015-03-14 19:45:56 +00:00
parent af58528e88
commit c4ef964f92
562 changed files with 32 additions and 8 deletions
@@ -0,0 +1,9 @@
var a = "a"
var b = "b"
var c = "c"
// Assignment is right-associative.
a = b = c
IO.print(a) // expect: c
IO.print(b) // expect: c
IO.print(c) // expect: c
+8
View File
@@ -0,0 +1,8 @@
var a = "before"
IO.print(a) // expect: before
a = "after"
IO.print(a) // expect: after
IO.print(a = "arg") // expect: arg
IO.print(a) // expect: arg
+2
View File
@@ -0,0 +1,2 @@
var a = "a"
(a) = "value" // expect error
@@ -0,0 +1,3 @@
var a = "a"
var b = "b"
a + b = "value" // expect error
+3
View File
@@ -0,0 +1,3 @@
var a = "a"
var b = "b"
b is a = "value" // expect error
+10
View File
@@ -0,0 +1,10 @@
new Fn {
var a = "before"
IO.print(a) // expect: before
a = "after"
IO.print(a) // expect: after
IO.print(a = "arg") // expect: arg
IO.print(a) // expect: arg
}.call()
@@ -0,0 +1,2 @@
var a = "a"
!a = "value" // expect error
+11
View File
@@ -0,0 +1,11 @@
// Chained assignment.
var a = "a"
var b = "b"
a = b = "chain"
IO.print(a) // expect: chain
IO.print(a) // expect: chain
// Assignment on RHS of variable.
var c = a = "var"
IO.print(a) // expect: var
IO.print(c) // expect: var
+1
View File
@@ -0,0 +1 @@
unknown = "what" // expect error