Mercurial > hg > truffle
changeset 13961:4eda2fa64da6
SL: Run test as part of "mx unittest"
author | Christian Wimmer <christian.wimmer@oracle.com> |
---|---|
date | Sat, 15 Feb 2014 08:00:16 -0800 |
parents | 7392b9e0470b |
children | d68f5d0c97f0 |
files | graal/com.oracle.truffle.sl.test/src/com/oracle/truffle/sl/test/SLSimpleTestSuite.java graal/com.oracle.truffle.sl.test/src/com/oracle/truffle/sl/test/SLTestRunner.java graal/com.oracle.truffle.sl.test/tests/error/TypeError05.output |
diffstat | 3 files changed, 9 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.truffle.sl.test/src/com/oracle/truffle/sl/test/SLSimpleTestSuite.java Sat Feb 15 07:59:48 2014 -0800 +++ b/graal/com.oracle.truffle.sl.test/src/com/oracle/truffle/sl/test/SLSimpleTestSuite.java Sat Feb 15 08:00:16 2014 -0800 @@ -22,6 +22,7 @@ */ package com.oracle.truffle.sl.test; +import org.junit.*; import org.junit.runner.*; @RunWith(SLTestRunner.class) @@ -32,4 +33,11 @@ SLTestRunner.runInMain(SLSimpleTestSuite.class, args); } + /* + * Our "mx unittest" command looks for methods that are annotated with @Test. By just defining + * an empty method, this class gets included and the test suite is properly executed. + */ + @Test + public void unittest() { + } }
--- a/graal/com.oracle.truffle.sl.test/src/com/oracle/truffle/sl/test/SLTestRunner.java Sat Feb 15 07:59:48 2014 -0800 +++ b/graal/com.oracle.truffle.sl.test/src/com/oracle/truffle/sl/test/SLTestRunner.java Sat Feb 15 08:00:16 2014 -0800 @@ -89,11 +89,6 @@ return testCases; } - @Override - public void filter(Filter filter) throws NoTestsRemainException { - super.filter(filter); - } - protected List<TestCase> createTests(final Class<?> c) throws IOException, InitializationError { SLTestSuite suite = c.getAnnotation(SLTestSuite.class); if (suite == null) {
--- a/graal/com.oracle.truffle.sl.test/tests/error/TypeError05.output Sat Feb 15 07:59:48 2014 -0800 +++ b/graal/com.oracle.truffle.sl.test/tests/error/TypeError05.output Sat Feb 15 08:00:16 2014 -0800 @@ -1,1 +1,1 @@ -Type error at TypeError05.sl line 3 col 3: operation "call" not defined for Boolean true +Type error at TypeError05.sl line 3 col 3: operation "invoke" not defined for Boolean true