@@ -16,85 +16,85 @@ import { BuildingShapeUtils } from '../src/extras/BuildingShapeUtils.js';
1616describe . each ( [
1717 [
1818 [ '<way id="1"><nd ref="1"/><nd ref="2"/><nd ref="3"/><nd ref="4"/></way>' ,
19- ] , 0 , 0 , 'Single Open Way' ,
19+ ] , 0 , 0 , [ ] , 'Single Open Way' ,
2020 ] ,
2121 [
2222 [
2323 '<way id="1"><nd ref="1"/><nd ref="2"/></way>' ,
2424 '<way id="2"><nd ref="2"/><nd ref="3"/></way>' ,
2525 '<way id="3"><nd ref="3"/><nd ref="1"/></way>' ,
26- ] , 1 , 4 , 'Test combining 3 ways 1->2->3' ,
26+ ] , 1 , 4 , [ ] , 'Test combining 3 ways 1->2->3' ,
2727 ] ,
2828 [
2929 [
3030 '<way id="1"><nd ref="1"/><nd ref="2"/></way>' ,
3131 '<way id="2"><nd ref="3"/><nd ref="1"/></way>' ,
3232 '<way id="3"><nd ref="2"/><nd ref="3"/></way>' ,
33- ] , 1 , 4 , 'Test combining 3 ways 2->1->3' ,
33+ ] , 1 , 4 , [ ] , 'Test combining 3 ways 2->1->3' ,
3434 ] ,
3535 [
3636 [
3737 '<way id="1"><nd ref="1"/><nd ref="2"/></way>' ,
3838 '<way id="2"><nd ref="3"/><nd ref="2"/></way>' ,
3939 '<way id="3"><nd ref="3"/><nd ref="1"/></way>' ,
40- ] , 1 , 4 , 'Test combining tip to tip' ,
40+ ] , 1 , 4 , [ ] , 'Test combining tip to tip' ,
4141 ] ,
4242 [
4343 [
4444 '<way id="1"><nd ref="1"/><nd ref="2"/></way>' ,
4545 '<way id="2"><nd ref="1"/><nd ref="3"/></way>' ,
4646 '<way id="3"><nd ref="2"/><nd ref="3"/></way>' ,
47- ] , 1 , 4 , 'Test combining tail to tail' ,
47+ ] , 1 , 4 , [ ] , 'Test combining tail to tail' ,
4848 ] ,
4949 [
5050 [
5151 '<way id="1"><nd ref="1"/><nd ref="2"/></way>' ,
5252 '<way id="2"><nd ref="3"/><nd ref="4"/></way>' ,
5353 '<way id="3"><nd ref="4"/><nd ref="1"/></way>' ,
5454 '<way id="4"><nd ref="2"/><nd ref="3"/></way>' ,
55- ] , 1 , 5 , 'Test combining 4 ways' ,
55+ ] , 1 , 5 , [ ] , 'Test combining 4 ways' ,
5656 ] ,
5757 [
5858 [
5959 '<way id="1"><nd ref="1"/><nd ref="2"/></way>' ,
6060 '<way id="2"><nd ref="3"/><nd ref="2"/></way>' ,
61- ] , 0 , 0 , 'Test combining 2 open ways into one open way' ,
61+ ] , 0 , 0 , [ ] , 'Test combining 2 open ways into one open way' ,
6262 ] ,
6363 [
6464 [
6565 '<way id="1"><nd ref="1"/><nd ref="2"/></way>' ,
6666 '<way id="2"><nd ref="3"/><nd ref="2"/></way>' ,
6767 '<way id="3"><nd ref="4"/><nd ref="5"/></way>' ,
68- ] , 0 , 0 , 'Test combining 3 open ways into 2 open ways' ,
68+ ] , 0 , 0 , [ ] , 'Test combining 3 open ways into 2 open ways' ,
6969 ] ,
7070 [
7171 [
7272 '<way id="1"><nd ref="1"/><nd ref="2"/></way>' ,
7373 '<way id="2"><nd ref="2"/><nd ref="4"/></way>' ,
7474 '<way id="3"><nd ref="2"/><nd ref="3"/></way>' ,
7575 '<way id="4"><nd ref="1"/><nd ref="3"/></way>' ,
76- ] , 1 , 4 , 'Combining 4 open ways into 1 closed & 1 remaining open way' ,
76+ ] , 1 , 4 , [ ] , 'Combining 4 open ways into 1 closed & 1 remaining open way' ,
7777 ] ,
7878 [
7979 [
8080 '<way id="1"><nd ref="1"/><nd ref="2"/><nd ref="3"/></way>' ,
8181 '<way id="2"><nd ref="3"/><nd ref="5"/><nd ref="1"/></way>' ,
8282 '<way id="3"><nd ref="3"/><nd ref="4"/><nd ref="1"/></way>' ,
83- ] , 1 , 5 , 'Dealing with amiguity. Only make one closed way' ,
83+ ] , 1 , 5 , [ ] , 'Dealing with amiguity. Only make one closed way' ,
8484 ] ,
8585 [
8686 [
8787 '<way id="1"><nd ref="1"/><nd ref="2"/><nd ref="3"/></way>' ,
8888 '<way id="2"><nd ref="3"/><nd ref="4"/><nd ref="2"/><nd ref="5"/><nd ref="1"/></way>' ,
89- ] , 0 , 0 , 'Closed way is self intersecting' ,
89+ ] , 0 , 0 , [ ] , 'Closed way is self intersecting' ,
9090 ] ,
9191 [
9292 [
9393 '<way id="1"><nd ref="1"/><nd ref="2"/></way>' ,
9494 '<way id="2"><nd ref="2"/><nd ref="3"/><nd ref="4"/><nd ref="5"/><nd ref="3"/><nd ref="1"/></way>' ,
95- ] , 0 , 0 , 'Open way is self intersecting' ,
95+ ] , 0 , 0 , [ 'Way 2 is self-intersecting' ] , 'Open way is self intersecting' ,
9696 ] ,
97- ] ) ( 'Combine Ways' , ( ways , length , nodes , description ) => {
97+ ] ) ( 'Combine Ways' , ( ways , length , nodes , errors , description ) => {
9898 test ( `${ description } ` , ( ) => {
9999 let parser = new window . DOMParser ( ) ;
100100 const xml = [ ] ;
0 commit comments