mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-10 02:28:22 +02:00
* Implemented coCreateDeclaration
git-svn-id: trunk@22405 -
This commit is contained in:
parent
4be38f5c53
commit
fcb3d0c256
@ -36,7 +36,8 @@ Type
|
||||
tNotify, // Generate Property change notification test (tiOPF)
|
||||
tMaxLen); // Generate property MaxLen (tiOPF)
|
||||
TTestpropertyOptions = set of TTestpropertyOption;
|
||||
TTestCodeOption = (coImplementation, // generate (empty) implementation of tests
|
||||
TTestCodeOption = (coCreateDeclaration, // Generate declaration of test cases.
|
||||
coImplementation, // generate (empty) implementation of tests
|
||||
coDefaultFail, // Insert Fail() statement in tests
|
||||
coSingleClass, // Use a single test class for all tests
|
||||
coCreateUnit, // Generate complete unit source
|
||||
@ -158,7 +159,7 @@ Type
|
||||
Const
|
||||
DefaultVisibilities = [visDefault,visPublished,visPublic];
|
||||
DefaultPropertyOptions = [tDefault];
|
||||
DefaultCodeOptions = [coImplementation,coDefaultFail,coCreateUnit,
|
||||
DefaultCodeOptions = [coCreateDeclaration,coImplementation,coDefaultFail,coCreateUnit,
|
||||
coSetup,coTearDown, coFunctions, coClasses,
|
||||
coRegisterTests];
|
||||
DefaultMembers = [tmtMethods,tmtFields,tmtProperties];
|
||||
@ -607,7 +608,7 @@ begin
|
||||
C.Add('');
|
||||
C.Add('Type');
|
||||
end;
|
||||
If (coCreateUnit in CodeOptions) then
|
||||
If (coCreateDeclaration in CodeOptions) then
|
||||
CreateInterfaceCode(C);
|
||||
if (coImplementation in CodeOptions) then
|
||||
begin
|
||||
|
@ -35,6 +35,7 @@ Resourcestring
|
||||
SHelp80 = '--test-property-required generate a Required test for each property' ;
|
||||
SHelp90 = '--test-property-notify generate a notify test for each property' ;
|
||||
SHelp100 = '--test-property-maxlen generate a maxlen test for each property' ;
|
||||
SHelp105 = '--skip-declaration Do not generate declarations for the tests' ;
|
||||
SHelp110 = '--skip-implementation Do not generate (empty) implementation for the tests' ;
|
||||
SHelp120 = '--skip-fail Skip fail() statement in test implementations ' ;
|
||||
SHelp130 = '--skip-unit Do not generate a unit' ;
|
||||
@ -172,6 +173,8 @@ begin
|
||||
op(tNotify,true)
|
||||
else if s='--test-property-maxlen' then
|
||||
op(tMaxLen,true)
|
||||
else if s='--skip-declaration' then
|
||||
oc(coCreateDeclaration,false)
|
||||
else if s='--skip-implementation' then
|
||||
oc(coImplementation,false)
|
||||
else if s='--skip-fail' then
|
||||
@ -276,6 +279,7 @@ begin
|
||||
Writeln(SHelp80 );
|
||||
Writeln(SHelp90 );
|
||||
Writeln(SHelp100);
|
||||
Writeln(SHelp105);
|
||||
Writeln(SHelp110);
|
||||
Writeln(SHelp120);
|
||||
Writeln(SHelp130);
|
||||
|
Loading…
Reference in New Issue
Block a user