@@ -32,6 +32,7 @@ test('Test combining 2 ways 1->2', () => {
3232 let result = BuildingShapeUtils . combineWays ( [ xml1 , xml2 , xml3 ] ) ;
3333 expect ( result . length ) . toBe ( 1 ) ;
3434 expect ( BuildingShapeUtils . isClosed ( result [ 1 ] ) ) ;
35+ // expect 4 nodes
3536} ) ;
3637
3738test ( 'Test combining 3 ways 2->1->3' , ( ) => {
@@ -45,6 +46,8 @@ test('Test combining 3 ways 2->1->3', () => {
4546 let result = BuildingShapeUtils . combineWays ( [ xml1 , xml2 , xml3 ] ) ;
4647 expect ( result . length ) . toBe ( 1 ) ;
4748 expect ( BuildingShapeUtils . isClosed ( result [ 1 ] ) ) ;
49+ // expect 4 nodes
50+ // expect result to contain nodes 1, 2 and 3.
4851} ) ;
4952
5053test ( 'Test combining 2 unaligned ways' , ( ) => {
@@ -58,6 +61,8 @@ test('Test combining 2 unaligned ways', () => {
5861 let result = BuildingShapeUtils . combineWays ( [ xml1 , xml2 , xml3 ] ) ;
5962 expect ( result . length ) . toBe ( 1 ) ;
6063 expect ( BuildingShapeUtils . isClosed ( result [ 1 ] ) ) ;
64+ // expect 4 nodes
65+ // expect result to contain nodes 1, 2 and 3.
6166} ) ;
6267
6368test ( 'Test combining 3 ways 1->2->3' , ( ) => {
@@ -72,6 +77,8 @@ test('Test combining 3 ways 1->2->3', () => {
7277 let result = BuildingShapeUtils . combineWays ( [ xml1 , xml2 , xml3 ] ) ;
7378 expect ( result . length ) . toBe ( 1 ) ;
7479 expect ( BuildingShapeUtils . isClosed ( result [ 1 ] ) ) ;
80+ // expect 4 nodes
81+ // expect result to contain nodes 1, 2 and 3.
7582} ) ;
7683
7784test ( 'Test combining 4 ways' , ( ) => {
@@ -87,6 +94,8 @@ test('Test combining 4 ways', () => {
8794 let result = BuildingShapeUtils . combineWays ( [ xml1 , xml2 , xml3 , xml4 ] ) ;
8895 expect ( result . length ) . toBe ( 1 ) ;
8996 expect ( BuildingShapeUtils . isClosed ( result [ 1 ] ) ) ;
97+ // expect 5 nodes
98+ // expect result to contain nodes 1, 2 3, and 4.
9099} ) ;
91100
92101/**test('Test combining 4 ways, one not part of loop', () => {
@@ -101,5 +110,8 @@ test('Test combining 4 ways', () => {
101110 let xml4 = parser.parseFromString(way4, 'text/xml').getElementsByTagName('way')[0];
102111 let result = BuildingShapeUtils.combineWays([xml1, xml2, xml3, xml4]);
103112 expect(result.length).toBe(1);
113+ expect(BuildingShapeUtils.isClosed(result[1]));
114+ // expect 4 nodes
115+ // expect result to contain nodes 1, 2 and 3.
104116});
105117*/
0 commit comments