Commit 94a3955
committed
refactor(json): drop unused isEmpty() and consolidate redundant fuzz tests
- Delete JSONObject.isEmpty() (no callers in main or test code)
- Promote size() and keySet() to canonical position with proper Javadoc;
both still required by HttpMethed test util and stay drop-in compatible
- Fuzz test consolidation (165 -> 132 methods):
* Merge §50 boolean->numeric coercion (5 single-getter tests -> 1)
* Drop §52 boxed null-string redundancies (covered by §17/§18)
* Trim §28 toJSONString unwrap suite (9 -> 4)
* Trim equals tests (Array 8 -> 4, Object 10 -> 4); cover reflexivity,
nested, empty and built-vs-parsed inside the SameContent canonical case
* Replace .size()/.isEmpty() asserts with containsKey()/toJSONString()
where the original assertion was redundant1 parent 3406145 commit 94a3955
2 files changed
Lines changed: 71 additions & 329 deletions
File tree
- common/src/main/java/org/tron/json
- framework/src/test/java/org/tron/json
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
50 | 51 | | |
51 | 52 | | |
52 | 53 | | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
53 | 72 | | |
54 | 73 | | |
55 | 74 | | |
| |||
433 | 452 | | |
434 | 453 | | |
435 | 454 | | |
436 | | - | |
437 | | - | |
438 | | - | |
439 | | - | |
440 | | - | |
441 | | - | |
442 | | - | |
443 | | - | |
444 | | - | |
445 | | - | |
446 | | - | |
447 | | - | |
448 | | - | |
449 | | - | |
450 | 455 | | |
451 | 456 | | |
452 | 457 | | |
| |||
0 commit comments