Tests: use compareSegmentLists in compareItems helper.

This commit is contained in:
Jonathan Puckey 2011-05-21 19:42:29 +02:00
parent fc8a9bb10b
commit f5e9ad2e85

View file

@ -273,22 +273,19 @@ function compareItems(item, item2, checkIdentity) {
'Compare Item#matrix');
}
if (item2.segments) {
if (checkIdentity) {
equals(function() {
return item.segments != item2.segments;
}, true);
}
equals(item.segments.toString(), item2.segments.toString(),
'Compare Item#segments');
}
// Path specific
// PathItem specific
if (item instanceof PathItem) {
equals(function() {
return item.clockwise == item2.clockwise;
}, true);
}
// Path specific
if (item2 instanceof Path) {
compareSegmentLists(item.segments, item2.segments, checkIdentity);
}
// Group specific
if (item instanceof Group) {