Implement test_polygon.