comparison truffle/com.oracle.truffle.tck/src/com/oracle/truffle/tck/TruffleTCK.java @ 22076:f54d7e045a37

Verify the two TruffleVM instances are different - otherwise the isolation cannot work
author Jaroslav Tulach <jaroslav.tulach@oracle.com>
date Thu, 13 Aug 2015 09:42:06 +0200
parents e7c2d36daf72
children cf19259edf87
comparison
equal deleted inserted replaced
22075:60f3cb2c3a56 22076:f54d7e045a37
212 212
213 @Test 213 @Test
214 public void testCoExistanceOfMultipleLanguageInstances() throws Exception { 214 public void testCoExistanceOfMultipleLanguageInstances() throws Exception {
215 final String countMethod = countInvocations(); 215 final String countMethod = countInvocations();
216 TruffleVM.Symbol count1 = findGlobalSymbol(countMethod); 216 TruffleVM.Symbol count1 = findGlobalSymbol(countMethod);
217 TruffleVM vm1 = tckVM;
217 tckVM = null; // clean-up 218 tckVM = null; // clean-up
218 TruffleVM.Symbol count2 = findGlobalSymbol(countMethod); 219 TruffleVM.Symbol count2 = findGlobalSymbol(countMethod);
220 TruffleVM vm2 = tckVM;
221
222 assertNotSame("Two virtual machines allocated", vm1, vm2);
219 223
220 int prev1 = 0; 224 int prev1 = 0;
221 int prev2 = 0; 225 int prev2 = 0;
222 Random r = new Random(); 226 Random r = new Random();
223 for (int i = 0; i < 10; i++) { 227 for (int i = 0; i < 10; i++) {