Mercurial > hg > truffle
diff truffle/com.oracle.truffle.sl.test/src/com/oracle/truffle/sl/test/SLTckTest.java @ 22542:f8fb609939a7
Give implementors of the TCK control over comparing doubles.
author | Jaroslav Tulach <jaroslav.tulach@oracle.com> |
---|---|
date | Wed, 06 Jan 2016 13:14:35 +0100 |
parents | 6ab540203853 |
children | c3a7ad415a8a |
line wrap: on
line diff
--- a/truffle/com.oracle.truffle.sl.test/src/com/oracle/truffle/sl/test/SLTckTest.java Wed Jan 06 10:59:58 2016 +0100 +++ b/truffle/com.oracle.truffle.sl.test/src/com/oracle/truffle/sl/test/SLTckTest.java Wed Jan 06 13:14:35 2016 +0100 @@ -47,10 +47,10 @@ import org.junit.After; -import static org.junit.Assert.assertTrue; import org.junit.Before; import org.junit.Test; +import static org.junit.Assert.assertTrue; /** * This is the way to verify your language implementation is compatible. @@ -213,67 +213,20 @@ return "eval"; } - // - // Ignore tests working on floats and double - // - @Override - public void testPlusWithDouble() throws Exception { - } - - @Override - public void testPlusWithFloat() throws Exception { - } - - @Override - public void testPrimitiveReturnTypeDouble() throws Exception { - } - - @Override - public void testPrimitiveReturnTypeFloat() throws Exception { - } - - @Override - public void testPrimitiveidentityDouble() throws Exception { - } - - @Override - public void testPrimitiveidentityFloat() throws Exception { + protected String complexCopy() { + // skip these tests; SL doesn't have arrays + return null; } @Override - public void testSumRealOfComplexNumbersA() throws Exception { - } - - @Override - public void testSumRealOfComplexNumbersB() throws Exception { - } - - @Override - public void testSumRealOfComplexNumbersAsStructuredDataColumnBased() throws Exception { - } - - @Override - public void testSumRealOfComplexNumbersAsStructuredDataRowBased() throws Exception { + protected String complexSumReal() { + // skip these tests; SL doesn't have arrays + return null; } @Override - public void testCopyComplexNumbersA() throws Exception { - } - - @Override - public void testCopyComplexNumbersB() throws Exception { - } - - @Override - public void testCopyStructuredComplexToComplexNumbersA() throws Exception { - } - - @Override - public void readWriteDoubleValue() throws Exception { - } - - @Override - public void readWriteFloatValue() throws Exception { + protected void assertDouble(String msg, double expectedValue, double actualValue) { + // don't compare doubles, SL had to convert them to longs } }