Displaying 20 results from an estimated 31 matches for "assert_equal_int64".
Did you mean:
assert_equal_int
2015 Jan 22
3
[PATCH 1/2] configure: look for the oUnit OCaml module
It will be used for the OCaml unit tests.
---
configure.ac | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/configure.ac b/configure.ac
index e0fb481..e360bbb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1120,6 +1120,7 @@ AS_IF([test "x$OCAMLC" != "xno"],[
])
OCAML_PKG_gettext=no
+OCAML_PKG_oUnit=no
AS_IF([test "x$OCAMLC" != "xno"],[
#
2015 Jan 22
0
[PATCH 2/2] mllib: convert common_utils_tests to oUnit
...18,117 @@
(* This file tests the Common_utils module. *)
+open OUnit
open Common_utils
let prog = "common_utils_tests"
+(* Utils. *)
+let assert_equal_string = assert_equal ~printer:(fun x -> x)
+let assert_equal_int = assert_equal ~printer:(fun x -> string_of_int x)
+let assert_equal_int64 = assert_equal ~printer:(fun x -> Int64.to_string x)
+
(* Test Common_utils.int_of_le32 and Common_utils.le32_of_int. *)
-let () =
- assert (int_of_le32 "\x80\x60\x40\x20" = 0x20406080L);
- assert (le32_of_int 0x20406080L = "\x80\x60\x40\x20")
+let test_le32 () =
+ assert...
2015 May 15
5
[PATCH 0/4] Only tell people to use -v -x when reporting bugs if they're not using those flags.
.. and a lot of refactoring.
https://bugzilla.redhat.com/show_bug.cgi?id=1167623
Rich.
2015 May 15
6
[PATCH v2 0/4] Only tell people to use -v -x when reporting bugs if they're not using those flags.
https://bugzilla.redhat.com/show_bug.cgi?id=1167623
2015 May 11
3
[PATCH 1/2] mllib: Require OUnit2 for tests.
...ware; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -18,7 +18,7 @@
(* This file tests the Common_utils module. *)
-open OUnit
+open OUnit2
open Common_utils
let prog = "common_utils_tests"
@@ -30,12 +30,12 @@ let assert_equal_int64 = assert_equal ~printer:(fun x -> Int64.to_string x)
let assert_equal_stringlist = assert_equal ~printer:(fun x -> "(" ^ (String.escaped (String.concat "," x)) ^ ")")
(* Test Common_utils.int_of_le32 and Common_utils.le32_of_int. *)
-let test_le32 () =
+let t...
2018 Aug 20
0
[PATCH 4/4] mltools: JSON: unify JSON_parser type with JSON.json_t.
...--git a/common/mltools/JSON_parser_tests.ml b/common/mltools/JSON_parser_tests.ml
index 42045122d..e7e3112b5 100644
--- a/common/mltools/JSON_parser_tests.ml
+++ b/common/mltools/JSON_parser_tests.ml
@@ -27,16 +27,15 @@ let assert_equal_int = assert_equal ~printer:(fun x -> string_of_int x)
let assert_equal_int64 = assert_equal ~printer:(fun x -> Int64.to_string x)
let assert_equal_bool = assert_equal ~printer:(fun x -> string_of_bool x)
-let string_of_json_parser_val_type = function
- | JSON_parser_null -> "null"
- | JSON_parser_string _ -> "string"
- | JSON_parser_num...
2019 Jan 16
1
Re: [PATCH 3/5] mltools: add simple tests for external_command
...1489fe699..f3c39514d 100644
> --- a/common/mltools/tools_utils_tests.ml
> +++ b/common/mltools/tools_utils_tests.ml
> @@ -28,6 +28,7 @@ let assert_equal_string = assert_equal ~printer:(fun x -> x)
> let assert_equal_int = assert_equal ~printer:(fun x -> string_of_int x)
> let assert_equal_int64 = assert_equal ~printer:(fun x -> Int64.to_string x)
> let assert_equal_intlist = assert_equal ~printer:(fun x -> "(" ^ (String.concat ";" (List.map string_of_int x)) ^ ")")
> +let assert_equal_stringlist = assert_equal ~printer:(fun x -> "("...
2018 Aug 22
3
[PATCH v2 0/2] mltools: JSON: unify JSON & JSON parser.
v2:
- Added back the null value.
- Reran the tests.
Rich.
2018 Aug 17
0
[PATCH v3 1/4] mltools: Rename Yajl module as JSON_parser and move to common/mltools.
...e tests the Yajl module. *)
+(* This file tests the JSON_parser module. *)
open OUnit2
-open Yajl
+open JSON_parser
(* Utils. *)
let assert_equal_string = assert_equal ~printer:(fun x -> x)
@@ -27,16 +27,16 @@ let assert_equal_int = assert_equal ~printer:(fun x -> string_of_int x)
let assert_equal_int64 = assert_equal ~printer:(fun x -> Int64.to_string x)
let assert_equal_bool = assert_equal ~printer:(fun x -> string_of_bool x)
-let string_of_yajl_val_type = function
- | Yajl_null -> "null"
- | Yajl_string _ -> "string"
- | Yajl_number _ -> "number&quo...
2018 Aug 20
6
[PATCH 0/4] mltools: JSON unification
An evolution of:
https://www.redhat.com/archives/libguestfs/2018-August/msg00155.html
2017 Sep 21
18
[PATCH v2 00/18] Replace many more uses of the Str module with PCRE.
v1 was here:
https://www.redhat.com/archives/libguestfs/2017-September/msg00135.html
This is a more complete evolution of the earlier patch. It replaces
most important uses of Str with PCRE throughout the code. It also
extends the bindings with some useful features like case-insensitive
regexps.
The main places I *didn't* touch are the generator (GObject uses Str
extensively); and
2017 Sep 22
27
[PATCH v3 00/22] Replace almost all uses of the Str module with PCRE.
v1:
https://www.redhat.com/archives/libguestfs/2017-September/msg00135.html
v2:
https://www.redhat.com/archives/libguestfs/2017-September/msg00158.html
v3 is almost identical to v2, but I have added 4 extra commits to
almost finish the job of replacing Str everywhere possible (note it's
not possible to replace Str in common/mlstdutils or the generator
because those are pure OCaml).
As
2019 Jan 16
0
[PATCH 3/5] mltools: add simple tests for external_command
...ols_utils_tests.ml
index 1489fe699..f3c39514d 100644
--- a/common/mltools/tools_utils_tests.ml
+++ b/common/mltools/tools_utils_tests.ml
@@ -28,6 +28,7 @@ let assert_equal_string = assert_equal ~printer:(fun x -> x)
let assert_equal_int = assert_equal ~printer:(fun x -> string_of_int x)
let assert_equal_int64 = assert_equal ~printer:(fun x -> Int64.to_string x)
let assert_equal_intlist = assert_equal ~printer:(fun x -> "(" ^ (String.concat ";" (List.map string_of_int x)) ^ ")")
+let assert_equal_stringlist = assert_equal ~printer:(fun x -> "(" ^ (String....
2018 Aug 17
8
[PATCH v3 4/4] v2v: Add --print-estimate option to print copy size
I rethought this again, as I think that it's a dangerous assumption to
bake qemu-img measure output into our API.
This patch series runs qemu-img measure behind the scenes, but then
parses the output and sums it to a single number which we print.
Doing that required a bit of reworking, moving the Jansson [JSON
parser] bindings from virt-builder into the common directory and
a couple of other
2019 Jan 11
3
[PATCH 1/3] mlstdutils: add a very simple test for Std_utils.which
...it a/common/mlstdutils/std_utils_tests.ml b/common/mlstdutils/std_utils_tests.ml
index 81f512cbf..f7b0247a4 100644
--- a/common/mlstdutils/std_utils_tests.ml
+++ b/common/mlstdutils/std_utils_tests.ml
@@ -29,6 +29,11 @@ let assert_equal_int = assert_equal ~printer:(fun x -> string_of_int x)
let assert_equal_int64 = assert_equal ~printer:(fun x -> Int64.to_string x)
let assert_equal_stringlist = assert_equal ~printer:(fun x -> "(" ^ (String.escaped (String.concat "," x)) ^ ")")
let assert_equal_stringpair = assert_equal ~printer:(fun (x, y) -> sprintf "%S, %S&quo...
2019 Jan 16
10
[PATCH 0/5] [RFC] builder: handle unavailable repos
In case a repository of virt-builder references files (e.g. the index)
that cannot be downloaded (network issues, 404, etc) then virt-builder
errors out on this situation. This is not a nice situation, from an user
POV.
This series does some refactoring to allow to better handle downloading
failures, and handle the failures gracefully in virt-builder.
RFC because I'm not yet too convinced
2017 Apr 07
1
[PATCH 1/2] mllib: add new Common_utils.run_commands
...tests.ml b/mllib/common_utils_tests.ml
index aacc01e..42af7be 100644
--- a/mllib/common_utils_tests.ml
+++ b/mllib/common_utils_tests.ml
@@ -26,6 +26,7 @@ let assert_equal_string = assert_equal ~printer:(fun x -> x)
let assert_equal_int = assert_equal ~printer:(fun x -> string_of_int x)
let assert_equal_int64 = assert_equal ~printer:(fun x -> Int64.to_string x)
let assert_equal_stringlist = assert_equal ~printer:(fun x -> "(" ^ (String.escaped (String.concat "," x)) ^ ")")
+let assert_equal_intlist = assert_equal ~printer:(fun x -> "(" ^ (String.concat &...
2015 Jan 23
2
[PATCH 1/2] mllib: tests: add tests for string_lines_split
...x 09d5c51..283e9a1 100644
--- a/mllib/common_utils_tests.ml
+++ b/mllib/common_utils_tests.ml
@@ -27,6 +27,7 @@ let prog = "common_utils_tests"
let assert_equal_string = assert_equal ~printer:(fun x -> x)
let assert_equal_int = assert_equal ~printer:(fun x -> string_of_int x)
let assert_equal_int64 = assert_equal ~printer:(fun x -> Int64.to_string x)
+let assert_equal_stringlist = assert_equal ~printer:(fun x -> "(" ^ (String.escaped (String.concat "," x)) ^ ")")
(* Test Common_utils.int_of_le32 and Common_utils.le32_of_int. *)
let test_le32 () =
@@ -11...
2017 Feb 03
3
[PATCH v7 0/1] Import directly from OVA tar archive if possible
v7:
- rebased because patch 1/3 has been pushed
- changes to nsplit have been dropped (2/3)
- addressed Richard's comments, notably the subfolder function was moved to
mllib and renamed to subdirectory
v6:
- just rebase
v5:
- rebase, patches 1,3,5 were merged
- 1/3: we still need to discuss whether to detect compressed discs
- 2/3:
- renamed argument noempty to keep_empty
- tests were
2017 Jun 20
2
[PATCH v2 1/2] mllib: add new Common_utils.run_commands
...tests.ml b/mllib/common_utils_tests.ml
index aacc01e..4c9f53f 100644
--- a/mllib/common_utils_tests.ml
+++ b/mllib/common_utils_tests.ml
@@ -26,6 +26,7 @@ let assert_equal_string = assert_equal ~printer:(fun x -> x)
let assert_equal_int = assert_equal ~printer:(fun x -> string_of_int x)
let assert_equal_int64 = assert_equal ~printer:(fun x -> Int64.to_string x)
let assert_equal_stringlist = assert_equal ~printer:(fun x -> "(" ^ (String.escaped (String.concat "," x)) ^ ")")
+let assert_equal_intlist = assert_equal ~printer:(fun x -> "(" ^ (String.concat &...