Patch to support comparison of empty string and nulls

3 views
Skip to first unread message

Roman

unread,
Sep 8, 2011, 5:03:13 AM9/8/11
to FxWorks
I provided a patch (see http://code.google.com/p/fxmarker/issues/detail?id=2)
with a test case to support this:

[Test]
public function ifelseTestStringLength() : void{

var data : String = "<#if text.length==4>Length is 4<#else>The
length is not 4</#if>";
var dataModel : DataModel = new DataModel();
dataModel.putValue("text", new HashItemModel("abcd"));
var result : String = "Length is 4";
testComponent(data, dataModel, result);
// test empty string
dataModel.putValue("text", new HashItemModel(""));
result = "The length is not 4";
testComponent(data, dataModel, result);

// test null==4 => false
dataModel.putValue("text", new HashItemModel(null));
result = "The length is not 4";
testComponent(data, dataModel, result);
}

Alexutz

unread,
Sep 8, 2011, 5:15:59 AM9/8/11
to FxWorks
Thank you, Roman, I'll take a look at it,

Alex

On Sep 8, 12:03 pm, Roman <roman.st...@googlemail.com> wrote:
> I provided a patch (seehttp://code.google.com/p/fxmarker/issues/detail?id=2)
Reply all
Reply to author
Forward
0 new messages