import'package:test/test.dart';voidmain(){test("rect accessors",(){Rectr=newRect.fromLTRB(1.0,3.0,5.0,7.0);expect(r.left,equals(1.0));expect(r.top,equals(3.0));expect(r.right,equals(5.0));expect(r.bottom,equals(7.0));});test("rect created by width and height",(){Rectr=newRect.fromLTWH(1.0,3.0,5.0,7.0);expect(r.left,equals(1.0));expect(r.top,equals(3.0));expect(r.right,equals(6.0));expect(r.bottom,equals(10.0));});test("rect intersection",(){Rectr1=newRect.fromLTRB(0.0,0.0,100.0,100.0);Rectr2=newRect.fromLTRB(50.0,50.0,200.0,200.0);Rectr3=r1.intersect(r2);expect(r3.left,equals(50.0));expect(r3.top,equals(50.0));expect(r3.right,equals(100.0));expect(r3.bottom,equals(100.0));Rectr4=r2.intersect(r1);expect(r4,equals(r3));});}