Merge pull request #337 from NativeScript/platforms-in-builder

throw error if nesting platform tags + test
This commit is contained in:
Vladimir Enchev
2015-06-18 10:22:48 +03:00
2 changed files with 20 additions and 4 deletions

View File

@@ -152,6 +152,17 @@ export function test_parse_ShouldParsePlatformSpecificComponents() {
}
};
export function test_parse_ThrowErrorWhenNestingPlatforms() {
var e: Error;
try {
builder.parse("<Page><ios><TextField /><android><Label /></android></ios></Page>");
} catch (ex) {
e = ex;
}
TKUnit.assert(e, "Expected result: Error; Actual result: " + e);
};
export function test_parse_ShouldParseBindings() {
var p = <page.Page>builder.parse("<Page><Switch checked='{{ myProp }}' /></Page>");
p.bindingContext = { myProp: true };