[m-rev.] For review: Java implementation of library/dir.m

Fergus Henderson fjh at cs.mu.OZ.AU
Wed Jan 14 14:12:22 AEDT 2004


On 14-Jan-2004, James Goddard <goddardjames at yahoo.com> wrote:
> > Hmm... that looks like it has a bug:
> > when does the directory actually get created?
> 
> A very good question =)  I've added that call now.

Don't forget to add a test case.  In general, whenever you make a change,
it's a good idea to ensure that there is at least one test case which tests
whatever change you have just made.

Actually I think tests/hard_coded/dir_test.m already tests
these features... but I guess it needs to be added to the
list of tests which pass for Java.  Unless there is some
other reason why that test doesn't pass for Java?

> @@ -820,6 +827,32 @@
>      }
>  }").
> 
> +% Java has a similar library function java.io.File.mkdirs()
> +:- pragma foreign_proc("Java",
> +       dir__make_directory(DirName::in, Res::out, _IO0::di, _IO::uo),
> +       [may_call_mercury, promise_pure, tabled_for_io, thread_safe],
> +"
> +       try{

s/try{/try {/

Otherwise the relative diff looks fine.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list