deep bind expr

This commit is contained in:
Dima Granetchi
2014-11-22 19:46:24 +02:00
parent e58cdc2ec1
commit f93f78027c
2 changed files with 42 additions and 14 deletions
+2 -2
View File
@@ -49,9 +49,9 @@ class ExprBindTest extends BuddySuite {
a.str = "a1";
b.str = "";
c.str = "1";
inline function val() return if (a.str.charAt(b.str.length) == c.str) a.str else c.str;
inline function val() return if (a.str.charAt(b.str.length) == Std.string(c.str)) 1 else 0;
BindExt.expr(if (a.str.charAt(b.str.length) == c.str) a.str else c.str, function (from, to:String) {
BindExt.expr(if (a.str.charAt(b.str.length) == Std.string(c.str)) 1 else 0, function (from, to:Int) {
to.should.be(val());
callNum ++;
});