File tree Expand file tree Collapse file tree
liquidjava-verifier/src/test/java/liquidjava/rj_language/ast Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ package liquidjava .rj_language .ast ;
2+
3+ import java .util .Arrays ;
4+
5+ import static org .junit .Assert .assertTrue ;
6+
7+ import liquidjava .rj_language .opt .Test ;
8+
9+ public class TestFunctionInvocation {
10+ @ Test
11+ public void testFunctionInvocationEqualsAndHashcode (){
12+ Expression exp1 = new LiteralString ("./testFiles/file.txt" );
13+ Expression exp2 = new LiteralString ("./testFiles/file_fake.txt" );
14+
15+ FunctionInvocation f1 = new FunctionInvocation ("java.nio.file.Paths.get" , Arrays .asList (exp1 ));
16+ FunctionInvocation f2 = new FunctionInvocation ("java.nio.file.Paths.get" , Arrays .asList (exp1 ));
17+ FunctionInvocation f3 = new FunctionInvocation ("java.nio.file.Paths.get" , Arrays .asList (exp2 ));
18+
19+ assertTrue (f1 .equals (f2 ) && !f1 .equals (f3 ));
20+ assertTrue (f1 .hashCode () == f2 .hashCode () && f1 .hashCode () != f3 .hashCode ());
21+ }
22+
23+ }
You can’t perform that action at this time.
0 commit comments