* {@link com.googlecode.jumpnevolve.math.Rectangle#Rectangle(float, float, float, float)}
* .
*/
@Test
public void testRectangleFloatFloatFloatFloat() {
Rectangle rect = new Rectangle(20.0f, 45.0f, 800.0f, 300.0f);
assertThat(rect.x, is(20.0f));
assertThat(rect.y, is(45.0f));
assertThat(rect.width, is(800.0f));
assertThat(rect.height, is(300.0f));
rect = new Rectangle(0.0f, 0.0f, -200.0f, 100.0f);
assertThat(rect.x, is(-200.f));
assertThat(rect.y, is(0.0f));
assertThat(rect.width, is(200.0f));
assertThat(rect.height, is(100.0f));
try {
new Rectangle(-10.f, -33.0f, 17.0f, 0.0f);
fail("Rectangles must have a width and height.");
} catch (IllegalArgumentException e) {
}
}