From: Ron F. <ro...@us...> - 2004-11-29 16:57:57
|
Update of /cvsroot/nsclspectcl/SpecTcl/contrib/calibratedparams/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30096/contrib/calibratedparams/tests Modified Files: Tag: 5.1 Asserts.h CommandTest.cpp CreatorTest.cpp FactoryTest.cpp FitTest.cpp Makefile MySpecTclApp.cpp MySpecTclApp.h TestRunner.cpp TestSuite.cpp Added Files: Tag: 5.1 CalibManagerTest.cpp CalibParamTest.cpp Prompt.test all.tcl Log Message: Begin port to 3.x compilers calling this 3.0 Index: Makefile =================================================================== RCS file: /cvsroot/nsclspectcl/SpecTcl/contrib/calibratedparams/tests/Makefile,v retrieving revision 1.2 retrieving revision 5.1 diff -C2 -d -r1.2 -r5.1 *** Makefile 6 Aug 2004 13:40:30 -0000 1.2 --- Makefile 29 Nov 2004 16:56:38 -0000 5.1 *************** *** 3,7 **** CXX=g++-2.95 CXXFLAGS= -g -c -ggdb -I.. -I$(INSTALLEDDIR)/include \ ! -I/usr/include/tcl8.4 -D_DEBUG LDFLAGS=-L/usr/X11R6/lib -L$(INSTALLEDDIR)/lib \ --- 3,8 ---- CXX=g++-2.95 CXXFLAGS= -g -c -ggdb -I.. -I$(INSTALLEDDIR)/include \ ! -I/usr/include/tcl8.4 -D_DEBUG -DCHECK_ALL \ ! -DDESIGN_BY_CONTRACT LDFLAGS=-L/usr/X11R6/lib -L$(INSTALLEDDIR)/lib \ *************** *** 12,19 **** ! TESTS= CommandTest.o FitTest.o CreatorTest.o FactoryTest.o TARGETS= ../CFit.o ../CLinearFit.o \ ../CFitCreator.o ../CLinearFitCreator.o \ ! ../CFitFactory.o ../CFitCommand.o system: unittests integration --- 13,23 ---- ! TESTS= CommandTest.o FitTest.o CreatorTest.o FactoryTest.o CalibParamTest.o \ ! CalibManagerTest.o TARGETS= ../CFit.o ../CLinearFit.o \ ../CFitCreator.o ../CLinearFitCreator.o \ ! ../CFitFactory.o ../CFitCommand.o \ ! ../CCalibratedParameter.o ../../../Events/Event.o \ ! ../CCalibratedParameterManager.o ../../../SpecTcl/EventProcessor.o system: unittests integration *************** *** 25,31 **** -lcppunit -ltclPlus -lException $(LDFLAGS) integration: $(TARGETS) MySpecTclApp.o ! $(CXX) -o SpecTcl MySpecTclApp.o $(TARGETS) \ -lTclGrammerCommands \ -lSorting -lXplus -lGates -lAnalysis -lEventSource -lSpecio \ --- 29,92 ---- -lcppunit -ltclPlus -lException $(LDFLAGS) + # + # Can't put ccalibratedparametercommand in targets or else it'll drag + # in most of spectcl. + # + integration: $(TARGETS) MySpecTclApp.o + $(CXX) -o SpecTcl MySpecTclApp.o $(TARGETS)\ + ../CCalibratedParameterCommand.o \ + -lTclGrammerCommands \ + -lSorting -lXplus -lGates -lAnalysis -lEventSource -lSpecio \ + -ltclPlus -lException \ + -lXamine -ltape -lFilter \ + $(LDFLAGS) + + + depend: + makedepend *.cpp + + clean: + rm -f *.o tests + + + test: tests + INSTALLEDDIR=/scratch/fox/SpecTcl/2.2test + + CXX=g++-2.95 + CXXFLAGS= -g -c -ggdb -I.. -I$(INSTALLEDDIR)/include \ + -I/usr/include/tcl8.4 -D_DEBUG -DCHECK_ALL \ + -DDESIGN_BY_CONTRACT + + LDFLAGS=-L/usr/X11R6/lib -L$(INSTALLEDDIR)/lib \ + -Wl,"-rpath=$(INSTALLEDDIR)/lib" \ + -ltk -ltcl -lXt -lX11 -lgsl -lgslcblas -lm + .cpp.o: + $(CXX) $(CXXFLAGS) $< + + + TESTS= CommandTest.o FitTest.o CreatorTest.o FactoryTest.o CalibParamTest.o \ + CalibManagerTest.o + TARGETS= ../CFit.o ../CLinearFit.o \ + ../CFitCreator.o ../CLinearFitCreator.o \ + ../CFitFactory.o ../CFitCommand.o \ + ../CCalibratedParameter.o ../../../Events/Event.o \ + ../CCalibratedParameterManager.o ../../../SpecTcl/EventProcessor.o + + system: unittests integration + + unittests: TestRunner.o $(TESTS) $(TARGETS) + $(CXX) -o unittests TestRunner.o \ + $(TESTS) \ + $(TARGETS) \ + -lcppunit -ltclPlus -lException $(LDFLAGS) + + # + # Can't put ccalibratedparametercommand in targets or else it'll drag + # in most of spectcl. + # integration: $(TARGETS) MySpecTclApp.o ! $(CXX) -o SpecTcl MySpecTclApp.o $(TARGETS)\ ! ../CCalibratedParameterCommand.o \ -lTclGrammerCommands \ -lSorting -lXplus -lGates -lAnalysis -lEventSource -lSpecio \ --- NEW FILE: CalibManagerTest.cpp --- // Template for a test suite. #include <cppunit/extensions/HelperMacros.h> #include <cppunit/Asserter.h> #include "Asserts.h" #include <CCalibratedParameter.h> #include <CCalibratedParameterManager.h> #include <CLinearFit.h> #include <Event.h> #include <Analyzer.h> #include <BufferDecoder.h> #include <stdio.h> class CalibManager : public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(CalibManager); CPPUNIT_TEST(AddTest); CPPUNIT_TEST(DeleteTest); CPPUNIT_TEST(STLJacketTest); CPPUNIT_TEST(EvalTest); CPPUNIT_TEST_SUITE_END(); private: public: void setUp() { } void tearDown() { // empty out the manager: while (CCalibratedParameterManager::size()) { CCalibratedParameterManager::CalibratedParameterIterator i = CCalibratedParameterManager::begin(); string name = i->first; CCalibratedParameter* pParam = CCalibratedParameterManager::DeleteParameter(name); delete pParam; } } protected: void AddTest(); void DeleteTest(); void STLJacketTest(); void EvalTest(); }; CPPUNIT_TEST_SUITE_REGISTRATION(CalibManager); /* Test Name AddTest Test Objective Test ability to add calibrated parameters to the manager. Test Description 1. Create a pair of calibrated parameters 2. Check size of manager. 3. Add a parameter 4. Check size of manager 5. Find added parameter 6. Add second parameter 7. find first parameter 8. find second parameter 9. check size of manager. Expected Results 1. NA 2. SB 0 3. NA 4. SB 1 5. Should not be end and iterator.second should point to first parameter 6. NA 7. Should not be end and iterator.second should point to first parameter. 8. Should not be end and iterator.second should point to second parameter. 9. Should be 2. */ void CalibManager::AddTest() { // 1. Make the pair of parameters CLinearFit line1; CLinearFit::Point pt; pt.x = 0.0; pt.y = 0.1; line1.AddPoint(pt); pt.x = 1.0; pt.y = 2.2; line1.AddPoint(pt); line1.Perform(); CCalibratedParameter param1(1, 0, "line1", &line1); CLinearFit line2; pt.x = 0.0; pt.y = -1.0; line2.AddPoint(pt); pt.x = 5.0; pt.y = 15.0; line2.AddPoint(pt); line2.Perform(); CCalibratedParameter param2(2,4, "line2", &line2); // 2. Check size of manager: EQMSG("Initial size", (size_t)0, CCalibratedParameterManager::size()); // 3. Add the first parametrs: CCalibratedParameterManager::AddParameter("The First", new CCalibratedParameter(param1)); // 4. Check size: EQMSG("After first add", (size_t)1, CCalibratedParameterManager::size()); // 5. Check find: CCalibratedParameterManager::CalibratedParameterIterator i = CCalibratedParameterManager::FindParameter("The First"); ASSERT(i != CCalibratedParameterManager::end()); ASSERT(param1 == *(i->second)); // 6. Add second parameter: CCalibratedParameterManager::AddParameter("second one", new CCalibratedParameter(param2)); // 7. Re-find 1. i = CCalibratedParameterManager::FindParameter("The First"); ASSERT(i != CCalibratedParameterManager::end()); ASSERT(param1 == *(i->second)); // 8. Find 2: i = CCalibratedParameterManager::FindParameter("second one"); ASSERT(i != CCalibratedParameterManager::end()); ASSERT(param2 == *(i->second)); // Size sb. 2: EQMSG("Size = 2",(size_t)2, CCalibratedParameterManager::size()); } /*! Test Name DeleteTest Test Objective Test ability to delete a parameter. Test Description 1. Add 2 parameters as for prior test. 2. Check size. 3. Delete first parameter. 4. Check size 5. Find First 6. Find second. Expected Results 1. NA 2. 2 3. NA 4. 1 5. end() 6. not end, and *(i->second) == second parameter. */ void CalibManager::DeleteTest() { // 1. Make the pair of parameters and add them. CLinearFit line1; CLinearFit::Point pt; pt.x = 0.0; pt.y = 0.1; line1.AddPoint(pt); pt.x = 1.0; pt.y = 2.2; line1.AddPoint(pt); line1.Perform(); CCalibratedParameter param1(1, 0, "line1", &line1); CLinearFit line2; pt.x = 0.0; pt.y = -1.0; line2.AddPoint(pt); pt.x = 5.0; pt.y = 15.0; line2.AddPoint(pt); line2.Perform(); CCalibratedParameter param2(2,4, "line2", &line2); CCalibratedParameterManager::AddParameter("1", new CCalibratedParameter(param1)); CCalibratedParameterManager::AddParameter("2", new CCalibratedParameter(param2)); //2. Check size: EQMSG("Sizecheck2: ", (size_t)2, CCalibratedParameterManager::size()); // 3. delete first. CCalibratedParameter* p = CCalibratedParameterManager::DeleteParameter("1"); delete p; // 4. Size check: EQMSG("Sizecheck1: ", (size_t)1, CCalibratedParameterManager::size()); // 5. Find deleted: CCalibratedParameterManager::CalibratedParameterIterator i; i = CCalibratedParameterManager::FindParameter("1"); ASSERT(i == CCalibratedParameterManager::end()); // 6. Locate second one: i = CCalibratedParameterManager::FindParameter("2"); ASSERT(i != CCalibratedParameterManager::end()); ASSERT(param2 == *(i->second)); } /*! Test Name STLJacketTest - Test Objective Test STL Jackets esp. for begin() end() itertion. Test Description 1. Create a pair of parameters, and add them. 2. Iterate through the manager. Expected Results Both parameters should appear in the iteration exactly once.and the number of iterations should be 2. */ void CalibManager::STLJacketTest() { // 1. Make the pair of parameters and add them. CLinearFit line1; CLinearFit::Point pt; pt.x = 0.0; pt.y = 0.1; line1.AddPoint(pt); pt.x = 1.0; pt.y = 2.2; line1.AddPoint(pt); line1.Perform(); CCalibratedParameter param1(1, 0, "line1", &line1); CLinearFit line2; pt.x = 0.0; pt.y = -1.0; line2.AddPoint(pt); pt.x = 5.0; pt.y = 15.0; line2.AddPoint(pt); line2.Perform(); CCalibratedParameter param2(2,4, "line2", &line2); CCalibratedParameterManager::AddParameter("1", new CCalibratedParameter(param1)); CCalibratedParameterManager::AddParameter("2", new CCalibratedParameter(param2)); // The structure below is used to keep track of iteration: struct { CCalibratedParameter* pParam; int nVisits; } parameters[2] = { {¶m1, 0}, {¶m2, 0} }; // Iterate and scoreboard. int iterations(0); CCalibratedParameterManager::CalibratedParameterIterator i = CCalibratedParameterManager::begin(); while(i != CCalibratedParameterManager::end()) { CCalibratedParameter* p = i->second; for(int j= 0; j < 2; j++) { if(*(parameters[j].pParam) == *p) { parameters[j].nVisits++; } } i++; iterations++; } // Check it out: EQMSG("Iteration count", 2, iterations); for(int j = 0; j < 2; j++) { char msg[100]; sprintf(msg, "Checking param %d", j); EQMSG(msg, 1,parameters[j].nVisits); } } /* Test Name EvalTest Test Objective Test ability to evaluate parameters. Test Description 1. Create and insert 2 calibrated parameters with known fits. 2. Evaluate for several events.Note we will be dirty about the analyzer and the buffer decoder references since those are not used by the software. Expected Results Resulting calibrated parameters should match . */ void CalibManager::EvalTest() { CCalibratedParameterManager manager; // need an object now. // 1. Make the pair of parameters and add them. CLinearFit line1; CLinearFit::Point pt; pt.x = 0.0; pt.y = 0.0; line1.AddPoint(pt); pt.x = 1.0; pt.y = 2.0; line1.AddPoint(pt); line1.Perform(); // y = 2x CCalibratedParameter param1(1, 0, "line1", &line1); CLinearFit line2; pt.x = 0.0; pt.y = 5.0; line2.AddPoint(pt); pt.x = 1.0; pt.y = 7; // y = 2x+5 line2.AddPoint(pt); line2.Perform(); CCalibratedParameter param2(2,0, "line2", &line2); CCalibratedParameterManager::AddParameter("1", new CCalibratedParameter(param1)); CCalibratedParameterManager::AddParameter("2", new CCalibratedParameter(param2)); // Here's where it gets a bit dirty: CBufferDecoder* pDecoder(0); CAnalyzer* pAnalyzer(0); // Fortunately these get passed around by reference. CEvent anEvent; for(int i= 0; i < 100; i++) { anEvent.clear(); // Clear the event's validity flags. anEvent[0] = (float)i; manager((Address_t)NULL, // Don't use anEvent, // Do use *pAnalyzer, // Don't use. *pDecoder); // Don't use. // rEvent[1,2] should be valid: ASSERT(anEvent[1].isValid()); ASSERT(anEvent[2].isValid()); // and the elements should have correct values: float y = (float)i*2.0; float actual = anEvent[1]; EQMSG("Element 1: ", y, actual); y = (float)i*2.0 + 5.0; actual = anEvent[2]; EQMSG("Element2: ", y, actual); } } --- NEW FILE: Prompt.test --- # Load the TCL Test packages. if {[lsearch [namespace children] ::tcltest] == -1 } { package require tcltest namespace import ::tcltest::* } # Load the packages under test. if {[lsearch [namespace children] ::Prompt] == -1} { source ../TkPrompt.tcl package require Prompt } # Need the tk libraries too: source $tk_library/dialog.tcl # The tests: test Prompt-1.0 {Test Prompt::Error dialog popup} {} { Prompt::Error "This is a test" puts -nonewline "Should have gotten the prompt 'This is a test' Y/N " flush stdout set answer [gets stdin] } {Y} test Prompt-1.1 {Test Prompt::Prompt dialog popup} {} { set answer [Prompt::Prompt "Click one of the buttons below" \ 0 {{A A} {B B} {C C} {D D}}] puts -nonewline "Wich did you click? A B C or D: " flush stdout set typedin [gets stdin] string equal $answer $typedin } {1} # Post test cleanup. ::tcltest::cleanupTests return Index: MySpecTclApp.cpp =================================================================== RCS file: /cvsroot/nsclspectcl/SpecTcl/contrib/calibratedparams/tests/MySpecTclApp.cpp,v retrieving revision 1.2 retrieving revision 5.1 diff -C2 -d -r1.2 -r5.1 *** MySpecTclApp.cpp 6 Aug 2004 13:40:30 -0000 1.2 --- MySpecTclApp.cpp 29 Nov 2004 16:56:38 -0000 5.1 *************** *** 289,292 **** --- 289,296 ---- #include <CLinearFitCreator.h> #include <CFitCommand.h> + #include <CCalibratedParameterCommand.h> + #include <CCalibratedParameterManager.h> + #include <MultiTestSource.h> + #include <CalibrationDistribution.h> // Local Class definitions: *************** *** 478,482 **** RegisterEventProcessor(Stage1); ! RegisterEventProcessor(Stage2); } --- 482,488 ---- RegisterEventProcessor(Stage1); ! RegisterEventProcessor(*(new CCalibratedParameterManager)); ! ! } *************** *** 612,616 **** void CMySpecTclApp::SetupTestDataSource() ! { CTclGrammerApp::SetupTestDataSource(); } --- 618,646 ---- void CMySpecTclApp::SetupTestDataSource() ! { ! CTclGrammerApp::SetupTestDataSource(); ! ! CMultiTestSource* pSource = getTestDataSource(); ! ! // starting with the default test source, add another test source ! // that produces multiple evenly spaced narrow peaks. ! // ! ! ! CTestFile *pmyTestFile = new CTestFile(*(pSource->getDefaultTestSource())); ! // Calibration distributions construct with ! // First peak position, number of peaks, peak spacing ! // and peak widths. This will produce a spectrrum that looks like ! // a pulsr was run across the spectrum at regular intervals.. good for my testing. ! // ! CCalibrationDistribution* pCalibrationParameter = ! new CCalibrationDistribution(50.0, 10, 100.0, 5.0, 1024.0); ! pmyTestFile->AddDistribution(*pCalibrationParameter); ! pSource->addTestSource("calibrationSource", pmyTestFile); ! ! // Select it. ! ! pSource->useTestSource("calibrationSource"); ! } *************** *** 675,678 **** --- 705,712 ---- CFitCommand* pFit = new CFitCommand(&rInterp); pFit->Register(); + + CCalibratedParameterCommand* pCalib = new CCalibratedParameterCommand(&rInterp); + pCalib->Register(); + } Index: CommandTest.cpp =================================================================== RCS file: /cvsroot/nsclspectcl/SpecTcl/contrib/calibratedparams/tests/CommandTest.cpp,v retrieving revision 1.2 retrieving revision 5.1 diff -C2 -d -r1.2 -r5.1 *** CommandTest.cpp 6 Aug 2004 13:40:30 -0000 1.2 --- CommandTest.cpp 29 Nov 2004 16:56:38 -0000 5.1 *************** *** 285,294 **** StringArray georgelist; EQMSG("element list status", TCL_OK, george.Split(georgelist)); ! EQMSG("element list size", (size_t)4, georgelist.size()); EQMSG("name", string("george"), georgelist[0]); ! EQMSG("state", string("accepting"), georgelist[1]); ! EQMSG("points", string(""), georgelist[2]); ! EQMSG("params", string(""), georgelist[3]); --- 285,295 ---- StringArray georgelist; EQMSG("element list status", TCL_OK, george.Split(georgelist)); ! EQMSG("element list size", (size_t)5, georgelist.size()); EQMSG("name", string("george"), georgelist[0]); ! EQMSG("linear", string("linear"), georgelist[1]); ! EQMSG("state", string("accepting"), georgelist[2]); ! EQMSG("points", string(""), georgelist[3]); ! EQMSG("params", string(""), georgelist[4]); --- NEW FILE: CalibParamTest.cpp --- // Template for a test suite. #include <cppunit/extensions/HelperMacros.h> #include <cppunit/Asserter.h> #include "Asserts.h" #include <CCalibratedParameter.h> #include <Event.h> #include <CLinearFit.h> // Test for the calibrated parameter class. class CalibratedParameterTest : public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(CalibratedParameterTest); CPPUNIT_TEST(ConstructTest); CPPUNIT_TEST(FunctionCall); CPPUNIT_TEST(FitChange); CPPUNIT_TEST_SUITE_END(); private: public: void setUp() { } void tearDown() { } protected: void ConstructTest(); void FunctionCall(); void FitChange(); }; CPPUNIT_TEST_SUITE_REGISTRATION(CalibratedParameterTest); /* Test Name/# Construction Test Objective Test the constructors and canonical operations of the class (Note this will also test the selectors. Test Description 1. Construct a Calibrated parameter 2. Inspect with selectors. 3. Do copy construction of the calibrated parameter 4. Test for equality 5. Test fits for equality. 6. Create another calibrated parameter (different parameters etc). 7. Compare for equality 8. Compare for inequality. Expected Results 1. N/A 2. Selectors should reflect constructor parameters. 3. NA 4. The two Calibrated parameters should compare equal. 5. The two fits contained by the parameters should compare equal 6. NA 7. Should not get equality 8. Should get inequality. */ void CalibratedParameterTest::ConstructTest() { // 1. Construct the initial calibrated parameter. CLinearFit line; // The fit I'm using. CFit::Point pt; pt.x = 0.0; pt.y = 0.0; line.AddPoint(pt); pt.x = 1.0; pt.y = 2.0; line.AddPoint(pt); // y = 2*x. line.Perform(); CCalibratedParameter p1(1, 0, "TestFit", &line); // 2. Check the results of the construction. EQMSG("Target id", 1, p1.getTargetId()); EQMSG("Raw id", 0, p1.getRawId()); EQMSG("Fitname", string("TestFit"), p1.getFitName()); const CFit* pFit = p1.getFit(); if(line != *(const CLinearFit*)pFit) { FAIL("Fits not equal"); } // 3. Copy construct parameter. CCalibratedParameter p2(p1); // 4. Calibrated parameters must be equal ASSERT(p1 == p2); // Parameters must compare equal // 5. And their fits must be equal: const CFit* pFit2 = p2.getFit(); ASSERT(*pFit == *pFit2); // 6. Create a different calibrated parameter. CCalibratedParameter p3(5, 7, "Testing", &line); // 7. SHould not be equal: if(p1 == p3) { FAIL("Unequal are equal"); } // 8. Should be unequal. ASSERT(p1 != p3); // This is not the same test as above. } /* Test Name function call Test Objective Test the function call operator of CCalibratedParameter Test Description 1. Construct a fit and perform it such that it will yield y = 2*x+1 2. Construct a calibrated parameter with this fit. 3. Run several concocted events through the parameter checking that they all compute to y= 2*x+1. Expected Results 1. NA 2. NA 3. All calibrated parameters evaluate to 2*x+1. */ void CalibratedParameterTest::FunctionCall() { CLinearFit line; CFit::Point pt; pt.x = 0.0; pt.y = 1.0; line.AddPoint(pt); pt.x = 1.0; pt.y = 3.0; line.AddPoint(pt); line.Perform(); CCalibratedParameter Param(1, 0, "test", &line); CEvent event; for(int i =0; i < 10; i++) { event.clear(); // Reset the event. event[0] = i; // Raw parameter. Param(event); // Compute the calibrated param. ASSERT(event[1].isValid()); // Should have been set. float result = (double)i*2.0 + 1.0; float calibrated = event[1]; EQMSG("comparison", result, calibrated); } } /* Test Name FitChange Test Objective Test ability to change from one fit to the other. Test Description 1. Construct a calibrated parameter. 2. Replace its fit. 3. Check returned fit for equality with initial fit. 4. Evaluate parameter for several data points with new fit. Expected Results 4. Initial fit should be equal to replaced fit. 5. Parameter should evaluate using new fit. */ void CalibratedParameterTest::FitChange() { // 1. create initial parameter. CLinearFit line; CFit::Point pt; pt.x = 0.0; pt.y = 1.0; line.AddPoint(pt); pt.x = 1.0; pt.y = 3.0; line.AddPoint(pt); line.Perform(); CCalibratedParameter Param(1, 0, "test", &line); // Make a secod fit and repalce the parameter's fit. CLinearFit line2; // This will be y = 3x-5. pt.x = 0.0; pt.y = -5.0; line2.AddPoint(pt); pt.x = 1.0; pt.y = -2.0; line2.AddPoint(pt); line2.Perform(); CFit* pOldFit = Param.ReplaceFit(line2); // 4 - check against old fit. if(line != *(CLinearFit*)pOldFit) { FAIL("Replaced fit != line"); } delete pOldFit; // 5 Evaluate. CEvent event; for(int i =0; i < 100; i ++) { event.clear(); event[0] = i; Param(event); float result = ((float)i)*3.0 - 5.0; float calib = event[1]; EQMSG("Comparison", result, calib); } } --- NEW FILE: all.tcl --- lappend auto_path ..; # Satisfy packages from up one level. # Load the TCL Test packages. if {[lsearch [namespace children] ::tcltest] == -1 } { package require tcltest namespace import ::tcltest::* } # Run all tests in this directory: set ::tcltest::testSingleFile false set ::tcltest::testsDirectory [file dir [info script]] # Run the tests (.test files). foreach file [::tcltest::getMatchingFiles] { if {[catch {source $file} msg]} { puts stdout $msg } } ::tcltest::cleanupTests 1 return |