jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
Signup
Preon
  • Preon
  • PREON-10

Error reporting

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Improvement Improvement
  • Status: Reopened Reopened
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Environment:
    1.1 SNAPSHOT
  • Testcase included:
    yes
  • Number of attachments :
    0

Description

public class TestPreonTestCases extends TestCase {

// Minus signs are not well interpreted. Workaround - compound expression i.e. -1 = 0-1
public void testLimboMinusSign()

{ Codec<Test1> codec = Codecs.create(Test1.class); }

// Underscores are not well interpreted in @If. No DecodingException is thrown and the expression is evaluated to false;
public void testLimboUnderscore() throws DecodingException {
Codec<Test2> codec = Codecs.create(Test2.class);
Test2 instance = Codecs.decode(codec, new byte[]

{0x1, 'A', 'B', 'C', 'D'}

);
assert instance.next == 'A';
assert instance.description != null;
}

private static class Test1

{ @BoundNumber(match = "-1") private short magic; }

public static class Test2

{ @Bound private byte LONG_DESCRIPTION; @If(value = "LONG_DESCRIPTION == 1") @BoundString private String description; @Bound private byte next; }

}

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Wilfred Springer added a comment - 05/Aug/10 4:10 AM

Good catch. The problem is located in Limbo, the expression parser. That one, quite frankly, isn't the best code in the world. (I'm starting to dislike ANTLR more every day.) I will try to see what I can do to fix is and release a new version. One of the things I want to do is bring Limbo back under the Preon project, since it really is the only project using it. That will make it a little easier to get an integrated version.

Show
Wilfred Springer added a comment - 05/Aug/10 4:10 AM Good catch. The problem is located in Limbo, the expression parser. That one, quite frankly, isn't the best code in the world. (I'm starting to dislike ANTLR more every day.) I will try to see what I can do to fix is and release a new version. One of the things I want to do is bring Limbo back under the Preon project, since it really is the only project using it. That will make it a little easier to get an integrated version.
Wilfred Springer made changes - 05/Aug/10 4:10 AM
Field Original Value New Value
Assignee Wilfred Springer [ wilfred ]
Wilfred Springer made changes - 08/Aug/10 8:14 AM
Status Open [ 1 ] In Progress [ 3 ]
Wilfred Springer made changes - 08/Aug/10 8:24 AM
Status In Progress [ 3 ] Closed [ 6 ]
Resolution Fixed [ 1 ]
Hide
Permalink
Nir Asis added a comment - 21/Feb/11 9:43 AM

The issue was only partially fixed (1/2).
The testLimboMinusSign() still fails on latest Preon snapshot
It will be nice to have it fixed too.

Show
Nir Asis added a comment - 21/Feb/11 9:43 AM The issue was only partially fixed (1/2). The testLimboMinusSign() still fails on latest Preon snapshot It will be nice to have it fixed too.
Nir Asis made changes - 21/Feb/11 9:43 AM
Resolution Fixed [ 1 ]
Status Closed [ 6 ] Reopened [ 4 ]

People

  • Assignee:
    Wilfred Springer
    Reporter:
    Nir Asis
Vote (0)
Watch (0)

Dates

  • Created:
    27/May/10 6:18 AM
    Updated:
    21/Feb/11 9:43 AM
  • Atlassian JIRA (v5.2.7#850-sha1:b2af0c8)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.