From: <mie...@us...> - 2008-09-12 12:29:46
|
Revision: 3288 http://oorexx.svn.sourceforge.net/oorexx/?rev=3288&view=rev Author: miesfeld Date: 2008-09-12 12:29:57 +0000 (Fri, 12 Sep 2008) Log Message: ----------- ooTest - Start using 4.0.0 constructs in the framework Modified Paths: -------------- test/trunk/ooTest.frm Modified: test/trunk/ooTest.frm =================================================================== --- test/trunk/ooTest.frm 2008-09-12 12:23:07 UTC (rev 3287) +++ test/trunk/ooTest.frm 2008-09-12 12:29:57 UTC (rev 3288) @@ -211,28 +211,19 @@ \* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/ ::class 'ooTestConstants' public mixinclass Object - ::method TEST_ROOT class; return "ooRexx" - ::method TEST_ROOT; return "ooRexx" + ::constant TEST_ROOT "ooRexx" + ::constant TEST_CONTAINER_EXT ".testGroup" - ::method TEST_CONTAINER_EXT class; return ".testGroup" - ::method TEST_CONTAINER_EXT; return ".testGroup" - -- .nil signals no restriction on test types. ::method TEST_TYPES_DEFAULT class; return .nil ::method TEST_TYPES_DEFAULT; return .nil - ::method TEST_SUCCESS_RC class; return 0 - ::method TEST_SUCCESS_RC; return 0 - ::method TEST_HELP_RC class; return 1 - ::method TEST_HELP_RC; return 1 - ::method TEST_FAILURES_RC class; return 2 - ::method TEST_FAILURES_RC; return 2 - ::method TEST_ERRORS_RC class; return 3 - ::method TEST_ERRORS_RC; return 3 - ::method TEST_NO_TESTS_RC class; return 4 - ::method TEST_NO_TESTS_RC; return 4 - ::method TEST_BADARGS_RC class; return 5 - ::method TEST_BADARGS_RC; return 5 + ::constant TEST_SUCCESS_RC 0 + ::constant TEST_HELP_RC 1 + ::constant TEST_FAILURES_RC 2 + ::constant TEST_ERRORS_RC 3 + ::constant TEST_NO_TESTS_RC 4 + ::constant TEST_BADARGS_RC 5 -- SL (back SLash or forward SLash) abbreviation for the directory separator. ::method SL class; return .ooRexxUnit.directory.separator @@ -1874,25 +1865,18 @@ ::class 'NotificationTypes' mixinclass Object - /* Would prefer to use the CONSTANT directive */ - ::method MIN_TYPE class; return 1 - ::method MIN_TYPE; return 1 - ::method SKIP_TYPE class; return 1 - ::method WARN_TYPE class; return 2 - ::method TEXT_TYPE class; return 3 - ::method STEP_TYPE class; return 4 - ::method STATS_TYPE class; return 5 - ::method SKIP_TYPE; return 1 - ::method WARN_TYPE; return 2 - ::method TEXT_TYPE; return 3 - ::method STEP_TYPE; return 4 - ::method STATS_TYPE; return 5 + ::constant MIN_TYPE 1 - ::method MAX_TYPE class; return 5 - ::method MAX_TYPE; return 5 + ::constant SKIP_TYPE 1 + ::constant WARN_TYPE 2 + ::constant TEXT_TYPE 3 + ::constant STEP_TYPE 4 + ::constant STATS_TYPE 5 + ::constant MAX_TYPE 5 + /* class: Notification - - - - - - - - - - - - - - - - - - - - - - - - - - - -*\ A data object containing information concerning status, events, or other @@ -1955,20 +1939,14 @@ \* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/ ::class 'PhaseReport' public subclass Notification - ::method MIN_PHASE class; return 1 - ::method MIN_PHASE; return 1 + ::constant MIN_PHASE 1 - ::method AUTOMATED_TEST_PHASE class; return 1 - ::method FILE_SEARCH_PHASE class; return 2 - ::method SUITE_BUILD_PHASE class; return 3 - ::method TEST_EXECUTION_PHASE class; return 4 - ::method AUTOMATED_TEST_PHASE; return 1 - ::method FILE_SEARCH_PHASE; return 2 - ::method SUITE_BUILD_PHASE; return 3 - ::method TEST_EXECUTION_PHASE; return 4 + ::constant AUTOMATED_TEST_PHASE 1 + ::constant FILE_SEARCH_PHASE 2 + ::constant SUITE_BUILD_PHASE 3 + ::constant TEST_EXECUTION_PHASE 4 - ::method MAX_PHASE class; return 4 - ::method MAX_PHASE; return 4 + ::constant MAX_PHASE 4 ::attribute begin get ::attribute begin set private This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mie...@us...> - 2008-09-22 02:26:08
|
Revision: 3373 http://oorexx.svn.sourceforge.net/oorexx/?rev=3373&view=rev Author: miesfeld Date: 2008-09-22 02:26:05 +0000 (Mon, 22 Sep 2008) Log Message: ----------- ooTest - remove unused function Modified Paths: -------------- test/trunk/ooTest.frm Modified: test/trunk/ooTest.frm =================================================================== --- test/trunk/ooTest.frm 2008-09-21 23:40:03 UTC (rev 3372) +++ test/trunk/ooTest.frm 2008-09-22 02:26:05 UTC (rev 3373) @@ -2176,34 +2176,3 @@ return self~message -- End of class: PhaseReport - - -/** printTestInfo() - * - * Debugging method to print out the information in the TestInfo class attribute - * of a TestCase class. Curious as to how useful this information is. - * - */ -::routine printTestInfo public - use arg metaData - - itr = metaData~supplier - do while itr~available - keyword = itr~index || ":" - data = itr~item - - if \ data~isA(.queue) then do - say keyword~left(18) data - end - else do - say - say keyword - do line over data - say line - end - say - end - itr~next - end -return 0 --- End printTestInfo() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mie...@us...> - 2008-10-30 04:11:38
|
Revision: 3636 http://oorexx.svn.sourceforge.net/oorexx/?rev=3636&view=rev Author: miesfeld Date: 2008-10-30 04:11:34 +0000 (Thu, 30 Oct 2008) Log Message: ----------- ooTest - On AIX, see if augmenting the LIBPATH allows the external libraries to be found during test execution. Modified Paths: -------------- test/trunk/ooTest.frm Modified: test/trunk/ooTest.frm =================================================================== --- test/trunk/ooTest.frm 2008-10-29 23:32:06 UTC (rev 3635) +++ test/trunk/ooTest.frm 2008-10-30 04:11:34 UTC (rev 3636) @@ -142,17 +142,31 @@ ::routine setExternalLibDir os = .ooRexxUnit.osName + sl = .ooRexxUnit.directory.separator + sep = .ooRexxUnit.path.separator - if os == "WINDOWS" then do - libDir = .ooTest.dir || '\bin\'os - j = addToPath(libDir) - end - else do - curLDPath = getEnvValue("LD_LIBRARY_PATH") - libDir = .ooTest.dir || '/bin/'os || .ooRexxUnit.path.separator || curLDPath + libDir = .ooTest.dir || sl || 'bin' || sl || os - j = replaceEnvValue("LD_LIBRARY_PATH", libDir) + select + when os == "WINDOWS" then do + j = addToPath(libDir) + end + when os == 'AIX' then do + curLibPath = getEnvValue("LIBPATH") + libDir = libDir || sep || curLibPath + j = replaceEnvValue("LIBPATH", libDir) + end + when os == 'LINUX' then do + curLDPath = getEnvValue("LD_LIBRARY_PATH") + libDir = libDir || sep || curLDPath + j = replaceEnvValue("LD_LIBRARY_PATH", libDir) + end + otherwise do + say 'ooTest.frm::routine::setExternalDir() line:' .line + say ' Need code for operating system:' os + end end + -- End select return 0 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mie...@us...> - 2008-11-16 19:11:03
|
Revision: 3699 http://oorexx.svn.sourceforge.net/oorexx/?rev=3699&view=rev Author: miesfeld Date: 2008-11-16 19:11:00 +0000 (Sun, 16 Nov 2008) Log Message: ----------- ooTest - What started as an external library directory, can now contain executables. Be sure it is added to the path on all operating systems. Modified Paths: -------------- test/trunk/ooTest.frm Modified: test/trunk/ooTest.frm =================================================================== --- test/trunk/ooTest.frm 2008-11-16 18:06:12 UTC (rev 3698) +++ test/trunk/ooTest.frm 2008-11-16 19:11:00 UTC (rev 3699) @@ -67,7 +67,8 @@ if \ .local~hasEntry(ooTest.originalWorkingDir) then .local~ooTest.originalWorkingDir = directory() - -- Set up the external library path + -- Set up the external library path. Although this is a bit of a misnomer, + -- the external directory may also have regular executables in it. j = setExternalLibDir() end @@ -147,9 +148,14 @@ libDir = .ooTest.dir || sl || 'bin' || sl || os + -- libDir may / will also contain executables. So add it to the path for all + -- OSes. + j = addToPath(libDir) + select when os == "WINDOWS" then do - j = addToPath(libDir) + -- Don't currently need to do anything else here. + nop end when os == 'AIX' then do curLibPath = getEnvValue("LIBPATH") This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mie...@us...> - 2009-02-23 00:23:09
|
Revision: 4209 http://oorexx.svn.sourceforge.net/oorexx/?rev=4209&view=rev Author: miesfeld Date: 2009-02-23 00:23:06 +0000 (Mon, 23 Feb 2009) Log Message: ----------- ooTest - Fix concurrency problem in the framework. Things only worked previously because ::attributes were not honoring the guarded state. When the bug was fixed, it turned up a logic error in the concurrency design. Modified Paths: -------------- test/trunk/ooTest.frm Modified: test/trunk/ooTest.frm =================================================================== --- test/trunk/ooTest.frm 2009-02-22 15:19:15 UTC (rev 4208) +++ test/trunk/ooTest.frm 2009-02-23 00:23:06 UTC (rev 4209) @@ -2109,8 +2109,8 @@ ::attribute id get ::attribute id set private - ::attribute isTicking private - ::attribute endTicking private + ::attribute isTicking private unguarded + ::attribute endTicking private unguarded ::method init use strict arg file, id This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mie...@us...> - 2009-03-02 21:29:39
|
Revision: 4246 http://oorexx.svn.sourceforge.net/oorexx/?rev=4246&view=rev Author: miesfeld Date: 2009-03-02 21:29:29 +0000 (Mon, 02 Mar 2009) Log Message: ----------- ooTest - print the addressing mode with the test results Modified Paths: -------------- test/trunk/ooTest.frm Modified: test/trunk/ooTest.frm =================================================================== --- test/trunk/ooTest.frm 2009-03-02 19:25:27 UTC (rev 4245) +++ test/trunk/ooTest.frm 2009-03-02 21:29:29 UTC (rev 4246) @@ -681,8 +681,9 @@ verbose = self~getVerbosity say - say "Interpreter:" self~rexxVersion - say "ooRexxUnit: " self~unitVersion '09'x || "ooTest:" self~ooTestVersion + say "Interpreter: " self~rexxVersion + say 'Addressing Mode:' .ooRexxUnit.architecture + say "ooRexxUnit: " self~unitVersion '09'x || "ooTest:" self~ooTestVersion say say "Tests ran:"~left(20) stats~tests say "Assertions:"~left(20) stats~asserts This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mie...@us...> - 2009-05-19 05:11:01
|
Revision: 4707 http://oorexx.svn.sourceforge.net/oorexx/?rev=4707&view=rev Author: miesfeld Date: 2009-05-19 05:10:53 +0000 (Tue, 19 May 2009) Log Message: ----------- ooTest - Use the constant directive instead of my 3.2.0 makeshift constants. Modified Paths: -------------- test/trunk/ooTest.frm Modified: test/trunk/ooTest.frm =================================================================== --- test/trunk/ooTest.frm 2009-05-19 03:15:45 UTC (rev 4706) +++ test/trunk/ooTest.frm 2009-05-19 05:10:53 UTC (rev 4707) @@ -261,48 +261,34 @@ \* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/ ::class 'ooTestTypes' public mixinclass Object - ::method MIN_TEST_TYPE class; return 1 - ::method MIN_TEST_TYPE; return 1 + ::constant MIN_TEST_TYPE 1 - ::method UNIT_TEST class; return 1 - ::method UNIT_TEST; return 1 - ::method DEFAULT_TEST class; return 1 - ::method DEFAULT_TEST; return 1 + ::constant UNIT_TEST 1 + ::constant DEFAULT_TEST 1 - ::method UNIT_LONG_TEST class; return 2 - ::method UNIT_LONG_TEST; return 2 - ::method SAMPLE_TEST class; return 3 - ::method SAMPLE_TEST; return 3 - ::method GUI_TEST class; return 4 - ::method GUI_TEST; return 4 - ::method GUI_SAMPLE_TEST class; return 5 - ::method GUI_SAMPLE_TEST; return 5 - ::method OLE_TEST class; return 6 - ::method OLE_TEST; return 6 - ::method DOC_EXAMPLE_TEST class; return 7 - ::method DOC_EXAMPLE_TEST; return 7 + ::constant UNIT_LONG_TEST 2 + ::constant SAMPLE_TEST 3 + ::constant GUI_TEST 4 + ::constant GUI_SAMPLE_TEST 5 + ::constant OLE_TEST 6 + ::constant DOC_EXAMPLE_TEST 7 -- A test type that makes noise. I frequently need to run the test suite in -- an environment where I need these types of test cases to be skipped. This -- is a convenience for myself (Mark Miesfeld.) - ::method DOC_EXAMPLE_NOISE_TEST class; return 8 - ::method DOC_EXAMPLE_NOISE_TEST; return 8 + ::constant DOC_EXAMPLE_NOISE_TEST 8 -- A test type for the ooTest framework examples. - ::method FRAMEWORK_EXAMPLE_TEST class; return 9 - ::method FRAMEWORK_EXAMPLE_TEST; return 9 + ::constant FRAMEWORK_EXAMPLE_TEST 9 -- A test type for the ooRexx APIs. - ::method NATIVE_API_TEST class; return 10 - ::method NATIVE_API_TEST; return 10 + ::constant NATIVE_API_TEST 10 -- A test type involving TCPIP, smtp, ftp, for example, where the test might -- need some special set up. Like a ftp server, mail server, etc.. - ::method TCPIP_TEST class; return 11 - ::method TCPIP_TEST; return 11 + ::constant TCPIP_TEST 11 - ::method MAX_TEST_TYPE class; return 11 - ::method MAX_TEST_TYPE; return 11 + ::constant MAX_TEST_TYPE 11 /** defaultTestSet() * Returns the set of tests that are always run. Any test type in this set @@ -430,7 +416,7 @@ name = itr~index if name~right(5) == "_TEST" then do name = name~left(name~length - 5) - number = itr~item~source[1]~word(2) + number = self~send(itr~index) n = name~lower(2) names~setEntry(name, number) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mie...@us...> - 2009-06-22 03:14:34
|
Revision: 4825 http://oorexx.svn.sourceforge.net/oorexx/?rev=4825&view=rev Author: miesfeld Date: 2009-06-22 02:07:15 +0000 (Mon, 22 Jun 2009) Log Message: ----------- ooTest - Remove some debugging, fix a minor bug. Modified Paths: -------------- test/trunk/ooTest.frm Modified: test/trunk/ooTest.frm =================================================================== --- test/trunk/ooTest.frm 2009-06-22 00:53:53 UTC (rev 4824) +++ test/trunk/ooTest.frm 2009-06-22 02:07:15 UTC (rev 4825) @@ -1886,6 +1886,8 @@ expose extension sl use strict arg name + correctName = name + p = name~lastPos(sl) if p <> 0 then do correctName = name~right(name~length - p) @@ -1898,7 +1900,7 @@ if correctName~countStr('.') > 1 then raise syntax 88.900 array('The file name "'name'" is improper') - return name + return correctName -- End getCorrectFileName() /** usePatterns() @@ -1937,7 +1939,6 @@ filePatterns~append(regularExpression) end else do pattern over patterns - say 'pattern:' pattern if \ pattern~isA(.string) then raise syntax 88.900 array("The file pattern must be a string object; found" pattern) @@ -1987,7 +1988,7 @@ end -- End select - say 're:' reg + return .RegularExpression~new(reg) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mie...@us...> - 2009-06-22 18:35:32
|
Revision: 4833 http://oorexx.svn.sourceforge.net/oorexx/?rev=4833&view=rev Author: miesfeld Date: 2009-06-22 18:32:50 +0000 (Mon, 22 Jun 2009) Log Message: ----------- Fix spelling error Modified Paths: -------------- test/trunk/ooTest.frm Modified: test/trunk/ooTest.frm =================================================================== --- test/trunk/ooTest.frm 2009-06-22 17:53:57 UTC (rev 4832) +++ test/trunk/ooTest.frm 2009-06-22 18:32:50 UTC (rev 4833) @@ -1895,7 +1895,7 @@ raise syntax 88.900 array('The file name "'name'" is improper') end - if correctName~right(extension~length) \== extenison then correctName = correctName || extension + if correctName~right(extension~length) \== extension then correctName = correctName || extension if correctName~countStr('.') > 1 then raise syntax 88.900 array('The file name "'name'" is improper') This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mie...@us...> - 2009-07-20 19:19:41
|
Revision: 4960 http://oorexx.svn.sourceforge.net/oorexx/?rev=4960&view=rev Author: miesfeld Date: 2009-07-20 19:19:38 +0000 (Mon, 20 Jul 2009) Log Message: ----------- ooTest - The idea behind test types is to easily run subsets of the test suite. Originally, I thought each test group file would only contain tests of the same test type, and used a .Table to hold test case classes, indexed by the test type. This turns out to be to restrictive. Use a .Relation instead of a .Table and allow test groups to contain test case classes of different test types. Modified Paths: -------------- test/trunk/ooTest.frm Modified: test/trunk/ooTest.frm =================================================================== --- test/trunk/ooTest.frm 2009-07-20 19:04:30 UTC (rev 4959) +++ test/trunk/ooTest.frm 2009-07-20 19:19:38 UTC (rev 4960) @@ -1229,9 +1229,9 @@ if data == .nil then raise syntax 88.917 array ("1 'fileSpec'", "TestGroup metadata format invalid. File:" fileSpec) - self~tests = .table~new - self~testsWithSuite = .table~new - self~testCollections = .table~new + self~tests = .relation~new + self~testsWithSuite = .relation~new + self~testCollections = .relation~new self~hasTests = .false self~testCount = 0 self~mustNotExecute = .false @@ -1364,9 +1364,6 @@ if \ isSubClassOf(test, "ooTestCase") then raise syntax 88.917 array ("1 'test'", "must be a subclass of the ooTestCase class. Found:" test) - if tests~hasIndex(test~ooTestType) then - raise syntax 88.917 array ("1 'test'", "is a test type ("test~ooTestType") already contained by this test group.") - test~testCaseInfo = self~testInfo tests[test~ooTestType] = test self~currentTypes~put(test~ooTestType) @@ -1399,9 +1396,6 @@ if \ isSubClassOf(suite, "ooTestSuite") then raise syntax 88.917 array ("2 'suite'", "must be a subclass of the ooTestSuite class. Found:" suite) - if testsWithSuite~hasIndex(test~ooTestType) then - raise syntax 88.917 array ("1 'test'", "is a test type ("test~ooTestType") already contained by this test group.") - test~testCaseInfo = self~testInfo testsWithSuite[test~ooTestType] = .TestWithSuite~new(test, suite) self~currentTypes~put(test~ooTestType) @@ -1453,9 +1447,6 @@ if \ isSubClassOf(suite, "ooTestSuite") then raise syntax 88.917 array ("3 'suite'", "if used, must be a subclass of the ooTestSuite class. Found:" suite) - if testCollections~hasIndex(test~ooTestType) then - raise syntax 88.917 array ("1 'test'", "is a test type ("test~ooTestType") already contained by this test group.") - test~testCaseInfo = self~testInfo testCollections[test~ooTestType] = .TestWithSuiteAndNames~new(test, methods, suite) self~currentTypes~put(test~ooTestType) @@ -1534,22 +1525,22 @@ if testTypes~items == 0 then return testSuite do t over testTypes - testClass = tests[t] - if testClass <> .nil then do + testClasses = tests~allAt(t) + if testClasses <> .nil then do testClass over testClasses suite = .ooTestSuite~new(testClass) suite~definedInFile = self~pathName testSuite~addTest(suite) end - obj = testsWithSuite[t] - if obj <> .nil then do + objects = testsWithSuite~allAt(t) + if objects <> .nil then do obj over objects suite = obj~getSuite suite~definedInFile = self~pathName testSuite~addTest(suite) end - obj = testCollections[t] - if obj <> .nil then do + objects = testCollections~allAt(t) + if objects <> .nil then do obj over objects suite = obj~getSuite suite~definedInFile = self~pathName testSuite~addTest(suite) @@ -1603,8 +1594,8 @@ end else do do t over testTypes - testClass = tests[t] - if testClass <> .nil then do + testClasses = tests~allAt(t) + if testClasses <> .nil then do testClass over testClasses suite = self~constructSuiteWithTestCases(testClass, testCases) if suite == .nil then iterate @@ -1612,8 +1603,8 @@ testSuite~addTest(suite) end - obj = testsWithSuite[t] - if obj <> .nil then do + objects = testsWithSuite~allAt(t) + if objects <> .nil then do obj over objects suite = obj~getSuiteForTestCases(testCases) if suite == .nil then iterate @@ -1621,8 +1612,8 @@ testSuite~addTest(suite) end - obj = testCollections[t] - if obj <> .nil then do + objects = testCollections~allAt(t) + if objects <> .nil then do obj over objects suite = obj~getSuiteForTestCases(testCases) if suite == .nil then iterate This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |