Code Monkey home page Code Monkey logo

Comments (5)

GoogleCodeExporter avatar GoogleCodeExporter commented on July 19, 2024
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 [email protected] on 30 Oct 2008 at 8:36

  • Changed state: Started

from jsmpp.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 19, 2024
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 [email protected] on 30 Oct 2008 at 8:50

from jsmpp.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 19, 2024
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 [email protected] on 30 Oct 2008 at 8:59

from jsmpp.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 19, 2024
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 [email protected] on 30 Oct 2008 at 9:05

  • Changed state: Fixed

Attachments:

from jsmpp.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 19, 2024
Thank you!

Original comment by [email protected] on 30 Oct 2008 at 9:08

from jsmpp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.