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
@@ -1,11 +0,0 @@
import "module" for Module, Other
IO.print(Module) // expect: before
// Reassigning the variable in the other module does not affect this one's
// binding.
Other.change
IO.print(Module) // expect: before
// But it does change there.
Other.show // expect: after
@@ -1,12 +0,0 @@
// nontest
var Module = "before"
class Other {
static change {
Module = "after"
}
static show {
IO.print(Module)
}
}
-9
View File
@@ -1,9 +0,0 @@
// nontest
IO.print("start a")
var A = "a value"
IO.print("a defined ", A)
import "b" for B
IO.print("a imported ", B)
IO.print("end a")
-9
View File
@@ -1,9 +0,0 @@
// nontest
IO.print("start b")
var B = "b value"
IO.print("b defined ", B)
import "a" for A
IO.print("b imported ", A)
IO.print("end b")
@@ -1,11 +0,0 @@
import "a"
// Shared module should only run once:
// expect: start a
// expect: a defined a value
// expect: start b
// expect: b defined b value
// expect: b imported a value
// expect: end b
// expect: a imported b value
// expect: end a
@@ -1,15 +0,0 @@
import "module"
// expect: Bool
// expect: Class
// expect: Fiber
// expect: Fn
// expect: List
// expect: Map
// expect: MapKeySequence
// expect: MapValueSequence
// expect: Null
// expect: Num
// expect: Object
// expect: Range
// expect: Sequence
// expect: String
@@ -1,15 +0,0 @@
// nontest
IO.print(Bool)
IO.print(Class)
IO.print(Fiber)
IO.print(Fn)
IO.print(List)
IO.print(Map)
IO.print(MapKeySequence)
IO.print(MapValueSequence)
IO.print(Null)
IO.print(Num)
IO.print(Object)
IO.print(Range)
IO.print(Sequence)
IO.print(String)
@@ -1,10 +0,0 @@
var Module = "outer"
if (true) {
import "module" for Module
// expect: ran module
IO.print(Module) // expect: from module
}
IO.print(Module) // expect: outer
-3
View File
@@ -1,3 +0,0 @@
// nontest
var Module = "from module"
IO.print("ran module")
-1
View File
@@ -1 +0,0 @@
import "module" NoString // expect error
@@ -1 +0,0 @@
import for NoString // expect error
@@ -1,8 +0,0 @@
// nontest
var Module1 = "from module one"
var Module2 = "from module two"
var Module3 = "from module three"
var Module4 = "from module four"
var Module5 = "from module five"
IO.print("ran module")
@@ -1,10 +0,0 @@
import "module" for Module1, Module2, Module3, Module4, Module5
// Only execute module body once:
// expect: ran module
IO.print(Module1) // expect: from module one
IO.print(Module2) // expect: from module two
IO.print(Module3) // expect: from module three
IO.print(Module4) // expect: from module four
IO.print(Module5) // expect: from module five
-2
View File
@@ -1,2 +0,0 @@
var Collides
import "module" for Collides // expect error
-2
View File
@@ -1,2 +0,0 @@
// nontest
IO.print("ran module")
-2
View File
@@ -1,2 +0,0 @@
import "module"
// expect: ran module
-5
View File
@@ -1,5 +0,0 @@
// nontest
IO.print("a")
import "shared" for Shared
var A = "a " + Shared
IO.print("a done")
-5
View File
@@ -1,5 +0,0 @@
// nontest
IO.print("b")
import "shared" for Shared
var B = "b " + Shared
IO.print("b done")
-3
View File
@@ -1,3 +0,0 @@
// nontest
IO.print("shared")
var Shared = "shared"
@@ -1,12 +0,0 @@
import "a" for A
import "b" for B
// Shared module should only run once:
// expect: a
// expect: shared
// expect: a done
// expect: b
// expect: b done
IO.print(A) // expect: a shared
IO.print(B) // expect: b shared
-3
View File
@@ -1,3 +0,0 @@
// nontest
var Module = "from module"
IO.print("ran module")
@@ -1,4 +0,0 @@
import "module" for Module
// expect: ran module
IO.print(Module) // expect: from module
-1
View File
@@ -1 +0,0 @@
import "does_not_exist" for DoesNotExist // expect runtime error: Could not find module 'does_not_exist'.
-3
View File
@@ -1,3 +0,0 @@
// nontest
var Module = "from module"
IO.print("ran module")
@@ -1,3 +0,0 @@
// Should execute the module:
// expect: ran module
import "module" for DoesNotExist // expect runtime error: Could not find a variable named 'DoesNotExist' in module 'module'.