Hi Justin.

Ok ... if the max value is outside the bounds and the code should have thrown 
an error, then I apologize.
I just saw that the value being passed in was the same as the max allowed upper 
bound and thought the test was wrong.

Sorry for double breaking __

Maybe Sebastian can have a look at this.

But if you find something like this, wouldn't it be better to fix the broken 
code or at least leave a comment in the test that is guaranteed to break?

Chris


Am 21.02.18, 22:30 schrieb "Justin Mclean" <jus...@classsoftware.com>:

    Hi,
    
    Perhaps my email wasn’t clear. The error is not in the test the error is in 
the code the test was showing that. :-)
    
    Thanks,
    Justin
    
    > On 22 Feb 2018, at 1:55 am, cd...@apache.org wrote:
    > 
    > This is an automated email from the ASF dual-hosted git repository.
    > 
    > cdutz pushed a commit to branch master
    > in repository https://gitbox.apache.org/repos/asf/incubator-plc4x.git
    > 
    > 
    > The following commit(s) were added to refs/heads/master by this push:
    >     new 418677d  Fix the ByteValueTest
    > 418677d is described below
    > 
    > commit 418677dc4ae9d9fb25c7f249587d07711578fc26
    > Author: Christofer Dutz <christofer.d...@c-ware.de>
    > AuthorDate: Wed Feb 21 15:55:09 2018 +0100
    > 
    >    Fix the ByteValueTest
    > ---
    > .../src/test/java/org/apache/plc4x/java/ads/api/util/ByteValueTest.java | 
2 +-
    > 1 file changed, 1 insertion(+), 1 deletion(-)
    > 
    > diff --git 
a/plc4j/protocols/ads/src/test/java/org/apache/plc4x/java/ads/api/util/ByteValueTest.java
 
b/plc4j/protocols/ads/src/test/java/org/apache/plc4x/java/ads/api/util/ByteValueTest.java
    > index 3a8b7b8..16abdf3 100644
    > --- 
a/plc4j/protocols/ads/src/test/java/org/apache/plc4x/java/ads/api/util/ByteValueTest.java
    > +++ 
b/plc4j/protocols/ads/src/test/java/org/apache/plc4x/java/ads/api/util/ByteValueTest.java
    > @@ -65,7 +65,7 @@ public class ByteValueTest {
    > 
    >     @Test(expected = IllegalArgumentException.class)
    >     public void checkUnsignedBoundsBigTooBig() {
    > -        ByteValue.checkUnsignedBounds(new 
BigInteger(Long.toString(upperBound)), 4);
    > +        ByteValue.checkUnsignedBounds(new 
BigInteger(Long.toString(upperBound)).add(BigInteger.ONE), 4);
    >     }
    > 
    >     @Test
    > 
    > -- 
    > To stop receiving notification emails like this one, please contact
    > cd...@apache.org.
    
    

Reply via email to