Skip to content

Commit 68040cf

Browse files
committed
update Java version
1 parent a703439 commit 68040cf

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/test/java/com/upokecenter/test/CBORObjectTest.java

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2293,14 +2293,15 @@ public void TestReadSequence() {
22932293

22942294
@Test
22952295
public void TestEncodeFloat64() {
2296+
try {
22962297
RandomGenerator rg = new RandomGenerator();
22972298
CBOREncodeOptions options = new CBOREncodeOptions("float64=true");
22982299
for (int i = 0; i < 10000; ++i) {
22992300
double dbl = 0.0;
23002301
dbl = (i == 0) ? Double.POSITIVE_INFINITY : ((i == 1) ?
2301-
(Double.NEGATIVE_INFINITY) : (RandomObjects.RandomDouble(rg)));
2302-
CBORObject cbor = CBORObject.FromObject(dbl); byte[] bytes =
2303-
cbor.EncodeToBytes(options);
2302+
Double.NEGATIVE_INFINITY : RandomObjects.RandomDouble(rg));
2303+
CBORObject cbor = CBORObject.FromObject(dbl);
2304+
byte[] bytes = cbor.EncodeToBytes(options);
23042305
Assert.assertEquals(9, bytes.length);
23052306
TestCommon.AssertEqualsHashCode(
23062307
cbor,
@@ -2409,6 +2410,10 @@ public void TestEncodeFloat64() {
24092410
}
24102411
}
24112412
}
2413+
} catch (IOException ex) {
2414+
Assert.fail(ex.toString());
2415+
throw new IllegalStateException("", ex);
2416+
}
24122417
}
24132418

24142419
@Test

0 commit comments

Comments
 (0)