Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2009-12

test cases in FPC - how to they work?

3 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Graeme Geldenhuys

hi,

I'm working on Linux support for code page enabled string types (branch cpstrnew).

In general, is their a special way that the test projects in '<fpc>/tests/test/*' should be run?

Sorry, I'm used to FPCUnit or DUnit2 test cases which gives a clear indication if a test passed or failed.

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://opensoft.homeip.net/fpgui/

Reply by email

Jonas Maebe
to Graeme Geldenhuys
Graeme Geldenhuys wrote
In general, is their a special way that the test projects in '<fpc>/tests/test/*' should be run?

From fpc/tests/readme.txt:

***
Writing a test
--------------
A test should have a name on the form t*.pp, to be recognized as a test. It should return 0 on success, any other value indicates failure. ***

The "It should return" refers to the program exit code.

Jonas

Reply by email

Graeme Geldenhuys
to Jonas Maebe
Jonas Maebe wrote
A test should have a name on the form t*.pp, to be recognized as a test. It should return 0 on success, any other value indicates failure.

Ah thanks! And that would explain the lines with Halt(1) at the end of those test projects :-)

No idea how I missed that. :-(

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://opensoft.homeip.net/fpgui/

Reply by email