test: add test verifying this refers to class in static methods

Add a new test file `this_in_static_method.wren` that validates `this` evaluates to the class object when used inside a static method, and removes the TODO comment from `this_in_method.wren` that previously noted this untested behavior.
This commit is contained in:
Bob Nystrom
2014-02-14 14:37:37 +00:00
parent 9f9149bb08
commit 00239d37b2
2 changed files with 10 additions and 4 deletions
+10
View File
@@ -0,0 +1,10 @@
class Foo {
static test {
IO.print(this == Foo) // expect: true
IO.print(this.bar) // expect: bar
}
static bar { return "bar" }
}
Foo.test