Mercurial > hg > graal-compiler
diff graal/com.oracle.truffle.api.test/src/com/oracle/truffle/api/test/TruffleRuntimeTest.java @ 17036:7b45e33b7986
Truffle: made TruffleRuntime#getCallTargets return a Collection and simplified its implementation.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Wed, 03 Sep 2014 14:58:53 +0200 |
parents | 5a1d764f6afc |
children | c88ab4f1f04a |
line wrap: on
line diff
--- a/graal/com.oracle.truffle.api.test/src/com/oracle/truffle/api/test/TruffleRuntimeTest.java Wed Sep 03 12:01:14 2014 +0200 +++ b/graal/com.oracle.truffle.api.test/src/com/oracle/truffle/api/test/TruffleRuntimeTest.java Wed Sep 03 14:58:53 2014 +0200 @@ -86,7 +86,7 @@ public void testGetCallTargets1() { RootNode rootNode = createTestRootNode(); RootCallTarget target = runtime.createCallTarget(rootNode); - assertTrue(runtime.getCallTargets().indexOf(target) != -1); + assertTrue(runtime.getCallTargets().contains(target)); } @Test @@ -94,8 +94,8 @@ RootNode rootNode = createTestRootNode(); RootCallTarget target1 = runtime.createCallTarget(rootNode); RootCallTarget target2 = runtime.createCallTarget(rootNode); - assertTrue(runtime.getCallTargets().indexOf(target1) != -1); - assertTrue(runtime.getCallTargets().indexOf(target2) != -1); + assertTrue(runtime.getCallTargets().contains(target1)); + assertTrue(runtime.getCallTargets().contains(target2)); } /*