Change the pom.xml and remove some use of Java 1.5 features to reduce the
number of errors produced by "mvn package".
This commit is contained in:
9
pom.xml
9
pom.xml
@@ -10,4 +10,13 @@
|
|||||||
<build>
|
<build>
|
||||||
<finalName>luaj</finalName>
|
<finalName>luaj</finalName>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>junit</groupId>
|
||||||
|
<artifactId>junit</artifactId>
|
||||||
|
<version>3.8.1</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import java.io.IOException;
|
|||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.Iterator;
|
||||||
import java.util.zip.ZipEntry;
|
import java.util.zip.ZipEntry;
|
||||||
import java.util.zip.ZipInputStream;
|
import java.util.zip.ZipInputStream;
|
||||||
|
|
||||||
@@ -23,8 +24,8 @@ public class StandardTest extends TestCase {
|
|||||||
public static Test suite() throws IOException {
|
public static Test suite() throws IOException {
|
||||||
ZipEntry file;
|
ZipEntry file;
|
||||||
|
|
||||||
final HashMap<String, Proto> tests = new HashMap<String, Proto>();
|
final HashMap tests = new HashMap();
|
||||||
final HashMap<String, String> results = new HashMap<String, String>();
|
final HashMap results = new HashMap();
|
||||||
|
|
||||||
InputStream zipStream = StandardTest.class.getResourceAsStream( "/standard-tests.zip" );
|
InputStream zipStream = StandardTest.class.getResourceAsStream( "/standard-tests.zip" );
|
||||||
ZipInputStream testSuiteArchive = new ZipInputStream( zipStream );
|
ZipInputStream testSuiteArchive = new ZipInputStream( zipStream );
|
||||||
@@ -44,9 +45,10 @@ public class StandardTest extends TestCase {
|
|||||||
|
|
||||||
TestSuite suite = new TestSuite();
|
TestSuite suite = new TestSuite();
|
||||||
|
|
||||||
for ( final String test : tests.keySet() ) {
|
for ( Iterator keys = tests.keySet().iterator(); keys.hasNext(); ) {
|
||||||
final Proto code = tests.get( test );
|
String test = (String)keys.next();
|
||||||
final String expectedResult = results.get( test );
|
final Proto code = (Proto)tests.get( test );
|
||||||
|
final String expectedResult = (String)results.get( test );
|
||||||
|
|
||||||
if ( code != null && expectedResult != null ) {
|
if ( code != null && expectedResult != null ) {
|
||||||
suite.addTest( new StandardTest( test, code, expectedResult ) );
|
suite.addTest( new StandardTest( test, code, expectedResult ) );
|
||||||
|
|||||||
Reference in New Issue
Block a user