search for: 2_l

Displaying 7 results from an estimated 7 matches for "2_l".

Did you mean: 28l
2018 Aug 23
2
[PATCH 1/2] mltools: JSON: add json_parser_tree_parse_file
...ltools/JSON_parser_tests.ml b/common/mltools/JSON_parser_tests.ml index 024817711..286724616 100644 --- a/common/mltools/JSON_parser_tests.ml +++ b/common/mltools/JSON_parser_tests.ml @@ -122,6 +122,28 @@ let test_tree_parse_inspect ctx = assert_is_number 10_L (List.nth a 2); assert_is_number 2_L (List.assoc "second" l) +let test_tree_parse_file_basic ctx = + begin + let tmpfile, chan = bracket_tmpfile ctx in + output_string chan "{}\n"; + flush chan; + close_out chan; + let value = json_parser_tree_parse_file tmpfile in + assert_is_object value + e...
2018 Aug 20
0
[PATCH 4/4] mltools: JSON: unify JSON_parser type with JSON.json_t.
...sert_equal_string "foo" (fst (l.(0))); - let a = get_array (snd (l.(0))) in - assert_equal_int 3 (Array.length a); - assert_is_bool false (a.(0)); - assert_is_object (a.(1)); - assert_is_number 10_L (a.(2)); - assert_equal_string "second" (fst (l.(1))); - assert_is_number 2_L (snd (l.(1))) + let l = get_dict value in + assert_equal_int 2 (List.length l); + let a = get_list (List.assoc "foo" l) in + assert_equal_int 3 (List.length a); + assert_is_bool false (List.hd a); + assert_is_object (List.nth a 1); + assert_is_number 10_L (List.nth a 2); + assert_...
2018 Aug 22
3
[PATCH v2 0/2] mltools: JSON: unify JSON & JSON parser.
v2: - Added back the null value. - Reran the tests. Rich.
2019 Aug 10
0
[PATCH libnbd 2/9] generator: Generalize OFlags.
...te 512 in NBD.pread nbd buf2 0_L; diff --git a/ocaml/tests/test_460_block_status.ml b/ocaml/tests/test_460_block_status.ml index df861c9..69635b4 100644 --- a/ocaml/tests/test_460_block_status.ml +++ b/ocaml/tests/test_460_block_status.ml @@ -50,7 +50,8 @@ let () = assert (!entries = [| 512_l; 3_l; 16384_l; 2_l |]); - NBD.block_status nbd 1024_L 32256_L (f 42) ~flags:[NBD.cmd_flag_req_one]; + let flags = let open NBD.CMD_FLAG in [REQ_ONE] in + NBD.block_status nbd 1024_L 32256_L (f 42) ~flags; assert (!entries = [| 512_l; 3_l |]) let () = Gc.compact...
2018 Aug 20
6
[PATCH 0/4] mltools: JSON unification
An evolution of: https://www.redhat.com/archives/libguestfs/2018-August/msg00155.html
2015 Sep 07
5
[PATCH 0/4 v3] builder: support for Simple Streams metadata
Hi, this series adds a basic support for Simple Streams v1.0 metadata files. This makes it possible to create a repository .conf files with [cirros] uri=http://download.cirros-cloud.net format=simplestreams to read the latest version of each CirrOS image. Thanks, Pino Toscano (4): builder: add non-int revisions builder: add simple libyajl binding build: expose HAVE_YAJL to automake
2019 Aug 10
17
[PATCH libnbd 0/9] Add Enum and Flags types.
This largish series adds several new features to the generator. Enum maps to enumerated types (like enum in C). The only current use for this is replacing the nbd_set_tls (nbd, 0/1/2) parameter with LIBNBD_TLS_DISABLE, LIBNBD_TLS_ALLOW, LIBNBD_TLS_REQUIRE (and natural equivalents in other programming languages). Flags maps to any uint32_t bitmask. It is basically a non-optional, generalized