Skip to content

Commit 8ad557c

Browse files
committed
update Java version
1 parent ed43ef4 commit 8ad557c

File tree

10 files changed

+337
-337
lines changed

10 files changed

+337
-337
lines changed

src/test/java/com/upokecenter/test/BEncodingTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public static void DoTestString(String value) {
5858
Assert.assertEquals(b, newb);
5959
}
6060

61-
@Test
61+
@Test(timeout = 30000)
6262
public void TestLong() {
6363
DoTestLong(0);
6464
DoTestLong(-1);
@@ -68,7 +68,7 @@ public void TestLong() {
6868
DoTestLong(Long.MAX_VALUE);
6969
}
7070

71-
@Test
71+
@Test(timeout = 30000)
7272
public void TestList() {
7373
CBORObject beo = CBORObject.NewArray();
7474
beo.Add(ToObjectTest.TestToFromObjectRoundTrip(1));
@@ -109,7 +109,7 @@ public void TestList() {
109109
}
110110
}
111111

112-
@Test
112+
@Test(timeout = 30000)
113113
public void TestDictionary() {
114114
CBORObject beo = CBORObject.NewMap();
115115
beo.set("zero",ToObjectTest.TestToFromObjectRoundTrip(1));
@@ -150,7 +150,7 @@ public void TestDictionary() {
150150
}
151151
}
152152

153-
@Test
153+
@Test(timeout = 30000)
154154
public void TestString() {
155155
DoTestString("");
156156
DoTestString(" ");

src/test/java/com/upokecenter/test/CBORDataUtilitiesTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ private static void AssertNegative(CBORObject obj) {
1313
CBORTestCommon.AssertRoundTrip(obj);
1414
}
1515

16-
@Test
16+
@Test(timeout = 30000)
1717
public void TestPreserveNegativeZero() {
1818
CBORObject cbor;
1919
JSONOptions pnz = new JSONOptions("numberconversion=full;preservenegativezero=true");
@@ -82,7 +82,7 @@ public void TestPreserveNegativeZero() {
8282
}
8383

8484
// testing obsolete method
85-
@Test
85+
@Test(timeout = 30000)
8686
public void TestParseJSONNumberSubstring() {
8787
String tstr =
8888

@@ -99,7 +99,7 @@ public void TestParseJSONNumberSubstring() {
9999
}
100100
}
101101

102-
@Test
102+
@Test(timeout = 30000)
103103
public void TestParseJSONNumberNegativeZero() {
104104
String[] strings = new String[] {
105105
"-0", "0", "-0E+0", "0", "-0E-0", "0", "-0E-1", "0.0",
@@ -151,7 +151,7 @@ public void TestParseJSONNumberNegativeZero() {
151151
"23.", "23.e-2", "23.e0", "23.e1", "0.",
152152
};
153153

154-
@Test
154+
@Test(timeout = 30000)
155155
public void TestParseJSONNumber() {
156156
for (String str : BadJsonNumbers) {
157157
if (CBORDataUtilities.ParseJSONNumber(str) != null) {

src/test/java/com/upokecenter/test/CBORExceptionTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import com.upokecenter.cbor.*;
66

77
public class CBORExceptionTest {
8-
@Test
8+
@Test(timeout = 30000)
99
public void TestConstructor() {
1010
try {
1111
throw new CBORException("Test exception");

src/test/java/com/upokecenter/test/CBORNumberTest.java

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ private static CBORNumber ToCN(Object o) {
1111
return ToObjectTest.TestToFromObjectRoundTrip(o).AsNumber();
1212
}
1313

14-
@Test
14+
@Test(timeout = 30000)
1515
public void TestAbs() {
1616
TestCommon.CompareTestEqual(
1717
ToCN(2),
@@ -40,27 +40,27 @@ public void TestAbs() {
4040
}
4141
}
4242

43-
@Test
43+
@Test(timeout = 30000)
4444
public void TestToCBORObject() {
4545
// not implemented yet
4646
}
4747

48-
@Test
48+
@Test(timeout = 30000)
4949
public void TestFromCBORObject() {
5050
// not implemented yet
5151
}
5252

53-
@Test
53+
@Test(timeout = 30000)
5454
public void TestToString() {
5555
// not implemented yet
5656
}
5757

58-
@Test
58+
@Test(timeout = 30000)
5959
public void TestCanFitInInt32() {
6060
// not implemented yet
6161
}
6262

63-
@Test
63+
@Test(timeout = 30000)
6464
public void TestCanFitInInt64() {
6565
if (!(CBORObject.FromInt32(0).AsNumber().CanFitInInt64())) {
6666
Assert.fail();
@@ -79,7 +79,7 @@ public void TestCanFitInInt64() {
7979
}
8080
}
8181

82-
@Test
82+
@Test(timeout = 30000)
8383
public void TestCanFitInUInt64() {
8484
if (!(CBORObject.FromInt32(0).AsNumber().CanFitInUInt64())) {
8585
Assert.fail("0");
@@ -148,7 +148,7 @@ public void TestCanFitInUInt64() {
148148
}
149149
}
150150

151-
@Test
151+
@Test(timeout = 30000)
152152
public void TestCanTruncatedIntFitInUInt64() {
153153
if (!(
154154
CBORObject.FromInt32(0).AsNumber().CanTruncatedIntFitInUInt64())) {
@@ -218,7 +218,7 @@ public void TestCanTruncatedIntFitInUInt64() {
218218
}
219219
}
220220

221-
@Test
221+
@Test(timeout = 30000)
222222
public void TestIsInfinity() {
223223
if (CBORObject.FromInt32(0).AsNumber().IsInfinity()) {
224224
Assert.fail();
@@ -237,7 +237,7 @@ public void TestIsInfinity() {
237237
}
238238
}
239239

240-
@Test
240+
@Test(timeout = 30000)
241241
public void TestIsNaN() {
242242
if (CBORObject.FromInt32(0).AsNumber().IsNaN()) {
243243
Assert.fail();
@@ -260,17 +260,17 @@ public void TestIsNaN() {
260260
}
261261
}
262262

263-
@Test
263+
@Test(timeout = 30000)
264264
public void TestNegate() {
265265
// not implemented yet
266266
}
267267

268-
@Test
268+
@Test(timeout = 30000)
269269
public void TestAdd() {
270270
// not implemented yet
271271
}
272272

273-
@Test
273+
@Test(timeout = 30000)
274274
public void TestSubtract() {
275275
// not implemented yet
276276
}
@@ -279,7 +279,7 @@ private static EDecimal AsED(CBORObject obj) {
279279
return (EDecimal)obj.ToObject(EDecimal.class);
280280
}
281281

282-
@Test
282+
@Test(timeout = 30000)
283283
public void TestMultiply() {
284284
try {
285285
ToCN(2).Multiply(null);
@@ -308,7 +308,7 @@ public void TestMultiply() {
308308
}
309309
}
310310

311-
@Test
311+
@Test(timeout = 30000)
312312
public void TestDivide() {
313313
try {
314314
ToCN(2).Divide(null);
@@ -321,7 +321,7 @@ public void TestDivide() {
321321
}
322322
}
323323

324-
@Test
324+
@Test(timeout = 30000)
325325
public void TestRemainder() {
326326
try {
327327
ToCN(2).Remainder(null);
@@ -334,37 +334,37 @@ public void TestRemainder() {
334334
}
335335
}
336336

337-
@Test
337+
@Test(timeout = 30000)
338338
public void TestCompareTo() {
339339
// not implemented yet
340340
}
341341

342-
@Test
342+
@Test(timeout = 30000)
343343
public void TestLessThan() {
344344
// not implemented yet
345345
}
346346

347-
@Test
347+
@Test(timeout = 30000)
348348
public void TestLessThanOrEqual() {
349349
// not implemented yet
350350
}
351351

352-
@Test
352+
@Test(timeout = 30000)
353353
public void TestGreaterThan() {
354354
// not implemented yet
355355
}
356356

357-
@Test
357+
@Test(timeout = 30000)
358358
public void TestGreaterThanOrEqual() {
359359
// not implemented yet
360360
}
361361

362-
@Test
362+
@Test(timeout = 30000)
363363
public void TestGetType() {
364364
// not implemented yet
365365
}
366366

367-
@Test
367+
@Test(timeout = 30000)
368368
public void TestAsEInteger() {
369369
try {
370370
ToObjectTest.TestToFromObjectRoundTrip(
@@ -626,7 +626,7 @@ public void TestAsEInteger() {
626626
}
627627
}
628628

629-
@Test
629+
@Test(timeout = 30000)
630630
public void TestAsEDecimal() {
631631
{
632632
Object objectTemp = CBORTestCommon.DecPosInf;
@@ -728,7 +728,7 @@ public void TestAsEDecimal() {
728728
}
729729
}
730730

731-
@Test
731+
@Test(timeout = 30000)
732732
public void TestAsEFloat() {
733733
{
734734
Object objectTemp = CBORTestCommon.FloatPosInf;
@@ -764,7 +764,7 @@ public void TestAsEFloat() {
764764
}
765765
}
766766

767-
@Test
767+
@Test(timeout = 30000)
768768
public void TestAsERational() {
769769
{
770770
Object objectTemp = CBORTestCommon.RatPosInf;
@@ -806,7 +806,7 @@ public void TestAsERational() {
806806
}
807807
}
808808

809-
@Test
809+
@Test(timeout = 30000)
810810
public void TestEncodingZeros() {
811811
TestCommon.CompareTestEqual(ToCN(0.0), ToCN(-0.0).Abs());
812812
TestCommon.CompareTestEqual(ToCN(0.0f), ToCN(-0.0f).Abs());

0 commit comments

Comments
 (0)