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
+18
View File
@@ -0,0 +1,18 @@
var Nonlocal = "before"
IO.print(Nonlocal) // expect: before
Nonlocal = "after"
IO.print(Nonlocal) // expect: after
class Foo {
static method {
Nonlocal = "method"
}
}
Foo.method
IO.print(Nonlocal) // expect: method
new Fn {
Nonlocal = "fn"
}.call()
IO.print(Nonlocal) // expect: fn
@@ -0,0 +1,6 @@
class Foo {
bar {
var A = "value"
var A = "other" // expect error
}
}
@@ -0,0 +1,8 @@
var Nonlocal = "outer"
{
var Nonlocal = "inner"
IO.print(Nonlocal) // expect: inner
}
IO.print(Nonlocal) // expect: outer
@@ -0,0 +1,10 @@
class Foo {
static bar { new Bar }
}
class Bar {
static foo { new Foo }
}
IO.print(Foo.bar) // expect: instance of Bar
IO.print(Bar.foo) // expect: instance of Foo
@@ -0,0 +1,3 @@
IO.print(Foo) // expect: null
var Foo = "value"
IO.print(Foo) // expect: value
+7
View File
@@ -0,0 +1,7 @@
var fn = new Fn {
IO.print(Foo)
IO.print(Bar)
}
// expect error line 7
// expect error line 7
@@ -0,0 +1,5 @@
var Global = "global"
new Fn {
IO.print(Global) // expect: global
}.call()
@@ -0,0 +1,7 @@
var f = new Fn {
IO.print(Global)
}
var Global = "global"
f.call() // expect: global
+14
View File
@@ -0,0 +1,14 @@
var Global = "global"
class Foo {
method {
IO.print(Global)
}
static classMethod {
IO.print(Global)
}
}
(new Foo).method // expect: global
Foo.classMethod // expect: global
@@ -0,0 +1,14 @@
class Foo {
method {
IO.print(Global)
}
static classMethod {
IO.print(Global)
}
}
var Global = "global"
(new Foo).method // expect: global
Foo.classMethod // expect: global