From 18dad4a676e2f6c9b8a8d95ea9958bddcd45a9ce Mon Sep 17 00:00:00 2001 From: Luigi Trabacchin Date: Thu, 3 Apr 2014 20:51:46 +0200 Subject: [PATCH] Update svgjs-tests.ts --- svgjs/svgjs-tests.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/svgjs/svgjs-tests.ts b/svgjs/svgjs-tests.ts index 0a0a2357c5..5ea5d2d50f 100644 --- a/svgjs/svgjs-tests.ts +++ b/svgjs/svgjs-tests.ts @@ -104,9 +104,8 @@ function elementTransformShouldReturnTransformObject() { /* first try to cast it */ var result:svgjs.Element[] = group.children() /* then check values if they are correct */ - if (!(result[0] instanceof svgjs.Element)) { throw "Element.children() is not working" } - if (!(result[1] instanceof svgjs.Element)) { throw "Element.children() is not working" } - if (!(result[2] instanceof svgjs.Element)) { throw "Element.children() is not working" } - if (!(result[3] instanceof svgjs.Element)) { throw "Element.children() is not working" } - if (!(result[4] instanceof svgjs.Element)) { throw "Element.children() is not working" } + for (var i = 0; i < 5; i++) { + var elem: svgjs.Element = result[i]; + if (elem == null) { throw "Element.children() is not working" } + } }