[fpc-pascal] Re: FPCUnit without Lazarus
Luciano de Souza
luchyanus at gmail.com
Sun Jan 8 13:13:12 CET 2012
Now, I understand. FPCUnit and FPCRegistry do not have LCL dependences.
What depends on LCL is the runner called Console Runner. This name make
me confused!
I ahve alredy read the documentation, but I could not understand.
Perhaps, perhaps my weak english... Well, the fact is that everything is
now OK.
When I read the documentation I didn't understand the runner was a
separated executable: an application built specially to test my program.
I thought all the code needed to test my program would be in my test
unit. I was able to create, to register the tests, but not to run then.
I was searching something to run in FPCUnit and FPCRegister. All the
code required to run my test would be in the initialization of my test
unit. When compiling my application I would do:
program MyApp;
uses
MyUnit,
{$ifdef tst}
MyUnitTest;
{$endif}
And I call: fpc MyApp.pas -dtest. According to this idea, the runner
would be my own application called with certain commandline options.
Yes, in my first reading, I do not understand it. Now I can see the
adopted model is best. I don't need to mix the code of my application
with test code. "{$ifdef ...}" is not required.
In brief, all my problem was that I could understand that I have a
runner and I will need to compile it each time I create a new project.
Solved my interpretation issues, now I am coming back to the tests.
Thank you very much for the attention!
Regards,
Luciano
Em 08-01-2012 00:14, leledumbo escreveu:
> FPCUnit is part of FCL and it doesn't require LCL. Of course if you install
> via packages under Lazarus components folder, it would depend on Lazarus
> parts (e.g, LCL), esp. for the runner. Open
> fpc/packages/fcl-fpcunit/src/demo for a pure FPC example. Or
> http://free-pascal-general.1045716.n5.nabble.com/file/n5128730/fpcunit.pdf
> here for the documentation.
>
> --
> View this message in context: http://free-pascal-general.1045716.n5.nabble.com/FPCUnit-without-Lazarus-tp5128696p5128730.html
> Sent from the Free Pascal - General mailing list archive at Nabble.com.
> _______________________________________________
> fpc-pascal maillist - fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
More information about the fpc-pascal
mailing list