Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix code that was checked in too early
- Loading branch information
Showing
7 changed files
with
56 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
javaparser-testing/src/test/java/com/github/javaparser/ast/visitor/HashCodeVisitorTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package com.github.javaparser.ast.visitor; | ||
|
||
import com.github.javaparser.JavaParser; | ||
import com.github.javaparser.ast.CompilationUnit; | ||
import org.junit.Test; | ||
|
||
import static org.junit.Assert.assertEquals; | ||
import static org.junit.Assert.assertNotEquals; | ||
|
||
public class HashCodeVisitorTest { | ||
@Test | ||
public void testEquals() { | ||
CompilationUnit p1 = JavaParser.parse("class X { }"); | ||
CompilationUnit p2 = JavaParser.parse("class X { }"); | ||
assertEquals(p1.hashCode(), p2.hashCode()); | ||
} | ||
|
||
@Test | ||
public void testNotEquals() { | ||
CompilationUnit p1 = JavaParser.parse("class X { }"); | ||
CompilationUnit p2 = JavaParser.parse("class Y { }"); | ||
assertNotEquals(p1.hashCode(), p2.hashCode()); | ||
} | ||
} |
Oops, something went wrong.