Commit 59d5a67
committed
[Java] Start to introduce property based testing (PBT).
In this commit, I've:
1. Added a test dependency on JQwik.
2. Added a JQwik-based generator of arbitrary valid SBE message schemas.
This generator exercises a lot of possibilities but not all.
In particular, it is missing the generation of constants, min/max,
and custom offsets.
3. Added a test that shows the parser parses any arbitrary SBE message
schema.
Why have I introduced PBT? My aim is to eventually test (an
approximation of) the following property:
```
∀ msgSchema ∈ PossibleMessageSchemas,
∀ bytes ∈ PossibleValidValues(msgSchema),
DtoEncode(DtoDecode(bytes)) = bytes
```
I.e., that `DtoEncode` is the inverse of `DtoDecode` and that it
preserves the information in an encoded message.1 parent 2f657ed commit 59d5a67
File tree
5 files changed
+848
-0
lines changed- sbe-tool/src/test/java/uk/co/real_logic/sbe/properties
5 files changed
+848
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
117 | 120 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| 60 | + | |
60 | 61 | | |
61 | 62 | | |
62 | 63 | | |
| |||
248 | 249 | | |
249 | 250 | | |
250 | 251 | | |
| 252 | + | |
251 | 253 | | |
252 | 254 | | |
253 | 255 | | |
| |||
Lines changed: 48 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 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 | + | |
0 commit comments