[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#602298: marked as done ([libounit-ocaml-dev] force "unit" return type in OUnit.bracket for typesafety)



Your message dated Wed, 04 Jan 2012 17:39:42 +0100
with message-id <4F0480CE.2030306@dogguy.org>
and subject line Re: Bug#602298: [libounit-ocaml-dev] force "unit" return type in OUnit.bracket for typesafety
has caused the Debian Bug report #602298,
regarding [libounit-ocaml-dev] force "unit" return type in OUnit.bracket for typesafety
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
602298: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=602298
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: libounit-ocaml-dev
Version: 1.0.3-5.0.2
Severity: wishlist
Tags: patch

--- Please enter the report below this line. ---

It would be useful to make return value of the testfunction f and teardown in 
OUnit.bracket "unit" to enforce typing to avoid accidentally returning a 
monadic type causing partial execution of a testcase. (e.g. when using Lwt)

See attached patch for a proposed solution.

Thanks, Joost Damad

--- System information. ---
Architecture: amd64
Kernel:       Linux 2.6.32-5-amd64

Debian Release: squeeze/sid
  500 unstable        www.debian-multimedia.org 
  500 unstable        ftp.nl.debian.org 
  500 testing         dl.google.com 

--- Package information. ---
Depends               (Version) | Installed
===============================-+-===========
ocaml-nox-3.11.2                | 


Package's Recommends field is empty.

Package's Suggests field is empty.




-- 
Joost Yervante Damad - http://damad.be/joost/
--- oUnit.ml	2008-06-07 05:45:24.000000000 +0200
+++ oUnit.ml.new	2010-11-03 15:05:15.000000000 +0100
@@ -9,11 +9,11 @@
 let bracket set_up f tear_down () =
   let fixture = set_up () in
     try
-      f fixture;
-      tear_down fixture
+      let () = f fixture in
+      let () = tear_down fixture in
     with
 	e -> 
-	  tear_down fixture;
+	  let () = tear_down fixture in
 	  raise e
 
 exception Skip of string

--- End Message ---
--- Begin Message ---
Version: 1.1.0-1

On 03/11/10 17:33, Sylvain Le Gall wrote:
On Wed, Nov 03, 2010 at 03:38:42PM +0100, Joost Yervante Damad wrote:
On Wednesday 03 November 2010 15:34:26 Sylvain Le Gall wrote:
forwarded 602298
https://forge.ocamlcore.org/tracker/index.php?func=detail&aid=799&group_id
=162&atid=732

thanks

Hello,

On Wed, Nov 03, 2010 at 03:13:20PM +0100, Joost Yervante Damad wrote:
Package: libounit-ocaml-dev
Version: 1.0.3-5.0.2

What a strange version number? Did you recompile it yourself?

Yeah, now you mention it. Things I added locally:
  - stacktrace support on testcase failure due to exception
  - compile ounit with -g for better stacktrace support in general


Everything has been integrated into OUnit 1.1.0.
http://ounit.forge.ocamlcore.org

I'll wait the end of the freeze to upload it.


1.1.0-1 has been uploaded one year ago. So closing the bug now…

Regards,


--- End Message ---

Reply to: