[PPL-devel] beginner's question: don't you have any examples?

Zell zell08v at orange.fr
Sat Jul 28 07:09:41 CEST 2012


Hello,

It took me some time to figure out the structure of the testsuite in the
interface/tests of Java Interface. So I suggest add a 'main' method to the
current Test_Executor.java, something like the following one:

Zell.

****************
// file /ppl/src/test/Test_Executor.java

import parma_polyhedra_library.Parma_Polyhedra_Library;
   ...
    public static void main(String[] args) {

        try {
            System.load("/usr/local/lib/ppl/libppl_java.jnilib");
         }
        catch (UnsatisfiedLinkError  e) {
            System.out.println("Unable to load the library");
            System.out.println(e.getMessage());
            System.exit(-1);
        }
        Parma_Polyhedra_Library.initialize_library();


        boolean test_result_ok =
                Test_Executor.executeTests(NNC_Polyhedron_test1.class) &&
                Test_Executor.executeTests(C_Polyhedron_test1.class) &&
                Test_Executor.executeTests(MIP_Problem_test1.class) &&

Test_Executor.executeTests(Parma_Polyhedra_Library_test1.class) &&

Test_Executor.executeTests(Parma_Polyhedra_Library_test1.class);
        Parma_Polyhedra_Library.finalize_library();
        if (!test_result_ok)
            System.exit(1);
        System.exit(0);
    }




On Sun, Jul 22, 2012 at 10:11 AM, Z <zell08v at orange.fr> wrote:

> Sorry. I had not  study carefullly other .java files before asking my
> question. I find
> Parma_Polyhedra_Library_test.java has the "main', so I will try to
> understand the interface from there. Thanks again.
>
> Zell.
>
>
>
> On Sat, Jul 21, 2012 at 7:59 PM, Z <zell08v at orange.fr> wrote:
>
>> Hello,
>>
>> Thanks. I did not know that. Sorry.
>>
>> I find that your Test_executor.java does not contain a 'main' program. So
>> I am wondering what would be the right way to launch your test suites?
>>
>> Thanks again!
>>
>> Zell.
>>
>> Hi Zell,
>>>
>>> did you look in the
>>>
>>>   interfaces/Java/tests
>>>
>>> directory?
>>> Kind regards,
>>>
>>>   Roberto
>>>
>>> --
>>> Prof. Roberto Bagnara
>>> Applied Formal Methods Laboratory
>>> Department of Mathematics, University of Parma, Italy
>>> http://www.cs.unipr.it/~**bagnara/ <http://www.cs.unipr.it/%7Ebagnara/>
>>> mailto:bagnara at cs.unipr.it
>>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cs.unipr.it/pipermail/ppl-devel/attachments/20120728/952f65cb/attachment.htm>


More information about the PPL-devel mailing list