Commit Graph

57 Commits

Author SHA1 Message Date
Grégoire Henry
2a85c34c67 Indentation fixes 2018-05-25 16:47:48 +02:00
Milo Davis
7fc74da1a2 Data_encoding: add bounded strings and bytes 2018-05-25 14:41:27 +02:00
Grégoire Henry
c2241c034a Data_encoding: allow smaller size field for Dynamic_size 2018-05-25 14:41:27 +02:00
Grégoire Henry
89b6799fd6 Data_encoding: add combinator for positive big number 2018-05-25 14:41:27 +02:00
Grégoire Henry
e1622c7b77 Opam: fix test dependencies for data_encoding. 2018-05-25 00:47:52 +02:00
Raphaël Proust
118188530a Data_encoding: crowbar tests
This work is based on ideas more fully developped in
https://gitlab.com/gasche/fuzz-data-encoding.

However, including some tests directly in this repo helps with CI
integration as well as keeping the tests and interfaces up to date.
Eventually, we should integrate the tests from the fuzz-data-encoding
library.
2018-05-24 17:50:18 +02:00
Raphaël Proust
8b5bce50cf Data_encoding: test catching of invalid encodings 2018-05-24 17:50:18 +02:00
Raphaël Proust
00d596e9c2 Data_encoding: catching more invalid encoding 2018-05-24 17:50:18 +02:00
Benjamin Canou
b0be5b630d Data_encoding: Ignore is actually a `Fixed 0 2018-05-24 15:43:15 +00:00
Pietro
d1c2f631d5 Data_encoding: Refresh benchmarks 2018-05-24 15:43:15 +00:00
Grégoire Henry
2b82a588e1 Data_encoding: improve docstrings. 2018-05-24 15:43:15 +00:00
Grégoire Henry
2e9df07b0e Data_encoding: add check_size 2018-05-24 15:43:15 +00:00
Grégoire Henry
5023e1a261 Data_encoding: rename Binary.to_bytes into to_bytes_exn 2018-05-24 15:43:15 +00:00
Grégoire Henry
72fc71be67 Data_encoding: rename Binary into Binary_writer 2018-05-24 15:43:15 +00:00
Grégoire Henry
1da0d0c8d7 Data_encoding: split out Binary_length 2018-05-24 15:43:15 +00:00
Grégoire Henry
aee6718148 Data_encoding: use CPS for the stream reader 2018-05-24 15:43:15 +00:00
Grégoire Henry
b83797371e Data_encoding: rename Size into Binary_size 2018-05-24 15:43:15 +00:00
Grégoire Henry
b164dd6cc5 Data_encoding: drop module Assert
- drop the quick-and-dirty `Assert` introduced when we switched from
  `Kaputt` and use `Alcotest.check` instead.

- split tests in multiple files:
  - success.ml
  - write_failure.ml
  - read_failture.ml
  - invalid_encoding.ml
  - randomized.ml
2018-05-24 15:43:15 +00:00
Grégoire Henry
a0cae2af57 Data_encoding: enforce fixed-size strings in JSON. 2018-05-24 15:43:15 +00:00
Grégoire Henry
1bc7b45fdb Data_encoding: forbids nested options 2018-05-24 15:43:15 +00:00
Grégoire Henry
1f358b7f9a Data_encoding: move cut_bytes into MBytes 2018-05-24 15:43:15 +00:00
Vincent Bernardoff
b48ba96106 Stdlib: use bigstring to implement MBytes 2018-05-12 23:11:35 +02:00
Pierre Chambart
e16cf6d28b Simplify, bit extraction from Z values 2018-05-09 16:36:52 +00:00
Benjamin Canou
deffa28aa4 Data_encoding: add more compact binary serializer for Z 2018-05-09 16:36:52 +00:00
Benjamin Canou
cd731df938 Add missing opam dependency 2018-05-05 01:29:06 +02:00
Vincent Bernardoff
96d9f317c1 Ocplib_json_typed: adapt code for inclusion in vendors 2018-05-04 18:48:00 +02:00
Grégoire Henry
0b31ebb455 Data_encoding: split out Binary_stream 2018-05-03 15:35:40 +02:00
Grégoire Henry
caa764f0ff Data_encoding: do not open the implementation modules by default 2018-05-03 11:05:06 +02:00
Raphaël Proust
0a3c9d52ec Data_encoding: deduplicate documentation 2018-05-03 15:25:47 +08:00
Raphaël Proust
194d3f9120 Data_encoding: move internal function internally 2018-05-03 15:18:10 +08:00
Raphaël Proust
34d4e9ec5d Data_encoding: don't open Encoding 2018-05-03 15:13:39 +08:00
Raphaël Proust
1ade54a7d7 Data_encoding: separate Size into its own module 2018-05-03 15:11:46 +08:00
Raphaël Proust
2418554f78 Data_encoding: reorder and reorganize doc 2018-05-03 14:00:24 +08:00
Raphaël Proust
56fbc5267d Data_encoding: split implementation
In an effort to keep a clean commit history, the interface is unchanged.
2018-05-03 12:27:17 +08:00
Milo Davis
f5cc599ae6 Data_encoding: add names to union cases 2018-04-26 22:52:21 +02:00
Raphaël Proust
1af07b233a Data_encoding: better documentation of int 2018-04-26 21:20:40 +02:00
Grégoire Henry
ce2d196bb5 Data_encoding: be compatible with 32bits platform.
We should not accept for `data_encoding.ranged_int` values that cannot
fits in `int31`. Iw we wnat more, we should introduce `ranged_int32`
or `ranged_int64`.
2018-04-09 13:17:04 +00:00
Arthur B
21efb2dc9d Jbuilder: update to beta.19.1 2018-04-06 11:47:22 +02:00
Benjamin Canou
bd3191059b Data_encoding: make more combinators transparent to is_tup/is_obj 2018-03-24 16:45:29 +01:00
bruno
bdf6a5e564 General: update jbuilder to 1.0+beta19 2018-03-20 06:49:52 +01:00
Grégoire Henry
09c1e317ab Alpha: add operation Double_endorsement 2018-03-16 15:34:32 +01:00
Raphaël Proust
8364e27142 Data_encoding: typo in error message 2018-03-15 13:58:54 +00:00
Grégoire Henry
76a59af376 Opam: use jbuilder.1.0.0-beta18 2018-03-08 14:38:57 +01:00
Grégoire Henry
ad330db7e1 Opam: require jbuilder = 1.0.0-beta17 2018-03-07 18:12:12 +01:00
Grégoire Henry
a70a0788d3 Test: quick and dirty port to alcotest 2018-02-12 02:09:00 +01:00
Grégoire Henry
84d8ae9222 Client refactor: Move Data_encoding_ezjsonm.read_file into Lwt_utils_unix 2018-02-08 17:23:30 +01:00
Grégoire Henry
8c58d7a610 Client refactor: Move non-unix part of Data_Encoding_Ezjsonm into Data_Encoding.Json 2018-02-08 17:23:30 +01:00
Grégoire Henry
acffadafae Jbuilder: fix warning 2018-02-07 11:16:39 +01:00
Grégoire Henry
575e367026 Update copyright notice (2018) 2018-02-05 23:34:05 +01:00
Grégoire Henry
e28219ad60 Opam: update to jbuilder.1.0+beta17 2018-02-05 23:34:05 +01:00