[testng] 44/355: Fixes issue #116: org.testng.internal.BaseTestMethod does respect general contract of Comparable
Eugene Zhukov
eugene-guest at moszumanska.debian.org
Tue Aug 18 10:19:45 UTC 2015
This is an automated email from the git hooks/post-receive script.
eugene-guest pushed a commit to annotated tag OpenBSD
in repository testng.
commit 7e5c60a7d723f88224004c0074c35824c10f9c4a
Author: Lukáš Petrovický <lpetrovi at redhat.com>
Date: Sat Feb 15 13:33:48 2014 -0500
Fixes issue #116: org.testng.internal.BaseTestMethod does respect general contract of Comparable
---
pom-test.xml | 7 ++++++-
src/main/java/org/testng/internal/BaseTestMethod.java | 4 +++-
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/pom-test.xml b/pom-test.xml
index 0af9d07..8a29968 100644
--- a/pom-test.xml
+++ b/pom-test.xml
@@ -65,9 +65,14 @@
<version>1.27</version>
</dependency>
<dependency>
+ <groupId>org.yaml</groupId>
+ <artifactId>snakeyaml</artifactId>
+ <version>1.12</version>
+ </dependency>
+ <dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
- <version>6.8.6-SNAPSHOT</version>
+ <version>6.8.8-SNAPSHOT</version>
<scope>test</scope>
</dependency>
</dependencies>
diff --git a/src/main/java/org/testng/internal/BaseTestMethod.java b/src/main/java/org/testng/internal/BaseTestMethod.java
index 8aa78a7..5257ebd 100755
--- a/src/main/java/org/testng/internal/BaseTestMethod.java
+++ b/src/main/java/org/testng/internal/BaseTestMethod.java
@@ -153,7 +153,9 @@ public abstract class BaseTestMethod implements ITestNGMethod {
int result = -2;
Class<?> thisClass = getRealClass();
Class<?> otherClass = ((ITestNGMethod) o).getRealClass();
- if (thisClass.isAssignableFrom(otherClass)) {
+ if (this == o) {
+ result = 0;
+ } else if (thisClass.isAssignableFrom(otherClass)) {
result = -1;
} else if (otherClass.isAssignableFrom(thisClass)) {
result = 1;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/testng.git
More information about the pkg-java-commits
mailing list