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
+13
View File
@@ -0,0 +1,13 @@
IO.print(Num == Num) // expect: true
IO.print(Num == Bool) // expect: false
// Not equal to other types.
IO.print(Num == 123) // expect: false
IO.print(Num == true) // expect: false
IO.print(Num != Num) // expect: false
IO.print(Num != Bool) // expect: true
// Not equal to other types.
IO.print(Num != 123) // expect: true
IO.print(Num != true) // expect: true
+9
View File
@@ -0,0 +1,9 @@
class Foo {}
IO.print(Foo.name) // expect: Foo
IO.print(Foo.type.name) // expect: Foo metaclass
// Make sure the built-in classes have proper names too.
IO.print(Object.name) // expect: Object
IO.print(Class.name) // expect: Class
IO.print(Bool.name) // expect: Bool
+15
View File
@@ -0,0 +1,15 @@
class Foo {}
class Bar is Foo {}
class Baz is Bar {}
// A class with no explicit superclass inherits Object.
IO.print(Foo.supertype == Object) // expect: true
// Otherwise, it's the superclass.
IO.print(Bar.supertype == Foo) // expect: true
IO.print(Baz.supertype == Bar) // expect: true
// Object has no supertype.
IO.print(Object.supertype) // expect: null
+15
View File
@@ -0,0 +1,15 @@
class Foo {}
// A class is a class.
IO.print(Foo is Class) // expect: true
// It's metatype is also a class.
IO.print(Foo.type is Class) // expect: true
// The metatype's metatype is Class.
IO.print(Foo.type.type == Class) // expect: true
// And Class's metatype circles back onto itself.
IO.print(Foo.type.type.type == Class) // expect: true
IO.print(Foo.type.type.type.type == Class) // expect: true
IO.print(Foo.type.type.type.type.type == Class) // expect: true