Closed GoogleCodeExporter closed 8 years ago
Can you give me the exact examples of the error. Code will be nice. I created
some
test for the OctetUtil (attached) but there is no problem found.
Original comment by uuda...@gmail.com
on 30 Oct 2008 at 8:36
package org.jsmpp.util;
import junit.framework.TestCase;
public class OctetItilsTest extends TestCase{
public void testShortEncode() {
assertEquals(0x1D4, OctetUtil.bytesToShort(new byte[] {1, (byte)0xD4}, 0));
}
}
junit.framework.AssertionFailedError: expected:<468> but was:<-44>
at junit.framework.Assert.fail(Assert.java:47)
at junit.framework.Assert.failNotEquals(Assert.java:280)
at junit.framework.Assert.assertEquals(Assert.java:64)
at junit.framework.Assert.assertEquals(Assert.java:198)
at junit.framework.Assert.assertEquals(Assert.java:204)
at org.jsmpp.util.OctetItilsTest.testShortEncode(OctetItilsTest.java:7)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at junit.framework.TestCase.runTest(TestCase.java:164)
at junit.framework.TestCase.runBare(TestCase.java:130)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:120)
at
org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestR
eference.java:130)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner
.java:460)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner
.java:673)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.jav
a:196)
Original comment by igor.sko...@gmail.com
on 30 Oct 2008 at 8:50
A more prominent version:
assertEquals(0x1D4,
OctetUtil.bytesToShort(OctetUtil.shortToBytes((short)0x1D4), 0));
with the same result:
junit.framework.AssertionFailedError: expected:<468> but was:<-44>
Original comment by igor.sko...@gmail.com
on 30 Oct 2008 at 8:59
Thanks a lot Igor. The bug has been fixed. The fixed source has been attached
or you
can get it from the repository.
Original comment by uuda...@gmail.com
on 30 Oct 2008 at 9:05
Attachments:
Thank you!
Original comment by igor.sko...@gmail.com
on 30 Oct 2008 at 9:08
Original issue reported on code.google.com by
igor.sko...@gmail.com
on 30 Oct 2008 at 8:09