Skip to content

Commit

Permalink
remove renamed file
Browse files Browse the repository at this point in the history
  • Loading branch information
esumerfd committed Feb 26, 2012
2 parents 45e21c0 + ac99b2f commit 80a4451
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.

This file was deleted.

@@ -1,6 +1,6 @@
package org.bitbashers.groovy.experiments.metaclass.mixin

import groovy.util.GroovyTestCase;
import groovy.util.GroovyTestCase

class MetaMixinTest extends GroovyTestCase {

Expand All @@ -9,6 +9,16 @@ class MetaMixinTest extends GroovyTestCase {
assertEquals "mixed in", new Foo().mixedIn()
assertEquals "a mixed property", new Foo().mixedProperty
}

void test_mixin_has_reference_to_this() {

def foo = new Foo()

assertEquals foo.class, foo.thisIs().class
assertTrue foo.thisIs().class.isAssignableFrom(Foo)

assertFalse foo.thisIs() instanceof Foo
}
}

@Mixin(FooMix)
Expand All @@ -20,4 +30,7 @@ class FooMix {
def mixedIn() {
"mixed in"
}
def thisIs() {
this
}
}

0 comments on commit 80a4451

Please sign in to comment.