dejagnu
[Top][All Lists]
Advanced

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

Re: Batch test example


From: Ben Elliston
Subject: Re: Batch test example
Date: 27 Feb 2004 08:28:55 +1100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

Raymond Law <address@hidden> writes:

> I've read the Dejagnu manual and wrote a simple interactive program
> and a testsuite.  But I haven't been able to find examples of
> testing a batch program.

Testing batch programs is generally easier than testing interactive
programs.  Instead of having to "talk" to the program, you just spawn
it and see what output it produces, or what exit code it terminates
with.

> Can you tell me what a batch test script looks like?

The calc testsuite in the DejaGnu distribution is a good example.

> Also, is there a way I can call a C++ function from the tcl test
> script?  Thanks in advance.

You'll either need to instrument your C++ program so that you can unit
test your function (if that's what you're trying to do), or use the
C/C++ unit testing support that was recently introduced into DejaGnu.

Can you elaborate?

Ben






reply via email to

[Prev in Thread] Current Thread [Next in Thread]