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
+3
View File
@@ -0,0 +1,3 @@
// A dangling else binds to the right-most if.
if (true) if (false) IO.print("bad") else IO.print("good") // expect: good
if (false) if (true) IO.print("bad") else IO.print("bad")
+6
View File
@@ -0,0 +1,6 @@
// Evaluate the 'else' expression if the condition is false.
if (true) IO.print("good") else IO.print("bad") // expect: good
if (false) IO.print("bad") else IO.print("good") // expect: good
// Allow block body.
if (false) null else { IO.print("block") } // expect: block
+10
View File
@@ -0,0 +1,10 @@
// Evaluate the 'then' expression if the condition is true.
if (true) IO.print("good") // expect: good
if (false) IO.print("bad")
// Allow block body.
if (true) { IO.print("block") } // expect: block
// Assignment in if condition.
var a = false
if (a = true) IO.print(a) // expect: true
+1
View File
@@ -0,0 +1 @@
if (true) "ok" else // expect error
+2
View File
@@ -0,0 +1,2 @@
if // expect error
(true) IO.print("bad")
+8
View File
@@ -0,0 +1,8 @@
// False and null are false.
if (false) IO.print("bad") else IO.print("false") // expect: false
if (null) IO.print("bad") else IO.print("null") // expect: null
// Everything else is true.
if (true) IO.print(true) // expect: true
if (0) IO.print(0) // expect: 0
if ("") IO.print("empty") // expect: empty