Simon Ochsenreither
unread,May 11, 2013, 8:13:06 AM5/11/13Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to scala-i...@googlegroups.com
... does someone have a opinion on what's the appropriate way to fix this test?
It fails with “calibration failure”, while it tries to run a supposedly non-tail-call-optimized method (which is of course optimized on platforms which support tail calls).
def calibrate: Int = {
val calibrator = new Calibrator();
var stop = false;
var n = 1;
while (!stop) {
try {
calibrator.f(n, n);
if (n >= Int.MaxValue / 2) sys.error("calibration failure");
n = 2 * n;
} catch {
case exception: compat.Platform.StackOverflowError => stop = true
}
}
4 * n
}
Apart from that, it also hardcodes that certain methods fail with a StackOverflowError in the checkfile, which is not true on all platforms.
Does someone see a good option how to keep this test running properly?
Or should this just be skipped when runtime == "Avian"? As long as we are still testing it on other platforms, the chance of e regression should be low, right?
Thanks and bye,
Simon