From 541f15a9cb2c6d3ce97b281e6e0bc5e68c3a31ce Mon Sep 17 00:00:00 2001 From: mattias Date: Mon, 17 Oct 2016 15:01:23 +0000 Subject: [PATCH] codetools: moved tests git-svn-id: trunk@53152 - --- .gitattributes | 16 ++++++++-------- .../codetools/tests/finddeclarationtests.pas | 10 ++-------- .../codetools/tests/fpctests/tudots.dot.pp | 3 +++ .../codetools/tests}/testbasiccodetools.pas | 2 +- .../codetools/tests}/testcfgscript.pas | 2 +- components/codetools/tests/testcodetools.lpi | 10 ++++++---- components/codetools/tests/testcodetools.lpr | 10 ++++++++-- .../codetools/tests}/testcompleteblock.pas | 2 +- .../codetools/tests}/testcth2pas.pas | 2 +- .../codetools/tests}/testctrangescan.pas | 2 +- .../codetools/tests}/testctxmlfixfragments.pas | 2 +- .../codetools/tests}/testmethodjumptool.pas | 2 +- .../codetools/tests}/teststdcodetools.pas | 2 +- test/runtests.lpr | 2 +- test/testglobals.pas | 9 --------- test/testunits.pas | 3 --- 16 files changed, 36 insertions(+), 43 deletions(-) rename {test/codetoolstests => components/codetools/tests}/testbasiccodetools.pas (99%) rename {test/codetoolstests => components/codetools/tests}/testcfgscript.pas (98%) rename {test/codetoolstests => components/codetools/tests}/testcompleteblock.pas (99%) rename {test/codetoolstests => components/codetools/tests}/testcth2pas.pas (99%) rename {test/codetoolstests => components/codetools/tests}/testctrangescan.pas (99%) rename {test/codetoolstests => components/codetools/tests}/testctxmlfixfragments.pas (98%) rename {test/codetoolstests => components/codetools/tests}/testmethodjumptool.pas (98%) rename {test/codetoolstests => components/codetools/tests}/teststdcodetools.pas (99%) diff --git a/.gitattributes b/.gitattributes index f7cee598b3..528165c15f 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1041,8 +1041,16 @@ components/codetools/tests/pt_thlp1.pas svneol=native#text/plain components/codetools/tests/pt_thlp2.pas svneol=native#text/plain components/codetools/tests/refactoringtests.pas svneol=native#text/plain components/codetools/tests/rt_explodewith.pas svneol=native#text/plain +components/codetools/tests/testbasiccodetools.pas svneol=native#text/plain +components/codetools/tests/testcfgscript.pas svneol=native#text/plain components/codetools/tests/testcodetools.lpi svneol=native#text/plain components/codetools/tests/testcodetools.lpr svneol=native#text/plain +components/codetools/tests/testcompleteblock.pas svneol=native#text/plain +components/codetools/tests/testcth2pas.pas svneol=native#text/pascal +components/codetools/tests/testctrangescan.pas svneol=native#text/plain +components/codetools/tests/testctxmlfixfragments.pas svneol=native#text/pascal +components/codetools/tests/testmethodjumptool.pas svneol=native#text/plain +components/codetools/tests/teststdcodetools.pas svneol=native#text/plain components/codetools/unitdictionary.pas svneol=native#text/plain components/compilers/c/examples/test.c svneol=native#text/plain components/compilers/c/languages/lazcstrconsts.de.po svneol=native#text/plain @@ -8047,14 +8055,6 @@ test/bugs/bug8432.pas svneol=native#text/plain test/bugs/testfileproc.pas svneol=native#text/plain test/bugs/testfileutil.pas svneol=native#text/plain test/bugtestcase.pas svneol=native#text/plain -test/codetoolstests/testbasiccodetools.pas svneol=native#text/plain -test/codetoolstests/testcfgscript.pas svneol=native#text/plain -test/codetoolstests/testcompleteblock.pas svneol=native#text/plain -test/codetoolstests/testcth2pas.pas svneol=native#text/pascal -test/codetoolstests/testctrangescan.pas svneol=native#text/plain -test/codetoolstests/testctxmlfixfragments.pas svneol=native#text/pascal -test/codetoolstests/testmethodjumptool.pas svneol=native#text/plain -test/codetoolstests/teststdcodetools.pas svneol=native#text/plain test/customdrawn/cd_test_all.ico -text test/customdrawn/cd_test_all.lpi svneol=native#text/plain test/customdrawn/cd_test_all.lpr svneol=native#text/plain diff --git a/components/codetools/tests/finddeclarationtests.pas b/components/codetools/tests/finddeclarationtests.pas index bfc346e47f..c6f2c78e38 100644 --- a/components/codetools/tests/finddeclarationtests.pas +++ b/components/codetools/tests/finddeclarationtests.pas @@ -32,7 +32,7 @@ uses Classes, SysUtils, CodeToolManager, ExprEval, CodeCache, BasicCodeTools, CustomCodeTool, CodeTree, FindDeclarationTool, KeywordFuncLists, IdentCompletionTool, FileProcs, LazLogger, LazFileUtils, fpcunit, - testregistry; + testregistry, TestGlobals; type @@ -322,12 +322,6 @@ begin end; initialization - GetTestRegistry.TestName := 'All tests'; - BugsTestSuite := TTestSuite.Create('Bugs'); - GetTestRegistry.AddTest(BugsTestSuite); - FindDeclarationTestSuite := TTestSuite.Create('FindDeclaration'); - GetTestRegistry.AddTest(FindDeclarationTestSuite); - - FindDeclarationTestSuite.AddTestSuiteFromClass(TTestFindDeclaration); + AddToFindDeclarationTestSuite(TTestFindDeclaration); end. diff --git a/components/codetools/tests/fpctests/tudots.dot.pp b/components/codetools/tests/fpctests/tudots.dot.pp index 17771e349d..6f2157dc0e 100644 --- a/components/codetools/tests/fpctests/tudots.dot.pp +++ b/components/codetools/tests/fpctests/tudots.dot.pp @@ -9,6 +9,8 @@ procedure t; implementation +(* + uses tudots{declaration:tudots}, tudots.dot.next{ todo declaration:tudots.dot.next}; @@ -22,5 +24,6 @@ begin tudots.dot.test{declaration:tudots.dot.test} := 'c'; end; +*) end. diff --git a/test/codetoolstests/testbasiccodetools.pas b/components/codetools/tests/testbasiccodetools.pas similarity index 99% rename from test/codetoolstests/testbasiccodetools.pas rename to components/codetools/tests/testbasiccodetools.pas index eca920b6f0..4addb1e4be 100644 --- a/test/codetoolstests/testbasiccodetools.pas +++ b/components/codetools/tests/testbasiccodetools.pas @@ -460,7 +460,7 @@ begin end; initialization - AddToCodetoolsTestSuite(TTestBasicCodeTools); + AddToBasicTestSuite(TTestBasicCodeTools); end. diff --git a/test/codetoolstests/testcfgscript.pas b/components/codetools/tests/testcfgscript.pas similarity index 98% rename from test/codetoolstests/testcfgscript.pas rename to components/codetools/tests/testcfgscript.pas index 84784d5fcc..14296ebad4 100644 --- a/test/codetoolstests/testcfgscript.pas +++ b/components/codetools/tests/testcfgscript.pas @@ -135,7 +135,7 @@ begin end; initialization - AddToCodetoolsTestSuite(TTestCodetoolsCfgScript); + AddToNonPascalTestSuite(TTestCodetoolsCfgScript); end. diff --git a/components/codetools/tests/testcodetools.lpi b/components/codetools/tests/testcodetools.lpi index a1c13a45fd..61fb1c05a0 100644 --- a/components/codetools/tests/testcodetools.lpi +++ b/components/codetools/tests/testcodetools.lpi @@ -16,9 +16,6 @@ - - - @@ -40,7 +37,7 @@ - + @@ -91,6 +88,11 @@ + + + + + diff --git a/components/codetools/tests/testcodetools.lpr b/components/codetools/tests/testcodetools.lpr index f616ccc441..df68e87938 100644 --- a/components/codetools/tests/testcodetools.lpr +++ b/components/codetools/tests/testcodetools.lpr @@ -20,8 +20,14 @@ program testcodetools; {$mode objfpc}{$H+} uses - Classes, sysutils, consoletestrunner, dom, fpcunit, CodeToolManager, - CodeToolsConfig, LazLogger, finddeclarationtests, RefactoringTests, + Classes, sysutils, consoletestrunner, dom, fpcunit, LazLogger, + CodeToolManager, CodeToolsConfig, + testglobals, + TestBasicCodetools, TestCTRangeScan, TestMethodJumpTool, TestStdCodetools, + FindDeclarationTests, TestCompleteBlock, RefactoringTests, + // non Pascal + TestCfgScript, TestCTH2Pas, TestCTXMLFixFragments, + // compile test files to make sure they are valid Pascal fdt_classhelper, {$IF FPC_FULLVERSION >= 30101} fdt_typehelper, diff --git a/test/codetoolstests/testcompleteblock.pas b/components/codetools/tests/testcompleteblock.pas similarity index 99% rename from test/codetoolstests/testcompleteblock.pas rename to components/codetools/tests/testcompleteblock.pas index c0718985c0..da9cce39d7 100644 --- a/test/codetoolstests/testcompleteblock.pas +++ b/components/codetools/tests/testcompleteblock.pas @@ -418,7 +418,7 @@ begin end; initialization - AddToCodetoolsTestSuite(TTestCodetoolsCompleteBlock); + AddToRefactoringTestSuite(TTestCodetoolsCompleteBlock); end. diff --git a/test/codetoolstests/testcth2pas.pas b/components/codetools/tests/testcth2pas.pas similarity index 99% rename from test/codetoolstests/testcth2pas.pas rename to components/codetools/tests/testcth2pas.pas index 39884088f6..eb3e313f40 100644 --- a/test/codetoolstests/testcth2pas.pas +++ b/components/codetools/tests/testcth2pas.pas @@ -277,7 +277,7 @@ begin end; initialization - AddToCodetoolsTestSuite(TTestCodetoolsH2Pas); + AddToNonPascalTestSuite(TTestCodetoolsH2Pas); end. diff --git a/test/codetoolstests/testctrangescan.pas b/components/codetools/tests/testctrangescan.pas similarity index 99% rename from test/codetoolstests/testctrangescan.pas rename to components/codetools/tests/testctrangescan.pas index 322445f3bc..97b13657c5 100644 --- a/test/codetoolstests/testctrangescan.pas +++ b/components/codetools/tests/testctrangescan.pas @@ -392,7 +392,7 @@ begin end; initialization - AddToCodetoolsTestSuite(TTestCodetoolsRangeScan); + AddToFindDeclarationTestSuite(TTestCodetoolsRangeScan); end. diff --git a/test/codetoolstests/testctxmlfixfragments.pas b/components/codetools/tests/testctxmlfixfragments.pas similarity index 98% rename from test/codetoolstests/testctxmlfixfragments.pas rename to components/codetools/tests/testctxmlfixfragments.pas index 8a3e446b9c..038cca530c 100644 --- a/test/codetoolstests/testctxmlfixfragments.pas +++ b/components/codetools/tests/testctxmlfixfragments.pas @@ -123,7 +123,7 @@ begin end; initialization - AddToCodetoolsTestSuite(TTestCTXMLFixFragment); + AddToNonPascalTestSuite(TTestCTXMLFixFragment); end. diff --git a/test/codetoolstests/testmethodjumptool.pas b/components/codetools/tests/testmethodjumptool.pas similarity index 98% rename from test/codetoolstests/testmethodjumptool.pas rename to components/codetools/tests/testmethodjumptool.pas index 724b6ebc5e..15cdbeab8f 100644 --- a/test/codetoolstests/testmethodjumptool.pas +++ b/components/codetools/tests/testmethodjumptool.pas @@ -120,7 +120,7 @@ begin end; initialization - AddToCodetoolsTestSuite(TTestCTMethodJumpTool); + AddToStdToolsTestSuite(TTestCTMethodJumpTool); end. diff --git a/test/codetoolstests/teststdcodetools.pas b/components/codetools/tests/teststdcodetools.pas similarity index 99% rename from test/codetoolstests/teststdcodetools.pas rename to components/codetools/tests/teststdcodetools.pas index 308825f64d..6141aa6279 100644 --- a/test/codetoolstests/teststdcodetools.pas +++ b/components/codetools/tests/teststdcodetools.pas @@ -197,7 +197,7 @@ begin end; initialization - AddToCodetoolsTestSuite(TTestCTStdCodetools); + AddToStdToolsTestSuite(TTestCTStdCodetools); end. diff --git a/test/runtests.lpr b/test/runtests.lpr index 2ec00b0c3e..92825dc20f 100644 --- a/test/runtests.lpr +++ b/test/runtests.lpr @@ -25,7 +25,7 @@ uses testglobals, testunits, dom, {Unit needed to set the LCL version and widget set name} LCLVersion, InterfaceBase, Interfaces, TestLazXML, TestAvgLvlTree, - TestMethodJumpTool, TestLConvEncoding; + TestLConvEncoding; type diff --git a/test/testglobals.pas b/test/testglobals.pas index 453f053e6c..c7acd5a2e3 100644 --- a/test/testglobals.pas +++ b/test/testglobals.pas @@ -30,7 +30,6 @@ var PrimaryConfigPath: string; BugsTestSuite: TTestSuite; LazUtilsTestSuite: TTestSuite; - CodetoolsTestSuite: TTestSuite; LCLTestSuite: TTestSuite; IDEIntfTestSuite: TTestSuite; SemiAutoTestSuite: TTestSuite; @@ -40,7 +39,6 @@ function ReadOutput(AProcess:TProcess): TStringList; procedure AddToBugsTestSuite(ATest: TTest); procedure AddToLazUtilsTestSuite(ATestClass: TClass); -procedure AddToCodetoolsTestSuite(ATestClass: TClass); procedure AddToLCLTestSuite(ATestClass: TClass); procedure AddToIDEIntfTestSuite(ATestClass: TClass); procedure AddToSemiAutoTestSuite(ATestClass: TClass); @@ -106,11 +104,6 @@ begin LazUtilsTestSuite.AddTestSuiteFromClass(ATestClass); end; -procedure AddToCodetoolsTestSuite(ATestClass: TClass); -begin - CodetoolsTestSuite.AddTestSuiteFromClass(ATestClass); -end; - procedure AddToLCLTestSuite(ATestClass: TClass); begin LCLTestSuite.AddTestSuiteFromClass(ATestClass); @@ -132,8 +125,6 @@ initialization GetTestRegistry.AddTest(BugsTestSuite); LazUtilsTestSuite := TTestSuite.Create('LazUtils tests'); GetTestRegistry.AddTest(LazUtilsTestSuite); - CodetoolsTestSuite := TTestSuite.Create('Codetools tests'); - GetTestRegistry.AddTest(CodetoolsTestSuite); LCLTestSuite := TTestSuite.Create('LCL tests'); GetTestRegistry.AddTest(LCLTestSuite); IDEIntfTestSuite := TTestSuite.Create('IDEIntf tests'); diff --git a/test/testunits.pas b/test/testunits.pas index 4d507b5896..06e14dc34d 100644 --- a/test/testunits.pas +++ b/test/testunits.pas @@ -31,9 +31,6 @@ uses bug8432, testfileutil, testfileproc, // lazutils TestLazUtils, TestLazUTF8, TestLConvEncoding, TestAvgLvlTree, - // codetools - TestBasicCodetools, TestCTXMLFixFragments, TestCTRangeScan, TestCTH2Pas, - TestCompleteBlock, TestStdCodetools, TestMethodJumpTool, TestCfgScript, // lcltests testunicode, testpen, TestPreferredSize, TestTextStrings {$IFNDEF NoSemiAutomatedTests}