public void equalsTest() { Long a, b; bool c; a = new Long(Long.MIN_VALUE); b = new Long((long)-1); c = a.equals(b); Assert.AreEqual(false, c); a = new Long(Long.MAX_VALUE); b = new Long((long)1); c = a.equals(b); Assert.AreEqual(false, c); a = new Long((long)0); b = new Long((long)1); c = a.equals(b); Assert.AreEqual(false, c); a = new Long((long)0); b = new Long((long)-1); c = a.equals(b); Assert.AreEqual(false, c); a = new Long((long)1); b = new Long((long)1); c = a.equals(b); Assert.AreEqual(true, c); a = new Long((long)-1); b = new Long((long)-1); c = a.equals(b); Assert.AreEqual(true, c); }
/* * Verifies that the scanned long value is equal to the expected value. */ private void nextLongAssertEquals(Scanner sc, long expected) { assertEquals("nextLong", expected, sc.nextLong, (e, a) => { Long x = new Long(e); Long y = new Long(a); return(x.equals(y)); }); }