-
Notifications
You must be signed in to change notification settings - Fork 203
Expand file tree
/
Copy pathBigNumberTest.java
More file actions
73 lines (68 loc) · 2.63 KB
/
BigNumberTest.java
File metadata and controls
73 lines (68 loc) · 2.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
package org.skyscreamer.jsonassert;
import org.json.JSONException;
import org.junit.Test;
public class BigNumberTest {
//CS304 (manually written) Issue link: https://github.com/skyscreamer/JSONassert/issues/107
@Test
public void testBigDecimalDifferent() throws JSONException {
JSONAssert.assertNotEquals(
"{ \"value\": 1234567890.1234567890123456 }",
"{ \"value\": 1234567890.12345678900000 }",
true
);
}
//CS304 (manually written) Issue link: https://github.com/skyscreamer/JSONassert/issues/107
@Test
public void testBigDecimalEqual() throws JSONException {
JSONAssert.assertEquals(
"{ \"value\": 1234567890.1234567890123456 }",
"{ \"value\": 1234567890.1234567890123456 }",
true
);
}
//CS304 (manually written) Issue link: https://github.com/skyscreamer/JSONassert/issues/107
@Test
public void testBigNumberDifferent() throws JSONException {
JSONAssert.assertNotEquals(
"{ \"value\": 12345678901234567890123456 }",
"{ \"value\": 12345678901234567800000000 }",
true
);
}
//CS304 (manually written) Issue link: https://github.com/skyscreamer/JSONassert/issues/107
@Test
public void testBigNumberEqual() throws JSONException {
JSONAssert.assertEquals(
"{ \"value\": 12345678901234567890123456 }",
"{ \"value\": 12345678901234567890123456 }",
true
);
}
//CS304 (manually written) Issue link: https://github.com/skyscreamer/JSONassert/issues/107
@Test
public void testNumberDemicalEqual() throws JSONException {
JSONAssert.assertEquals(
"{ \"value\": 12345678901234567890123456 }",
"{ \"value\": 12345678901234567890123456.0000000000000 }",
true
);
}
//CS304 (manually written) Issue link: https://github.com/skyscreamer/JSONassert/issues/107
@Test
public void testSmallNumberDemicalEqual1() throws JSONException {
JSONAssert.assertEquals(
"{ \"value\": 1.23 }",
"{ \"value\": 1.2300000000 }",
true
);
}
//CS304 (manually written) Issue link: https://github.com/skyscreamer/JSONassert/issues/107
@Test
public void testSmallNumberDemicalEqual2() throws JSONException {
JSONAssert.assertEquals(
"{ \"value\": 1 }",
"{ \"value\": 1.00000000 }",
true
);
}
}