Skip to content

Commit 4df2289

Browse files
authored
Update combine_ways.test.js
1 parent 7434c50 commit 4df2289

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test/combine_ways.test.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ test('Test combining 2 ways 1->2', () => {
3131
let xml3 = parser.parseFromString(way3, 'text/xml').getElementsByTagName('way')[0];
3232
let result = BuildingShapeUtils.combineWays([xml1, xml2, xml3]);
3333
expect(result.length).toBe(1);
34+
expect(BuildingShapeUtils.isClosed(result[1]));
3435
});
3536

3637
test('Test combining 3 ways 2->1->3', () => {
@@ -43,6 +44,7 @@ test('Test combining 3 ways 2->1->3', () => {
4344
let xml3 = parser.parseFromString(way3, 'text/xml').getElementsByTagName('way')[0];
4445
let result = BuildingShapeUtils.combineWays([xml1, xml2, xml3]);
4546
expect(result.length).toBe(1);
47+
expect(BuildingShapeUtils.isClosed(result[1]));
4648
});
4749

4850
test('Test combining 2 unaligned ways', () => {
@@ -55,6 +57,7 @@ test('Test combining 2 unaligned ways', () => {
5557
let xml3 = parser.parseFromString(way3, 'text/xml').getElementsByTagName('way')[0];
5658
let result = BuildingShapeUtils.combineWays([xml1, xml2, xml3]);
5759
expect(result.length).toBe(1);
60+
expect(BuildingShapeUtils.isClosed(result[1]));
5861
});
5962

6063
test('Test combining 3 ways 1->2->3', () => {
@@ -68,6 +71,7 @@ test('Test combining 3 ways 1->2->3', () => {
6871
let xml3 = parser.parseFromString(way3, 'text/xml').getElementsByTagName('way')[0];
6972
let result = BuildingShapeUtils.combineWays([xml1, xml2, xml3]);
7073
expect(result.length).toBe(1);
74+
expect(BuildingShapeUtils.isClosed(result[1]));
7175
});
7276

7377
test('Test combining 4 ways', () => {
@@ -82,6 +86,7 @@ test('Test combining 4 ways', () => {
8286
let xml4 = parser.parseFromString(way4, 'text/xml').getElementsByTagName('way')[0];
8387
let result = BuildingShapeUtils.combineWays([xml1, xml2, xml3, xml4]);
8488
expect(result.length).toBe(1);
89+
expect(BuildingShapeUtils.isClosed(result[1]));
8590
});
8691

8792
/**test('Test combining 4 ways, one not part of loop', () => {

0 commit comments

Comments
 (0)