WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-api

[Xen-API] [PATCH 04 of 12] [PCR0047] Adds to Ocamltest a new test case c

To: xen-api@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-API] [PATCH 04 of 12] [PCR0047] Adds to Ocamltest a new test case constructor "make_function_test_case", useful for making a test case that tests a single function
From: Jonathan Knowles <jonathan.knowles@xxxxxxxxxxxxx>
Date: Mon, 1 Feb 2010 16:32:06 +0000
Delivery-date: Mon, 01 Feb 2010 08:35:40 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1265041922@radon>
List-help: <mailto:xen-api-request@lists.xensource.com?subject=help>
List-id: Discussion of API issues surrounding Xen <xen-api.lists.xensource.com>
List-post: <mailto:xen-api@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-api-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Jonathan Knowles <jonathan.knowles@xxxxxxxxxxxxx>
# Date 1265039942 0
# Node ID 86c008b5d3aa275c7422fc5f5e32d8429fc681a7
# Parent  647fd458b3759aaa726a4fa5fffb28eab378ba15
[PCR0047] Adds to Ocamltest a new test case constructor 
"make_function_test_case", useful for making a test case that tests a single 
function.

Signed-off-by: Jonathan Knowles <jonathan.knowles@xxxxxxxxxxxxx>

diff -r 647fd458b375 -r 86c008b5d3aa ocaml/util/ocamltest.ml
--- a/ocaml/util/ocamltest.ml   Mon Feb 01 15:59:02 2010 +0000
+++ b/ocaml/util/ocamltest.ml   Mon Feb 01 15:59:02 2010 +0000
@@ -259,6 +259,9 @@
 let make_test_case name description case =
        Case (name, description, case)
 
+let make_function_test_case name case =
+       Case (name, sprintf "Tests the %s function." name, case)
+
 let make_test_suite name description suite =
        Suite (name, description, suite)
 
diff -r 647fd458b375 -r 86c008b5d3aa ocaml/util/ocamltest.mli
--- a/ocaml/util/ocamltest.mli  Mon Feb 01 15:59:02 2010 +0000
+++ b/ocaml/util/ocamltest.mli  Mon Feb 01 15:59:02 2010 +0000
@@ -84,6 +84,9 @@
 (** Makes a test case. *)
 val make_test_case : name -> description -> case -> test
 
+(** Makes a function test case with a default description. *)
+val make_function_test_case : name -> case -> test
+
 (** Makes a test suite. *)
 val make_test_suite : name -> description -> suite -> test
 
2 files changed, 6 insertions(+)
ocaml/util/ocamltest.ml  |    3 +++
ocaml/util/ocamltest.mli |    3 +++


Attachment: xen-api.hg-12.patch
Description: Text Data

_______________________________________________
xen-api mailing list
xen-api@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/mailman/listinfo/xen-api
<Prev in Thread] Current Thread [Next in Thread>