Mercurial > hg > truffle
diff graal/com.oracle.truffle.api.test/src/com/oracle/truffle/api/test/instrument/AdvancedInstrumentTest.java @ 21354:575032310b2c
Truffle/Instrumentation: runtime failures executing an AdvancedInstrument root are now reported automatically via a new mehtod onAdvancedInstrumentResultListener.
author | Michael Van De Vanter <michael.van.de.vanter@oracle.com> |
---|---|
date | Tue, 12 May 2015 14:48:33 -0700 |
parents | 876e710523c5 |
children | 442b57a7f208 |
line wrap: on
line diff
--- a/graal/com.oracle.truffle.api.test/src/com/oracle/truffle/api/test/instrument/AdvancedInstrumentTest.java Tue May 12 12:57:47 2015 -0700 +++ b/graal/com.oracle.truffle.api.test/src/com/oracle/truffle/api/test/instrument/AdvancedInstrumentTest.java Tue May 12 14:48:33 2015 -0700 @@ -58,9 +58,10 @@ assertEquals(13, callTarget1.call()); - // Attach a null listener; it never actually attaches a node. - final Instrument instrument = Instrument.create(new AdvancedInstrumentRootFactory() { + // Attach a null factory; it never actually attaches a node. + final Instrument instrument = Instrument.create(new AdvancedInstrumentRootFactory(null) { + @Override public AdvancedInstrumentRoot createInstrumentRoot(Probe p, Node n) { return null; } @@ -71,9 +72,10 @@ final TestAdvancedInstrumentCounterRoot counter = new TestAdvancedInstrumentCounterRoot(); - // Attach a listener that splices an execution counter into the AST. - probe.attach(Instrument.create(new AdvancedInstrumentRootFactory() { + // Attach a factory that splices an execution counter into the AST. + probe.attach(Instrument.create(new AdvancedInstrumentRootFactory(null) { + @Override public AdvancedInstrumentRoot createInstrumentRoot(Probe p, Node n) { return counter; }