[Pkg-libvirt-commits] [libguestfs] 16/29: v2v: Refactor ~printer parameter in unit tests.

Hilko Bengen bengen at moszumanska.debian.org
Sun Nov 1 17:15:04 UTC 2015


This is an automated email from the git hooks/post-receive script.

bengen pushed a commit to annotated tag upstream/1.29.49
in repository libguestfs.

commit c8a9e4b92871b8c37ef031778e5de3f4190d5e62
Author: Richard W.M. Jones <rjones at redhat.com>
Date:   Wed Jul 1 15:13:49 2015 +0100

    v2v: Refactor ~printer parameter in unit tests.
    
    Simple refactoring, no functional change.
---
 v2v/v2v_unit_tests.ml | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/v2v/v2v_unit_tests.ml b/v2v/v2v_unit_tests.ml
index 5cfb99a..aa27b9f 100644
--- a/v2v/v2v_unit_tests.ml
+++ b/v2v/v2v_unit_tests.ml
@@ -29,52 +29,53 @@ let test_get_ostype ctx =
             i_root = ""; i_package_format = ""; i_package_management = "";
             i_product_name = ""; i_product_variant = ""; i_mountpoints = [];
             i_apps = []; i_apps_map = StringMap.empty; i_uefi = false } in
-  assert_equal ~printer:identity "RHEL6"
+  let printer = identity in
+  assert_equal ~printer "RHEL6"
                (OVF.get_ostype { i with i_type = "linux"; i_distro = "rhel";
                                         i_major_version = 6;
                                         i_minor_version = 0;
                                         i_arch = "i386" });
-  assert_equal ~printer:identity "RHEL6x64"
+  assert_equal ~printer "RHEL6x64"
                (OVF.get_ostype { i with i_type = "linux"; i_distro = "rhel";
                                         i_major_version = 6;
                                         i_minor_version = 0;
                                         i_arch = "x86_64" });
-  assert_equal ~printer:identity "rhel_7x64"
+  assert_equal ~printer "rhel_7x64"
                (OVF.get_ostype { i with i_type = "linux"; i_distro = "rhel";
                                         i_major_version = 7;
                                         i_minor_version = 0;
                                         i_arch = "x86_64" });
-  assert_equal ~printer:identity "Windows7"
+  assert_equal ~printer "Windows7"
                (OVF.get_ostype { i with i_type = "windows";
                                         i_major_version = 6;
                                         i_minor_version = 1;
                                         i_product_variant = "Client";
                                         i_arch = "i386" });
-  assert_equal ~printer:identity "Windows7x64"
+  assert_equal ~printer "Windows7x64"
                (OVF.get_ostype { i with i_type = "windows";
                                         i_major_version = 6;
                                         i_minor_version = 1;
                                         i_product_variant = "Client";
                                         i_arch = "x86_64" });
-  assert_equal ~printer:identity "windows_8"
+  assert_equal ~printer "windows_8"
                (OVF.get_ostype { i with i_type = "windows";
                                         i_major_version = 6;
                                         i_minor_version = 2;
                                         i_product_variant = "Client";
                                         i_arch = "i386" });
-  assert_equal ~printer:identity "windows_8x64"
+  assert_equal ~printer "windows_8x64"
                (OVF.get_ostype { i with i_type = "windows";
                                         i_major_version = 6;
                                         i_minor_version = 2;
                                         i_product_variant = "Client";
                                         i_arch = "x86_64" });
-  assert_equal ~printer:identity "windows_2012x64"
+  assert_equal ~printer "windows_2012x64"
                (OVF.get_ostype { i with i_type = "windows";
                                         i_major_version = 6;
                                         i_minor_version = 2;
                                         i_product_variant = "Server";
                                         i_arch = "x86_64" });
-  assert_equal ~printer:identity "windows_2012R2x64"
+  assert_equal ~printer "windows_2012R2x64"
                (OVF.get_ostype { i with i_type = "windows";
                                         i_major_version = 6;
                                         i_minor_version = 3;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git



More information about the Pkg-libvirt-commits mailing list