Sign in Join

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

Mailing lists / fpc-devel / 2026-11

fpc tests - question

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

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

Martin Frb

If I wanted to create a testcase in fpc....

I put a new file into
  tests/test/tmytest.pp

If that test needs to have units it uses, I can add   tests/test/umyunit.pp

Question1:
I didn't find a common prefix for inc files? they appear to just start with "t" like the tests themself?

-----------
I can add options at the top of the test.

{ %opt=-O2 -g- }

Question2:
If my test and the used unit should be compiled with different options, what then?

Can I get the unit to be compiled on its own with e.g. { %opt=-O- -g2 }

and then the test program with
{ %opt=-O2 -g- }

So that it uses the pre-compile unit (ppu/o) with the different compile settings?

Reply by email