diff --git a/pom.xml b/pom.xml index 1beaf906..e4782e2c 100644 --- a/pom.xml +++ b/pom.xml @@ -10,4 +10,13 @@ luaj + + + + junit + junit + 3.8.1 + test + + diff --git a/src/test/java/lua/StandardTest.java b/src/test/java/lua/StandardTest.java index b364186c..7bcb2096 100644 --- a/src/test/java/lua/StandardTest.java +++ b/src/test/java/lua/StandardTest.java @@ -5,6 +5,7 @@ import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.util.HashMap; +import java.util.Iterator; import java.util.zip.ZipEntry; import java.util.zip.ZipInputStream; @@ -23,8 +24,8 @@ public class StandardTest extends TestCase { public static Test suite() throws IOException { ZipEntry file; - final HashMap tests = new HashMap(); - final HashMap results = new HashMap(); + final HashMap tests = new HashMap(); + final HashMap results = new HashMap(); InputStream zipStream = StandardTest.class.getResourceAsStream( "/standard-tests.zip" ); ZipInputStream testSuiteArchive = new ZipInputStream( zipStream ); @@ -44,9 +45,10 @@ public class StandardTest extends TestCase { TestSuite suite = new TestSuite(); - for ( final String test : tests.keySet() ) { - final Proto code = tests.get( test ); - final String expectedResult = results.get( test ); + for ( Iterator keys = tests.keySet().iterator(); keys.hasNext(); ) { + String test = (String)keys.next(); + final Proto code = (Proto)tests.get( test ); + final String expectedResult = (String)results.get( test ); if ( code != null && expectedResult != null ) { suite.addTest( new StandardTest( test, code, expectedResult ) );