[r3046]: test / releases / 3.1.2 / tests / oorexxunit / ooRexx / base / ooRexx.Base.runTests Maximize Restore History

Download this file

ooRexx.Base.runTests    88 lines (75 with data), 5.5 kB

#!/usr/bin/rexx
/*
   name:             ooRexx.Base.runTests
   author:           Rony G. Flatscher
   date:             2005-08-07
   version:          0.0.6

   changed:          2005-08-21, ---rgf, changed logic, offloaded creation of standard testSuite
                     2005-08-30, ---rgf, added determination of slashes, if using subdirs in
                                         "testCaseFileList"
                     2005-10-09, ---rgf, reflect renaming from ".String." to ".BIF." testcase
                     2006-11-08, ---rgf, corrected "!slash!" assignment thanks to Rene V. Jansen
                     2006-11-28, ---rgf, added new testUnits

   license:          CPL 1.0 (Common Public License v1.0, see below)

   languageLevel:    6.0
   purpose:          Load all ooRexx-base testUnits and run all the tests contained therein.

   remark:           Serves as an example of how to use and drive the ooRexxUnit framework

   category:
*/
/*----------------------------------------------------------------------------*/
/*                                                                            */
/* Copyright (c) 2005 Rexx Language Association. All rights reserved.         */
/*                                                                            */
/* This program and the accompanying materials are made available under       */
/* the terms of the Common Public License v1.0 which accompanies this         */
/* distribution. A copy is also available at the following address:           */
/* http://www.oorexx.org/license.html                                         */
/*                                                                            */
/* Redistribution and use in source and binary forms, with or                 */
/* without modification, are permitted provided that the following            */
/* conditions are met:                                                        */
/*                                                                            */
/* Redistributions of source code must retain the above copyright             */
/* notice, this list of conditions and the following disclaimer.              */
/* Redistributions in binary form must reproduce the above copyright          */
/* notice, this list of conditions and the following disclaimer in            */
/* the documentation and/or other materials provided with the distribution.   */
/*                                                                            */
/* Neither the name of Rexx Language Association nor the names                */
/* of its contributors may be used to endorse or promote products             */
/* derived from this software without specific prior written permission.      */
/*                                                                            */
/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS        */
/* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT          */
/* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS          */
/* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT   */
/* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,      */
/* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED   */
/* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,        */
/* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY     */
/* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING    */
/* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS         */
/* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.               */
/*                                                                            */
/*----------------------------------------------------------------------------*/


   -- determine directory separator (maybe needed for "testCaseFileList" below)
if pos(left(sysVersion(),1)~translate, "WO")>0 then !slash!="\"   -- Windows, OS2
                                               else !slash!="/"

   -- define a list of filenames containing testCase classes to be used
testCaseFileList = .list~of(                                                            -
                             "ooRexx.Base.BIF.testUnit"                               , -
                             "ooRexx.Base.PARSE.testUnit"                             , -
                             "ooRexx.Base.RAISE.testUnit"                             , -
                             "ooRexx.Base.RESULT_RC_SIGL.testUnit"                    , -
                             "ooRexx.Base.SAY.testUnit"                               , -
                             "class"!slash!"ooRexx.Base.Class.CircularQueue.testUnit" , -
                             "class"!slash!"ooRexx.Base.Class.Class.testUnit"         , -
                             "class"!slash!"ooRexx.Base.Class.Queue.testUnit"         , -
                             "class"!slash!"ooRexx.Base.Class.String.testUnit"        , -
                                                                                        -
                            )

ts=makeTestSuiteFromFileList(testCaseFileList)  -- create the testSuite object
tr=ts~run   -- run all the tests in the testSuite, retrieve the testResult object

            -- show brief results
call simpleDumpTestResults tr, "ooRexx..runTests (run all of the base testUnit tests)"

::requires ooRexxUnit.cls