Sign in Join

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

Mailing lists / fpc-devel / 2007-05

[patch] - FPCUnit (new overloaded RegisterTest functions)

5 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,

Attached is a patch for FPCUnit, to be applied from the root source directory. I really hope this patch can make it into the 2.2 branch as well. I took extra care to make sure there is no problems and tested it in 4 different FPCUnit projects.

Changes:
Added two new overloaded RegisterTest() functions that take a Suite Path as a parameter. The suite path will be translated into individual TTestSuite classes and reuse classes if they already exist. Path delimiters are '.' or '/' or '\' characters.

This makes it much easier to group your unit tests in a hierarchy without having to manually create the TTestSuite classes yourself. I got the idea from the DUnit project.

examples of valid suite paths

'SuiteA.SuiteB.SuiteC'
'SuiteA\SuiteB\SuiteC'
'SuiteA/SuiteB/SuiteC'
'SuiteA.SuiteB\SuiteC/SuiteD'

Regards,
Graeme

Reply by email

Michael Van Canneyt
to Graeme Geldenhuys
Graeme Geldenhuys wrote 6 lines
Hi, Attached is a patch for FPCUnit, to be applied from the root source directory. I really hope this patch can make it into the 2.2 branch as well. I took extra care to make sure there is no problems and tested it in 4 different FPCUnit projects.

The patch is applied, thank you.

About the 2.2 branch: we'll have to see.
Normally there is a feature freeze, so I wouldn't raise my hopes too much...

Michael.

Reply by email

Graeme Geldenhuys
to Michael Van Canneyt
Michael Van Canneyt wrote
The patch is applied, thank you.

That was quick. Thanks Michael.

About the 2.2 branch: we'll have to see. Normally there is a feature freeze, so I wouldn't raise my hopes too much...

I thought that much, hence the reason I thoroughly tested my changes to be 100% sure I broke nothing. I have a few projects I want to release with the minimum required FPC version 2.2. If this patch doesn't make it, I have a whole bunch of {$IF Define(Ver...} that I need to include in the code. :-(

How do we go about evaluating the change to see if it could make it into 2.2? Is there some procedure to follow?

Graeme Geldenhuys General error, hit any user to continue.

Reply by email

Michael Van Canneyt
to Graeme Geldenhuys
Graeme Geldenhuys wrote 18 lines
On 5/24/07, Michael Van Canneyt wrote: > > The patch is applied, thank you. That was quick. Thanks Michael. > > About the 2.2 branch: we'll have to see. > Normally there is a feature freeze, so I wouldn't raise my hopes too much... I thought that much, hence the reason I thoroughly tested my changes to be 100% sure I broke nothing. I have a few projects I want to release with the minimum required FPC version 2.2. If this patch doesn't make it, I have a whole bunch of {$IF Define(Ver...} that I need to include in the code. :-( How do we go about evaluating the change to see if it could make it into 2.2? Is there some procedure to follow?

Well, The number of my bank account is 232-2548697-22. The time-to-merge is inversely proportional to the amount of money deposited on this account :-)

Seriously:
If people on fpc-core decide it's important and harmless enough, then it may make it, otherwise not. The feature freeze is there for a reason.

Michael.

Reply by email

Graeme Geldenhuys
to Michael Van Canneyt
Michael Van Canneyt wrote
Well, The number of my bank account is 232-2548697-22. The time-to-merge is inversely proportional to the amount of money deposited on this account :-)

hehehe...

Seriously: If people on fpc-core decide it's important and harmless enough, then it may make it, otherwise not. The feature freeze is there for a reason.

I understand... thanks.

Graeme Geldenhuys General error, hit any user to continue.

Reply by email