issues fixed
This commit is contained in:
parent
fb31fd910e
commit
1724c0f8ec
6 changed files with 119 additions and 0 deletions
1
bin/.gitignore
vendored
Normal file
1
bin/.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
/nl
|
||||||
16
nl.jssl.autounit.testclasses.BooleanArguments.xml
Normal file
16
nl.jssl.autounit.testclasses.BooleanArguments.xml
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
<map>
|
||||||
|
<entry>
|
||||||
|
<string>public java.lang.String getText(boolean arg1,boolean arg2)</string>
|
||||||
|
<results>
|
||||||
|
<contents>
|
||||||
|
<case>
|
||||||
|
<input class="args">
|
||||||
|
<arg1>false</arg1>
|
||||||
|
<arg1>false</arg1>
|
||||||
|
</input>
|
||||||
|
<output class="string">falsefalse</output>
|
||||||
|
</case>
|
||||||
|
</contents>
|
||||||
|
</results>
|
||||||
|
</entry>
|
||||||
|
</map>
|
||||||
21
nl.jssl.autounit.testclasses.ByteArguments.xml
Normal file
21
nl.jssl.autounit.testclasses.ByteArguments.xml
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
<map>
|
||||||
|
<entry>
|
||||||
|
<string>public int getDouble(byte arg1)</string>
|
||||||
|
<results>
|
||||||
|
<contents>
|
||||||
|
<case>
|
||||||
|
<input class="args">
|
||||||
|
<arg1>-128</arg1>
|
||||||
|
</input>
|
||||||
|
<output class="int">-256</output>
|
||||||
|
</case>
|
||||||
|
<case>
|
||||||
|
<input class="args">
|
||||||
|
<arg1>0</arg1>
|
||||||
|
</input>
|
||||||
|
<output class="int">11</output>
|
||||||
|
</case>
|
||||||
|
</contents>
|
||||||
|
</results>
|
||||||
|
</entry>
|
||||||
|
</map>
|
||||||
15
nl.jssl.autounit.testclasses.FloatArguments.xml
Normal file
15
nl.jssl.autounit.testclasses.FloatArguments.xml
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
<map>
|
||||||
|
<entry>
|
||||||
|
<string>public int round(float arg1)</string>
|
||||||
|
<results>
|
||||||
|
<contents>
|
||||||
|
<case>
|
||||||
|
<input class="args">
|
||||||
|
<arg1>-7.5912475E37</arg1>
|
||||||
|
</input>
|
||||||
|
<output class="int">-2147483648</output>
|
||||||
|
</case>
|
||||||
|
</contents>
|
||||||
|
</results>
|
||||||
|
</entry>
|
||||||
|
</map>
|
||||||
34
nl.jssl.autounit.testclasses.IntArguments.xml
Normal file
34
nl.jssl.autounit.testclasses.IntArguments.xml
Normal file
|
|
@ -0,0 +1,34 @@
|
||||||
|
<map>
|
||||||
|
<entry>
|
||||||
|
<string>public java.lang.String evenOrUneven(int arg1)</string>
|
||||||
|
<results>
|
||||||
|
<contents>
|
||||||
|
<case>
|
||||||
|
<input class="args">
|
||||||
|
<arg1>-819817314</arg1>
|
||||||
|
</input>
|
||||||
|
<output class="string">even</output>
|
||||||
|
</case>
|
||||||
|
<case>
|
||||||
|
<input class="args">
|
||||||
|
<arg1>-916902647</arg1>
|
||||||
|
</input>
|
||||||
|
<output class="string">uneven</output>
|
||||||
|
</case>
|
||||||
|
</contents>
|
||||||
|
</results>
|
||||||
|
</entry>
|
||||||
|
<entry>
|
||||||
|
<string>public int randomOther(int arg1)</string>
|
||||||
|
<results>
|
||||||
|
<contents>
|
||||||
|
<case>
|
||||||
|
<input class="args">
|
||||||
|
<arg1>-1762850486</arg1>
|
||||||
|
</input>
|
||||||
|
<output class="int">0</output>
|
||||||
|
</case>
|
||||||
|
</contents>
|
||||||
|
</results>
|
||||||
|
</entry>
|
||||||
|
</map>
|
||||||
32
src/nl/jssl/autounit/utils/MemoryClassloader.java
Normal file
32
src/nl/jssl/autounit/utils/MemoryClassloader.java
Normal file
|
|
@ -0,0 +1,32 @@
|
||||||
|
package nl.jssl.autounit.utils;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
public class MemoryClassloader extends ClassLoader {
|
||||||
|
|
||||||
|
private final Map<String, byte[]> definitions = new HashMap<String, byte[]>();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add a in-memory representation of a class.
|
||||||
|
*
|
||||||
|
* @param name
|
||||||
|
* name of the class
|
||||||
|
* @param bytes
|
||||||
|
* class definition
|
||||||
|
*/
|
||||||
|
public void addDefinition(final String name, final byte[] bytes) {
|
||||||
|
definitions.put(name, bytes);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Class<?> loadClass(final String name, final boolean resolve)
|
||||||
|
throws ClassNotFoundException {
|
||||||
|
final byte[] bytes = definitions.get(name);
|
||||||
|
if (bytes != null) {
|
||||||
|
return defineClass(name, bytes, 0, bytes.length);
|
||||||
|
}
|
||||||
|
return super.loadClass(name, resolve);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
Add table
Reference in a new issue