File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed
Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -378,6 +378,34 @@ test('Multipolygon Part must be within outline', () => {
378378 expect ( new Building ( '11' , data ) . parts . length ) . toBe ( 0 ) ;
379379} ) ;
380380
381+ /** Test partIsInside
382+ class BldgMock extends Building {
383+
384+ constructor() {
385+ this.shape = new Shape();
386+ }
387+ }
388+
389+ class PartMock {
390+ constructor(shape) {
391+ this.shape = shape;
392+ }
393+ }
394+
395+ describe.each([
396+ [[], false, 'Two Separate Ways'],
397+ [[], true, 'Two Ways share edge'],
398+ [[], false, 'multipolygon outside'],
399+ ])('partIsInside', (shapePoints, expected, description) => {
400+ test(`${description}`, () => {
401+ const shape = new Shape(shapePoints.map((point) => new Vector2(...point)));
402+ const part = new PartMock(shape);
403+ const bldg = new BldgMock();
404+ expect(bldg.partIsInside(part)).toBe(expected);
405+ });
406+ });
407+ */
408+
381409window . printError = printError ;
382410
383411var errors = [ ] ;
You can’t perform that action at this time.
0 commit comments