Tests and code for rectangles.