RW3270Char..is it working correctly?

Help
Dan Dudley
2008-06-13
2012-10-26
  • Dan Dudley
    Dan Dudley
    2008-06-13

    I am working on a unit test for the RW3270Char class and while I was writing the test for the "setOutlining" method I came a cross if I passing the value the "if" is expecting it does resolve to the right value.

    example:

    * Test *
    character.setOutlining((short) 0x0F);
    assertEquals(RW3270Char.OL_RECTANGLE, character.getOutlining());

    * Test Result
    OL_UNDER = character.getOutlining()

    So is this a legit bug, or am I doing something super silly?

    If it is a legit bug, I'd be more than happy to fix the problem, I just wanted to confirm with you all.

    Thanks,
    b2s

     
    • Jon Strayer
      Jon Strayer
      2008-06-17

      Yep, that's a bug. From the looks of things, setOutlining should look like this:

      protected void setOutlining(short in) {

           outlining = in & 0xof;
      

      }