Closed brohisoft closed 6 years ago
@owsoultions you need to get the test to work as it is written (by fixing non-test code).. changing the test code to work defeats the purpose.
in ContinueTortureTest.java sending argument as null, why? it should also send a array or bunch of characters/Strings like ContinueTest.java... am i right:?
@owsoultions right now ContinueTortureTest.java is known to throw an exception, a CodeGenException.is produced when the code is run, indicating that the source code isnt working. We set up the test right now to pass since it is a known bug. So the reason the OpenCL variable is blank and the expectedException is set to CodeGenException is exactly the reason.
Your job is to fix it so the code no longer throws an exception and instead produces OpenCL code. You will then edit ContinueTortureTest.java by putting the correct OpenCL int he string and setting expectedException to null.
@freemo I think what @owsoultions meant to say is that JUnit doesn't like tests defined in Test class constructor method, should be instead a regular test method, i.e.: instead of public ContinueTest(), it should be public void ContinueTest().
In fact my eclipse complaints about the test names having the same name as the class constructor, to avoid such confusions.
The test methods could be instead public void ContinueTestPass() if the test is intended to complete without being rejected by the implementation or public ContinueTestFail() if test should pass only if the implementation code rejects the call due to wrong parameters or otherwise must throw an exception.
@CoreRasurae Yea thats valid, in fact id like to redo our testing infrastucture entierly. We should be using
@Test(expected...)
for example
I checked the two test classes which are ContinueTest.java and ContinueTortureTest.java, where i found the constructors were being using as class methods with @Test Annotation. After using them as constructor i found 1 Failure.
and