Thread: [Japi-cvs] SF.net SVN: japi:[860] libs/argparser/trunk/src/tst/test/net/sf/japi/io/ args/converter
Status: Beta
Brought to you by:
christianhujer
|
From: <chr...@us...> - 2009-02-15 02:16:53
|
Revision: 860
http://japi.svn.sourceforge.net/japi/?rev=860&view=rev
Author: christianhujer
Date: 2009-02-15 02:16:50 +0000 (Sun, 15 Feb 2009)
Log Message:
-----------
Fixed Checkstyle issues.
Modified Paths:
--------------
libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/AbstractPrimitiveConverterTest.java
libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/BooleanConverterTest.java
libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/ByteConverterTest.java
libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/CharConverterTest.java
libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/DoubleConverterTest.java
libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/FloatConverterTest.java
libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/IntegerConverterTest.java
libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/LongConverterTest.java
libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/ShortConverterTest.java
Modified: libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/AbstractPrimitiveConverterTest.java
===================================================================
--- libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/AbstractPrimitiveConverterTest.java 2009-02-15 02:14:43 UTC (rev 859)
+++ libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/AbstractPrimitiveConverterTest.java 2009-02-15 02:16:50 UTC (rev 860)
@@ -39,7 +39,7 @@
private final Class<V> targetClass;
/** The converter testling. */
- protected T converter;
+ private T converter;
/** The class of the converter. */
private final Class<T> converterClass;
Modified: libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/BooleanConverterTest.java
===================================================================
--- libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/BooleanConverterTest.java 2009-02-15 02:14:43 UTC (rev 859)
+++ libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/BooleanConverterTest.java 2009-02-15 02:16:50 UTC (rev 860)
@@ -39,7 +39,7 @@
* @see BooleanConverterTest(Class)
*/
@Parameterized.Parameters public static Collection getClasses() {
- return Arrays.asList( new Class[][] {
+ return Arrays.asList(new Class[][] {
{boolean.class},
{Boolean.class}
});
Modified: libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/ByteConverterTest.java
===================================================================
--- libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/ByteConverterTest.java 2009-02-15 02:14:43 UTC (rev 859)
+++ libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/ByteConverterTest.java 2009-02-15 02:16:50 UTC (rev 860)
@@ -38,7 +38,7 @@
* @see ByteConverterTest(Class)
*/
@Parameterized.Parameters public static Collection getClasses() {
- return Arrays.asList( new Class[][] {
+ return Arrays.asList(new Class[][] {
{byte.class},
{Byte.class}
});
Modified: libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/CharConverterTest.java
===================================================================
--- libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/CharConverterTest.java 2009-02-15 02:14:43 UTC (rev 859)
+++ libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/CharConverterTest.java 2009-02-15 02:16:50 UTC (rev 860)
@@ -38,7 +38,7 @@
* @see CharConverterTest(Class)
*/
@Parameterized.Parameters public static Collection getClasses() {
- return Arrays.asList( new Class[][] {
+ return Arrays.asList(new Class[][] {
{char.class},
{Character.class}
});
Modified: libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/DoubleConverterTest.java
===================================================================
--- libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/DoubleConverterTest.java 2009-02-15 02:14:43 UTC (rev 859)
+++ libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/DoubleConverterTest.java 2009-02-15 02:16:50 UTC (rev 860)
@@ -38,7 +38,7 @@
* @see DoubleConverterTest(Class)
*/
@Parameterized.Parameters public static Collection getClasses() {
- return Arrays.asList( new Class[][] {
+ return Arrays.asList(new Class[][] {
{double.class},
{Double.class}
});
Modified: libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/FloatConverterTest.java
===================================================================
--- libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/FloatConverterTest.java 2009-02-15 02:14:43 UTC (rev 859)
+++ libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/FloatConverterTest.java 2009-02-15 02:16:50 UTC (rev 860)
@@ -38,7 +38,7 @@
* @see FloatConverterTest(Class)
*/
@Parameterized.Parameters public static Collection getClasses() {
- return Arrays.asList( new Class[][] {
+ return Arrays.asList(new Class[][] {
{float.class},
{Float.class}
});
Modified: libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/IntegerConverterTest.java
===================================================================
--- libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/IntegerConverterTest.java 2009-02-15 02:14:43 UTC (rev 859)
+++ libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/IntegerConverterTest.java 2009-02-15 02:16:50 UTC (rev 860)
@@ -38,7 +38,7 @@
* @see IntegerConverterTest(Class)
*/
@Parameterized.Parameters public static Collection getClasses() {
- return Arrays.asList( new Class[][] {
+ return Arrays.asList(new Class[][] {
{int.class},
{Integer.class}
});
Modified: libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/LongConverterTest.java
===================================================================
--- libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/LongConverterTest.java 2009-02-15 02:14:43 UTC (rev 859)
+++ libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/LongConverterTest.java 2009-02-15 02:16:50 UTC (rev 860)
@@ -38,7 +38,7 @@
* @see LongConverterTest(Class)
*/
@Parameterized.Parameters public static Collection getClasses() {
- return Arrays.asList( new Class[][] {
+ return Arrays.asList(new Class[][] {
{long.class},
{Long.class}
});
Modified: libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/ShortConverterTest.java
===================================================================
--- libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/ShortConverterTest.java 2009-02-15 02:14:43 UTC (rev 859)
+++ libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/ShortConverterTest.java 2009-02-15 02:16:50 UTC (rev 860)
@@ -38,7 +38,7 @@
* @see ShortConverterTest(Class)
*/
@Parameterized.Parameters public static Collection getClasses() {
- return Arrays.asList( new Class[][] {
+ return Arrays.asList(new Class[][] {
{short.class},
{Short.class}
});
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2009-02-15 11:06:46
|
Revision: 867
http://japi.svn.sourceforge.net/japi/?rev=867&view=rev
Author: christianhujer
Date: 2009-02-15 11:06:41 +0000 (Sun, 15 Feb 2009)
Log Message:
-----------
Fixed incompatible types in assertEquals().
Modified Paths:
--------------
libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/ByteConverterTest.java
libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/DoubleConverterTest.java
libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/FloatConverterTest.java
libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/LongConverterTest.java
libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/ShortConverterTest.java
Modified: libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/ByteConverterTest.java
===================================================================
--- libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/ByteConverterTest.java 2009-02-15 02:54:59 UTC (rev 866)
+++ libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/ByteConverterTest.java 2009-02-15 11:06:41 UTC (rev 867)
@@ -89,9 +89,9 @@
*/
@Test
public void testConvertHexadecimalNumbers() throws Exception {
- Assert.assertEquals(0x50, getConverter().convert("0x50"));
- Assert.assertEquals(0x50, getConverter().convert("0X50"));
- Assert.assertEquals(0x50, getConverter().convert("#50"));
+ Assert.assertEquals((byte) 0x50, getConverter().convert("0x50"));
+ Assert.assertEquals((byte) 0x50, getConverter().convert("0X50"));
+ Assert.assertEquals((byte) 0x50, getConverter().convert("#50"));
}
/**
@@ -100,7 +100,7 @@
*/
@Test
public void testConvertOctalNumbers() throws Exception {
- Assert.assertEquals(0xf, getConverter().convert("017"));
+ Assert.assertEquals((byte) 0xf, (byte) getConverter().convert("017"));
}
} // class ByteConverterTest
Modified: libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/DoubleConverterTest.java
===================================================================
--- libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/DoubleConverterTest.java 2009-02-15 02:54:59 UTC (rev 866)
+++ libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/DoubleConverterTest.java 2009-02-15 11:06:41 UTC (rev 867)
@@ -89,7 +89,7 @@
*/
@Test
public void testConvertHexadecimalNumbers() throws Exception {
- Assert.assertEquals(50000, getConverter().convert("50000.0"));
+ Assert.assertEquals(50000.0, getConverter().convert("50000.0"));
}
/**
@@ -98,7 +98,7 @@
*/
@Test
public void testConvertOctalNumbers() throws Exception {
- Assert.assertEquals(777, getConverter().convert("0777"));
+ Assert.assertEquals(777.0, getConverter().convert("0777"));
}
} // class DoubleConverterTest
Modified: libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/FloatConverterTest.java
===================================================================
--- libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/FloatConverterTest.java 2009-02-15 02:54:59 UTC (rev 866)
+++ libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/FloatConverterTest.java 2009-02-15 11:06:41 UTC (rev 867)
@@ -89,7 +89,7 @@
*/
@Test
public void testConvertHexadecimalNumbers() throws Exception {
- Assert.assertEquals(50000, getConverter().convert("50000.0"));
+ Assert.assertEquals(50000.0f, getConverter().convert("50000.0"));
}
/**
@@ -98,7 +98,7 @@
*/
@Test
public void testConvertOctalNumbers() throws Exception {
- Assert.assertEquals(777, getConverter().convert("0777"));
+ Assert.assertEquals(777.0f, getConverter().convert("0777"));
}
} // class FloatConverterTest
Modified: libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/LongConverterTest.java
===================================================================
--- libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/LongConverterTest.java 2009-02-15 02:54:59 UTC (rev 866)
+++ libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/LongConverterTest.java 2009-02-15 11:06:41 UTC (rev 867)
@@ -89,9 +89,9 @@
*/
@Test
public void testConvertHexadecimalNumbers() throws Exception {
- Assert.assertEquals(0x50000, getConverter().convert("0x50000"));
- Assert.assertEquals(0x50000, getConverter().convert("0X50000"));
- Assert.assertEquals(0x50000, getConverter().convert("#50000"));
+ Assert.assertEquals(0x50000L, getConverter().convert("0x50000"));
+ Assert.assertEquals(0x50000L, getConverter().convert("0X50000"));
+ Assert.assertEquals(0x50000L, getConverter().convert("#50000"));
}
/**
@@ -100,7 +100,7 @@
*/
@Test
public void testConvertOctalNumbers() throws Exception {
- Assert.assertEquals(0x1ff, getConverter().convert("0777"));
+ Assert.assertEquals(0x1ffL, getConverter().convert("0777"));
}
} // class LongConverterTest
Modified: libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/ShortConverterTest.java
===================================================================
--- libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/ShortConverterTest.java 2009-02-15 02:54:59 UTC (rev 866)
+++ libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/ShortConverterTest.java 2009-02-15 11:06:41 UTC (rev 867)
@@ -89,9 +89,9 @@
*/
@Test
public void testConvertHexadecimalNumbers() throws Exception {
- Assert.assertEquals(0x5000, getConverter().convert("0x5000"));
- Assert.assertEquals(0x5000, getConverter().convert("0X5000"));
- Assert.assertEquals(0x5000, getConverter().convert("#5000"));
+ Assert.assertEquals((short) 0x5000, getConverter().convert("0x5000"));
+ Assert.assertEquals((short) 0x5000, getConverter().convert("0X5000"));
+ Assert.assertEquals((short) 0x5000, getConverter().convert("#5000"));
}
/**
@@ -100,7 +100,7 @@
*/
@Test
public void testConvertOctalNumbers() throws Exception {
- Assert.assertEquals(0x1ff, getConverter().convert("0777"));
+ Assert.assertEquals((short) 0x1ff, getConverter().convert("0777"));
}
} // class ShortConverterTest
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2009-02-21 18:25:25
|
Revision: 1004
http://japi.svn.sourceforge.net/japi/?rev=1004&view=rev
Author: christianhujer
Date: 2009-02-21 18:25:15 +0000 (Sat, 21 Feb 2009)
Log Message:
-----------
Added unit tests to bring unit test coverage for ArgParser to 100% class, method and line coverage.
Added Paths:
-----------
libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/InputStreamConverterTest.java
libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/LogLevelConverterTest.java
libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/OutputStreamConverterTest.java
Added: libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/InputStreamConverterTest.java
===================================================================
--- libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/InputStreamConverterTest.java (rev 0)
+++ libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/InputStreamConverterTest.java 2009-02-21 18:25:15 UTC (rev 1004)
@@ -0,0 +1,65 @@
+/*
+ * Copyright (C) 2009 Christian Hujer.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package test.net.sf.japi.io.args.converter;
+
+import java.io.InputStream;
+import junit.framework.Assert;
+import net.sf.japi.io.args.converter.InputStreamConverter;
+import org.junit.Test;
+
+/**
+ * Unit test for {@link InputStreamConverter}.
+ *
+ * @author <a href="mailto:ch...@ri...">Christian Hujer</a>.
+ */
+public class InputStreamConverterTest {
+
+ /** Tests that {@link InputStreamConverter#convert(String)} works with "-".
+ * @throws Exception (unexpected).
+ */
+ @Test
+ public void testStdin() throws Exception {
+ final InputStreamConverter testling = new InputStreamConverter();
+ Assert.assertEquals("Conversion of \"-\" must return System.in.", System.in, testling.convert("-"));
+ }
+
+ /** Tests that {@link InputStreamConverter#convert(String)} works with a URL.
+ * @throws Exception (unexpected).
+ */
+ @Test
+ public void testUrl() throws Exception {
+ final InputStreamConverter testling = new InputStreamConverter();
+ // TODO:2009-02-21:christianhujer:Choose a better resource.
+ final InputStream in = testling.convert("http://www.w3.org/");
+ Assert.assertNotNull("Expecting InputStream.", in);
+ // TODO:2009-02-21:christianhujer:Verify resource contents.
+ }
+
+ /** Tests that {@link InputStreamConverter#convert(String)} works with a filename.
+ * @throws Exception (unexpected).
+ */
+ @Test
+ public void testFile() throws Exception {
+ final InputStreamConverter testling = new InputStreamConverter();
+ // TODO:2009-02-21:christianhujer:Choose a better file.
+ final InputStream in = testling.convert(".svn/entries");
+ Assert.assertNotNull("Expecting InputStream.", in);
+ // TODO:2009-02-21:christianhujer:Verify file contents.
+ }
+}
Property changes on: libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/InputStreamConverterTest.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:eol-style
+ LF
Added: libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/LogLevelConverterTest.java
===================================================================
--- libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/LogLevelConverterTest.java (rev 0)
+++ libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/LogLevelConverterTest.java 2009-02-21 18:25:15 UTC (rev 1004)
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2009 Christian Hujer.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package test.net.sf.japi.io.args.converter;
+
+import java.util.logging.Level;
+import junit.framework.Assert;
+import net.sf.japi.io.args.converter.LogLevelConverter;
+import org.junit.Test;
+
+/**
+ * Unit test for {@link LogLevelConverter}.
+ * @author <a href="mailto:ch...@ri...">Christian Hujer</a>
+ */
+public class LogLevelConverterTest {
+
+ /** Tests that {@link LogLevelConverter#convert(String)} works.
+ * @throws Exception (unexpected).
+ */
+ @Test
+ public void testConvert() throws Exception {
+ final LogLevelConverter testling = new LogLevelConverter();
+ final Level logLevel = testling.convert("FINEST");
+ Assert.assertEquals("Expecting \"FINEST\"", Level.FINEST, logLevel);
+ }
+}
Property changes on: libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/LogLevelConverterTest.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:eol-style
+ LF
Added: libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/OutputStreamConverterTest.java
===================================================================
--- libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/OutputStreamConverterTest.java (rev 0)
+++ libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/OutputStreamConverterTest.java 2009-02-21 18:25:15 UTC (rev 1004)
@@ -0,0 +1,53 @@
+/*
+ * Copyright (C) 2009 Christian Hujer.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package test.net.sf.japi.io.args.converter;
+
+import java.io.OutputStream;
+import junit.framework.Assert;
+import net.sf.japi.io.args.converter.OutputStreamConverter;
+import org.junit.Test;
+
+/**
+ * Unit test for {@link OutputStreamConverter}.
+ * @author <a href="mailto:ch...@ri...">Christian Hujer</a>
+ */
+public class OutputStreamConverterTest {
+
+ /** Tests that {@link OutputStreamConverter#convert(String)} works with "-".
+ * @throws Exception (unexpected).
+ */
+ @Test
+ public void testStdin() throws Exception {
+ final OutputStreamConverter testling = new OutputStreamConverter();
+ Assert.assertEquals("Conversion of \"-\" must return System.out.", System.out, testling.convert("-"));
+ }
+
+ /** Tests that {@link OutputStreamConverter#convert(String)} works with a filename.
+ * @throws Exception (unexpected).
+ */
+ @Test
+ public void testFile() throws Exception {
+ final OutputStreamConverter testling = new OutputStreamConverter();
+ // TODO:2009-02-21:christianhujer:Choose a better file.
+ final OutputStream in = testling.convert("foo.txt");
+ Assert.assertNotNull("Expecting OutputStream.", in);
+ // TODO:2009-02-21:christianhujer:Write to file then verify file contents.
+ }
+
+}
Property changes on: libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/OutputStreamConverterTest.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:eol-style
+ LF
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2009-02-23 21:15:31
|
Revision: 1160
http://japi.svn.sourceforge.net/japi/?rev=1160&view=rev
Author: christianhujer
Date: 2009-02-23 21:15:26 +0000 (Mon, 23 Feb 2009)
Log Message:
-----------
Fixed issues that were introduced by JUnit upgrade.
Modified Paths:
--------------
libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/ByteConverterTest.java
libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/CharConverterTest.java
libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/DoubleConverterTest.java
libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/FloatConverterTest.java
libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/IntegerConverterTest.java
libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/LongConverterTest.java
libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/ShortConverterTest.java
Modified: libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/ByteConverterTest.java
===================================================================
--- libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/ByteConverterTest.java 2009-02-23 20:56:22 UTC (rev 1159)
+++ libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/ByteConverterTest.java 2009-02-23 21:15:26 UTC (rev 1160)
@@ -79,7 +79,7 @@
@Test
public void testConvertDecimalNumbers() throws Exception {
for (final byte number : new byte[] { Byte.MIN_VALUE, -100, -1, 0, 1, 100, Byte.MAX_VALUE }) {
- Assert.assertEquals(number, getConverter().convert(Byte.toString(number)));
+ Assert.assertEquals(number, (byte) getConverter().convert(Byte.toString(number)));
}
}
@@ -89,9 +89,9 @@
*/
@Test
public void testConvertHexadecimalNumbers() throws Exception {
- Assert.assertEquals((byte) 0x50, getConverter().convert("0x50"));
- Assert.assertEquals((byte) 0x50, getConverter().convert("0X50"));
- Assert.assertEquals((byte) 0x50, getConverter().convert("#50"));
+ Assert.assertEquals((byte) 0x50, (byte) getConverter().convert("0x50"));
+ Assert.assertEquals((byte) 0x50, (byte) getConverter().convert("0X50"));
+ Assert.assertEquals((byte) 0x50, (byte) getConverter().convert("#50"));
}
/**
Modified: libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/CharConverterTest.java
===================================================================
--- libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/CharConverterTest.java 2009-02-23 20:56:22 UTC (rev 1159)
+++ libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/CharConverterTest.java 2009-02-23 21:15:26 UTC (rev 1160)
@@ -79,7 +79,7 @@
@Test
public void testConvertDecimalNumbers() throws Exception {
for (final char number : new char[] { Character.MIN_VALUE, (char) -100, (char) -1, 0, 1, 100, Character.MAX_VALUE }) {
- Assert.assertEquals(number, getConverter().convert(Character.toString(number)));
+ Assert.assertEquals(number, (char) getConverter().convert(Character.toString(number)));
}
}
@@ -89,9 +89,9 @@
*/
@Test
public void testConvertHexadecimalNumbers() throws Exception {
- Assert.assertEquals(' ', getConverter().convert(" "));
- Assert.assertEquals('$', getConverter().convert("$"));
- Assert.assertEquals('A', getConverter().convert("A"));
+ Assert.assertEquals(' ', (char) getConverter().convert(" "));
+ Assert.assertEquals('$', (char) getConverter().convert("$"));
+ Assert.assertEquals('A', (char) getConverter().convert("A"));
}
/**
@@ -100,7 +100,7 @@
*/
@Test
public void testConvertOctalNumbers() throws Exception {
- Assert.assertEquals('b', getConverter().convert("b"));
+ Assert.assertEquals('b', (char) getConverter().convert("b"));
}
} // class CharConverterTest
Modified: libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/DoubleConverterTest.java
===================================================================
--- libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/DoubleConverterTest.java 2009-02-23 20:56:22 UTC (rev 1159)
+++ libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/DoubleConverterTest.java 2009-02-23 21:15:26 UTC (rev 1160)
@@ -79,7 +79,7 @@
@Test
public void testConvertDecimalNumbers() throws Exception {
for (final double number : new double[] { Double.MIN_VALUE, -100, -1, 0, 1, 100, Double.MAX_VALUE }) {
- Assert.assertEquals(number, getConverter().convert(Double.toString(number)));
+ Assert.assertEquals((Double) number, getConverter().convert(Double.toString(number)));
}
}
@@ -89,7 +89,7 @@
*/
@Test
public void testConvertHexadecimalNumbers() throws Exception {
- Assert.assertEquals(50000.0, getConverter().convert("50000.0"));
+ Assert.assertEquals((Double) 50000.0, getConverter().convert("50000.0"));
}
/**
@@ -98,7 +98,7 @@
*/
@Test
public void testConvertOctalNumbers() throws Exception {
- Assert.assertEquals(777.0, getConverter().convert("0777"));
+ Assert.assertEquals((Double) 777.0, getConverter().convert("0777"));
}
} // class DoubleConverterTest
Modified: libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/FloatConverterTest.java
===================================================================
--- libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/FloatConverterTest.java 2009-02-23 20:56:22 UTC (rev 1159)
+++ libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/FloatConverterTest.java 2009-02-23 21:15:26 UTC (rev 1160)
@@ -79,7 +79,7 @@
@Test
public void testConvertDecimalNumbers() throws Exception {
for (final float number : new float[] { Float.MIN_VALUE, -100, -1, 0, 1, 100, Float.MAX_VALUE }) {
- Assert.assertEquals(number, getConverter().convert(Float.toString(number)));
+ Assert.assertEquals((Float) number, getConverter().convert(Float.toString(number)));
}
}
@@ -89,7 +89,7 @@
*/
@Test
public void testConvertHexadecimalNumbers() throws Exception {
- Assert.assertEquals(50000.0f, getConverter().convert("50000.0"));
+ Assert.assertEquals((Float) 50000.0f, getConverter().convert("50000.0"));
}
/**
@@ -98,7 +98,7 @@
*/
@Test
public void testConvertOctalNumbers() throws Exception {
- Assert.assertEquals(777.0f, getConverter().convert("0777"));
+ Assert.assertEquals((Float) 777.0f, getConverter().convert("0777"));
}
} // class FloatConverterTest
Modified: libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/IntegerConverterTest.java
===================================================================
--- libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/IntegerConverterTest.java 2009-02-23 20:56:22 UTC (rev 1159)
+++ libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/IntegerConverterTest.java 2009-02-23 21:15:26 UTC (rev 1160)
@@ -79,7 +79,7 @@
@Test
public void testConvertDecimalNumbers() throws Exception {
for (final int number : new int[] { Integer.MIN_VALUE, -100, -1, 0, 1, 100, Integer.MAX_VALUE }) {
- Assert.assertEquals(number, getConverter().convert(Integer.toString(number)));
+ Assert.assertEquals(number, (int) getConverter().convert(Integer.toString(number)));
}
}
@@ -89,9 +89,9 @@
*/
@Test
public void testConvertHexadecimalNumbers() throws Exception {
- Assert.assertEquals(0x50000, getConverter().convert("0x50000"));
- Assert.assertEquals(0x50000, getConverter().convert("0X50000"));
- Assert.assertEquals(0x50000, getConverter().convert("#50000"));
+ Assert.assertEquals(0x50000, (int) getConverter().convert("0x50000"));
+ Assert.assertEquals(0x50000, (int) getConverter().convert("0X50000"));
+ Assert.assertEquals(0x50000, (int) getConverter().convert("#50000"));
}
/**
@@ -100,7 +100,7 @@
*/
@Test
public void testConvertOctalNumbers() throws Exception {
- Assert.assertEquals(0x1ff, getConverter().convert("0777"));
+ Assert.assertEquals(0x1ff, (int) getConverter().convert("0777"));
}
} // class IntegerConverterTest
Modified: libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/LongConverterTest.java
===================================================================
--- libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/LongConverterTest.java 2009-02-23 20:56:22 UTC (rev 1159)
+++ libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/LongConverterTest.java 2009-02-23 21:15:26 UTC (rev 1160)
@@ -79,7 +79,7 @@
@Test
public void testConvertDecimalNumbers() throws Exception {
for (final long number : new long[] { Long.MIN_VALUE, -100, -1, 0, 1, 100, Long.MAX_VALUE }) {
- Assert.assertEquals(number, getConverter().convert(Long.toString(number)));
+ Assert.assertEquals(number, (long) getConverter().convert(Long.toString(number)));
}
}
@@ -89,9 +89,9 @@
*/
@Test
public void testConvertHexadecimalNumbers() throws Exception {
- Assert.assertEquals(0x50000L, getConverter().convert("0x50000"));
- Assert.assertEquals(0x50000L, getConverter().convert("0X50000"));
- Assert.assertEquals(0x50000L, getConverter().convert("#50000"));
+ Assert.assertEquals(0x50000L, (long) getConverter().convert("0x50000"));
+ Assert.assertEquals(0x50000L, (long) getConverter().convert("0X50000"));
+ Assert.assertEquals(0x50000L, (long) getConverter().convert("#50000"));
}
/**
@@ -100,7 +100,7 @@
*/
@Test
public void testConvertOctalNumbers() throws Exception {
- Assert.assertEquals(0x1ffL, getConverter().convert("0777"));
+ Assert.assertEquals(0x1ffL, (long) getConverter().convert("0777"));
}
} // class LongConverterTest
Modified: libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/ShortConverterTest.java
===================================================================
--- libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/ShortConverterTest.java 2009-02-23 20:56:22 UTC (rev 1159)
+++ libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/ShortConverterTest.java 2009-02-23 21:15:26 UTC (rev 1160)
@@ -79,7 +79,7 @@
@Test
public void testConvertDecimalNumbers() throws Exception {
for (final short number : new short[] { Short.MIN_VALUE, -100, -1, 0, 1, 100, Short.MAX_VALUE }) {
- Assert.assertEquals(number, getConverter().convert(Short.toString(number)));
+ Assert.assertEquals(number, (short) getConverter().convert(Short.toString(number)));
}
}
@@ -89,9 +89,9 @@
*/
@Test
public void testConvertHexadecimalNumbers() throws Exception {
- Assert.assertEquals((short) 0x5000, getConverter().convert("0x5000"));
- Assert.assertEquals((short) 0x5000, getConverter().convert("0X5000"));
- Assert.assertEquals((short) 0x5000, getConverter().convert("#5000"));
+ Assert.assertEquals((short) 0x5000, (short) getConverter().convert("0x5000"));
+ Assert.assertEquals((short) 0x5000, (short) getConverter().convert("0X5000"));
+ Assert.assertEquals((short) 0x5000, (short) getConverter().convert("#5000"));
}
/**
@@ -100,7 +100,7 @@
*/
@Test
public void testConvertOctalNumbers() throws Exception {
- Assert.assertEquals((short) 0x1ff, getConverter().convert("0777"));
+ Assert.assertEquals((short) 0x1ff, (short) getConverter().convert("0777"));
}
} // class ShortConverterTest
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|