BindExt.expr start work

This commit is contained in:
Dima Granetchi
2014-11-21 17:19:57 +02:00
parent a4b681d009
commit 680b95a941
3 changed files with 152 additions and 16 deletions
+44
View File
@@ -0,0 +1,44 @@
package ;
import bindx.Bind;
import bindx.BindxExt;
import bindx.IBindable;
import buddy.BuddySuite;
using buddy.Should;
//@exclude
class ExprBindTest extends BuddySuite {
public function new() {
describe("Using BindExt.expr", {
var callNum:Int;
before({
callNum = 0;
});
it("BindExt.chain should bind simple expr", {
var a = new BaseTest.Bindable1();
var b = new BaseTest.Bindable1();
a.str = "a1";
b.str = "b1";
inline function val() return a.str + b.str;
BindExt.expr(a.str + b.str, function (from, to:String) {
//trace(from);
to.should.be(val());
callNum ++;
});
callNum.should.be(1);
a.str = "a2";
callNum.should.be(2);
});
});
}
}
+1
View File
@@ -16,6 +16,7 @@ class Tests extends BuddySuite {
new SignalTest(),
new TestProperty(),
new ChainBindTest(),
new ExprBindTest(),
], reporter);
runner.run();