Skip to content

Commit e8b8bf3

Browse files
Merge branch 'testng-team:master' into support-to-execlude-somes-test-in-option-of-command-line
2 parents f898bee + 078c1e3 commit e8b8bf3

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

testng-asserts/src/main/java/org/testng/Assert.java

+12
Original file line numberDiff line numberDiff line change
@@ -968,6 +968,18 @@ public static void assertEquals(Long actual, long expected, String message) {
968968
assertEquals(actual, Long.valueOf(expected), message);
969969
}
970970

971+
/**
972+
* Asserts that two longs are equal. If they are not, an AssertionError, with the given message,
973+
* is thrown.
974+
*
975+
* @param actual the actual value
976+
* @param expected the expected value
977+
* @param message the assertion error message
978+
*/
979+
public static void assertEquals(long actual, Long expected, String message) {
980+
assertEquals(Long.valueOf(actual), expected, message);
981+
}
982+
971983
/**
972984
* Asserts that two longs are equal. If they are not, an AssertionError, with the given message,
973985
* is thrown.

testng-asserts/src/test/java/test/asserttests/AssertTest.java

+1
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ public void assertEqualsBoxedUnboxedLong() {
5151
assertEquals(a, b);
5252
assertEquals(a, b, "");
5353
assertEquals(b, a);
54+
assertEquals(b, a, "");
5455
assertEquals(Long.valueOf(b), a, "");
5556
}
5657

0 commit comments

Comments
 (0)