Math { static float max(float a, float b, float c) { return java.lang.Math.max(java.lang.Math.max(a, b), c); } private  Math();   }
@Test public void max3float() { assertEquals(0.3f, Math.max(0.1f, 0.2f, 0.3f), 0.0); assertEquals(0.31f, Math.max(0.31f, 0.2f, 0.3f), 0.0); assertEquals(0.5f, Math.max(0.1f, 0.5f, 0.3f), 0.0); assertEquals(0.5f, Math.max(-10.1f, 0.5f, -0.3f), 0.0); }
@Test public void max3int() { assertEquals(5, Math.max(-10, 5, 3)); assertEquals(10, Math.max(10, 5, 3)); assertEquals(13, Math.max(-10, 5, 13)); }
@Test public void max4float() { assertEquals(36.9f, Math.max(10.1f, 5.45f, -3.12f, 36.9f), 0.0); assertEquals(10.1f, Math.max(10.1f, 5.45f, -3.12f, 6.9f), 0.0); assertEquals(-3.12f, Math.max(-10.1f, -5.45f, -3.12f, -36.9f), 0.0); assertEquals(25.45f, Math.max(10.1f, 25.45f, -3.12f, 16.9f), 0.0); }
@Test public void max4int() { assertEquals(5, Math.max(-10, 5, 3, 1)); assertEquals(10, Math.max(10, 5, 3, 1)); assertEquals(13, Math.max(-10, 5, 13, 1)); assertEquals(15, Math.max(-10, 5, 3, 15)); }