Skip to content

Commit

Permalink
re #4289 sorted out unit test of the categories
Browse files Browse the repository at this point in the history
  • Loading branch information
NickDraper committed Dec 9, 2011
1 parent a6e6e6d commit 2f6f0e6
Show file tree
Hide file tree
Showing 51 changed files with 1 addition and 190 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,6 @@ class AnyShapeAbsorptionTest : public CxxTest::TestSuite
TS_ASSERT_EQUALS( atten.version(), 1 );
}

void testCategory()
{
TS_ASSERT_EQUALS( atten.category(), "Absorption Corrections" );
}

void testInit()
{
TS_ASSERT_THROWS_NOTHING( atten.initialize() );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ class ApplyTransmissionCorrectionTest : public CxxTest::TestSuite

TS_ASSERT_EQUALS( correction.name(), "ApplyTransmissionCorrection" );
TS_ASSERT_EQUALS( correction.version(), 1 );
TS_ASSERT_EQUALS( correction.category(), "SANS" );
TS_ASSERT_THROWS_NOTHING( correction.initialize() );
TS_ASSERT( correction.isInitialized() );
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,6 @@ class CalculateEfficiencyTest : public CxxTest::TestSuite
TS_ASSERT_EQUALS( correction.version(), 1 )
}

void testCategory()
{
TS_ASSERT_EQUALS( correction.category(), "SANS" )
}

void testInit()
{
TS_ASSERT_THROWS_NOTHING( correction.initialize() )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,6 @@ class CalculateTransmissionBeamSpreaderTest : public CxxTest::TestSuite
TS_ASSERT_EQUALS( trans.version(), 1 )
}

void testCategory()
{
TS_ASSERT_EQUALS( trans.category(), "SANS" )
}

void testInit()
{
TS_ASSERT_THROWS_NOTHING( trans.initialize() )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ class CalculateTransmissionTest : public CxxTest::TestSuite

TS_ASSERT_EQUALS( trans.name(), "CalculateTransmission" );
TS_ASSERT_EQUALS( trans.version(), 1 );
TS_ASSERT_EQUALS( trans.category(), "SANS" );
}

void testFittedUnfitted()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,6 @@ class CheckWorkspacesMatchTest : public CxxTest::TestSuite
TS_ASSERT_EQUALS( checker.version(), 1 );
}

void testCategory()
{
TS_ASSERT_EQUALS( checker.category(), "General" );
}

void testInit()
{
TS_ASSERT_THROWS_NOTHING( checker.initialize() );
Expand Down
1 change: 0 additions & 1 deletion Code/Mantid/Framework/Algorithms/test/ChopDataTest.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ class ChopDataTest : public CxxTest::TestSuite
alg = new ChopData();
TS_ASSERT_EQUALS(alg->name(), "ChopData");
TS_ASSERT_EQUALS(alg->version(), 1);
TS_ASSERT_EQUALS(alg->category(), "General");
delete alg;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ class ConjoinWorkspacesTest : public CxxTest::TestSuite
conj = new ConjoinWorkspaces();
TS_ASSERT_EQUALS( conj->name(), "ConjoinWorkspaces" );
TS_ASSERT_EQUALS( conj->version(), 1 );
TS_ASSERT_EQUALS( conj->category(), "General" );
delete conj;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,6 @@ class ConvertFromDistributionTest : public CxxTest::TestSuite
TS_ASSERT_EQUALS( conv.version(), 1 )
}

void testCategory()
{
TS_ASSERT_EQUALS( conv.category(), "General" )
}

void testInit()
{
TS_ASSERT_THROWS_NOTHING( conv.initialize() )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,6 @@ class ConvertSpectrumAxisTest : public CxxTest::TestSuite
TS_ASSERT_EQUALS( conv.version(), 1 );
}

void testCategory()
{
TS_ASSERT_EQUALS( conv.category(), "Units" );
}

void testInit()
{
TS_ASSERT_THROWS_NOTHING( conv.initialize() );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,6 @@ class ConvertToMatrixWorkspaceTest : public CxxTest::TestSuite
TS_ASSERT_EQUALS( cloner.version(), 1 )
}

void testCategory()
{
TS_ASSERT_EQUALS( cloner.category(), "General" )
}

void testInit()
{
TS_ASSERT_THROWS_NOTHING( cloner.initialize() )
Expand Down
5 changes: 0 additions & 5 deletions Code/Mantid/Framework/Algorithms/test/CropWorkspaceTest.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,6 @@ class CropWorkspaceTest : public CxxTest::TestSuite
TS_ASSERT_EQUALS( crop.version(), 1 );
}

void testCategory()
{
TS_ASSERT_EQUALS( crop.category(), "General" );
}

void testInit()
{
TS_ASSERT_THROWS_NOTHING( crop.initialize() );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ class CuboidGaugeVolumeAbsorptionTest : public CxxTest::TestSuite
{
TS_ASSERT_EQUALS( atten.name(), "CuboidGaugeVolumeAbsorption" );
TS_ASSERT_EQUALS( atten.version(), 1 );
TS_ASSERT_EQUALS( atten.category(), "Absorption Corrections" );
}

void testInit()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,6 @@ class CylinderAbsorptionTest : public CxxTest::TestSuite
TS_ASSERT_EQUALS( atten.version(), 1 );
}

void testCategory()
{
TS_ASSERT_EQUALS( atten.category(), "Absorption Corrections" );
}

void testInit()
{
TS_ASSERT_THROWS_NOTHING( atten.initialize() );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ class DetectorEfficiencyCorTest : public CxxTest::TestSuite
DetectorEfficiencyCor grouper;
TS_ASSERT_EQUALS( grouper.name(), "DetectorEfficiencyCor" );
TS_ASSERT_EQUALS( grouper.version(), 1 );
TS_ASSERT_EQUALS( grouper.category(), "CorrectionFunctions" );
TS_ASSERT_THROWS_NOTHING( grouper.initialize() );
TS_ASSERT( grouper.isInitialized() );
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ class ExtractFFTSpectrumTest : public CxxTest::TestSuite
ExtractFFTSpectrum alg;
TS_ASSERT_EQUALS(alg.name(), "ExtractFFTSpectrum");
TS_ASSERT_EQUALS(alg.version(), 1);
TS_ASSERT_EQUALS(alg.category(), "General");
}

void testInit()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,6 @@ class ExtractSingleSpectrumTest : public CxxTest::TestSuite
TS_ASSERT_EQUALS( versionTester->version(), 1 );
}

void testCategory()
{
IAlgorithm *catTester = createExtractSingleSpectrum();
TS_ASSERT_EQUALS( catTester->category(), "General" );
}

void testInit()
{
IAlgorithm *initTester = createExtractSingleSpectrum();
Expand Down
5 changes: 0 additions & 5 deletions Code/Mantid/Framework/Algorithms/test/FFTSmooth2Test.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,6 @@ class FFTSmooth2Test : public CxxTest::TestSuite
TS_ASSERT_EQUALS( fftsmooth2.version(), 2 )
}

void testCategory()
{
TS_ASSERT_EQUALS( fftsmooth2.category(), "General" )
}

void testInit()
{
Mantid::Algorithms::FFTSmooth2 fftsmooth2_b;
Expand Down
1 change: 0 additions & 1 deletion Code/Mantid/Framework/Algorithms/test/FindPeaksTest.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ class FindPeaksTest : public CxxTest::TestSuite
FindPeaks finder;
TS_ASSERT_EQUALS( finder.name(), "FindPeaks" );
TS_ASSERT_EQUALS( finder.version(), 1 );
TS_ASSERT_EQUALS( finder.category(), "General" );
}

void testInit()
Expand Down
1 change: 0 additions & 1 deletion Code/Mantid/Framework/Algorithms/test/FlatBackgroundTest.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ class FlatBackgroundTest : public CxxTest::TestSuite
Mantid::Algorithms::FlatBackground flatBG;
TS_ASSERT_EQUALS( flatBG.name(), "FlatBackground" )
TS_ASSERT_EQUALS( flatBG.version(), 1 )
TS_ASSERT_EQUALS( flatBG.category(), "SANS" )
}

void testExec()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,7 @@ class FlatPlateAbsorptionTest : public CxxTest::TestSuite
{
TS_ASSERT_EQUALS( atten.version(), 1 );
}

void testCategory()
{
TS_ASSERT_EQUALS( atten.category(), "Absorption Corrections" );
}


void testInit()
{
TS_ASSERT_THROWS_NOTHING( atten.initialize() );
Expand Down
6 changes: 0 additions & 6 deletions Code/Mantid/Framework/Algorithms/test/GroupWorkspacesTest.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,6 @@ class GroupWorkspacesTest : public CxxTest::TestSuite
TS_ASSERT_EQUALS( grpwsalg.version(), 1 );
}

void testCategory()
{
GroupWorkspaces grpwsalg;
TS_ASSERT_EQUALS( grpwsalg.category(), "DataHandling" );
}

void testInit()
{
Mantid::Algorithms::GroupWorkspaces alg2;
Expand Down
5 changes: 0 additions & 5 deletions Code/Mantid/Framework/Algorithms/test/MaskBinsTest.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,6 @@ class MaskBinsTest : public CxxTest::TestSuite
{
TS_ASSERT_EQUALS( masker.version(), 1 );
}

void testCategory()
{
TS_ASSERT_EQUALS( masker.category(), "General" );
}

void testInit()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,6 @@ class MultipleScatteringCylinderAbsorptionTest : public CxxTest::TestSuite
TS_ASSERT_EQUALS( algorithm.version(), 1 );
}

void testCategory()
{
TS_ASSERT_EQUALS( algorithm.category(), "Absorption Corrections" );
}

void testInit()
{
Mantid::Algorithms::MultipleScatteringCylinderAbsorption algorithm_b;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,6 @@ class NormaliseByCurrentTest : public CxxTest::TestSuite
TS_ASSERT_EQUALS( norm.version(), 1 );
}

void testCategory()
{
TS_ASSERT_EQUALS( norm.category(), "General" );
}

void testInit()
{
TS_ASSERT_THROWS_NOTHING( norm.initialize() );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,6 @@ class NormaliseToMonitorTest : public CxxTest::TestSuite
TS_ASSERT_EQUALS( norm.version(), 1 )
}

void testCategory()
{
TS_ASSERT_EQUALS( norm.category(), "General" )
}

void testInit()
{
TS_ASSERT_THROWS_NOTHING( norm.initialize() )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@ class PointByPointVCorrectionTest : public CxxTest::TestSuite
{
TS_ASSERT_EQUALS( pbpv.version(), 1 );
}

void testCategory()
{
TS_ASSERT_EQUALS( pbpv.category(), "Diffraction" );
}

void testInit()
{
Expand Down
5 changes: 0 additions & 5 deletions Code/Mantid/Framework/Algorithms/test/RemoveBinsTest.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,6 @@ class RemoveBinsTest : public CxxTest::TestSuite
TS_ASSERT_EQUALS( alg.name(), "RemoveBins" )
}

void testCategory()
{
TS_ASSERT_EQUALS( alg.category(), "General" )
}

void testInit()
{
alg.initialize();
Expand Down
5 changes: 0 additions & 5 deletions Code/Mantid/Framework/Algorithms/test/RenameWorkspaceTest.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,6 @@ class RenameWorkspaceTest : public CxxTest::TestSuite
TS_ASSERT_EQUALS( alg.version(), 1 );
}

void testCategory()
{
TS_ASSERT_EQUALS( alg.category(), "DataHandling" );
}

void testInit()
{
Mantid::Algorithms::RenameWorkspace alg2;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,6 @@ class ReplaceSpecialValuesTest : public CxxTest::TestSuite
TS_ASSERT_EQUALS( alg.version(), 1 );
}

void testCategory()
{
TS_ASSERT_EQUALS( alg.category(), "General" );
}

void testInit()
{
Mantid::Algorithms::ReplaceSpecialValues alg2;
Expand Down
5 changes: 0 additions & 5 deletions Code/Mantid/Framework/Algorithms/test/ScaleTest.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@ class ScaleTest : public CxxTest::TestSuite
TS_ASSERT_EQUALS( scale.version(), 1 )
}

void testCategory()
{
TS_ASSERT_EQUALS( scale.category(), "Arithmetic" )
}

void testInit()
{
TS_ASSERT_THROWS_NOTHING( scale.initialize() )
Expand Down
5 changes: 0 additions & 5 deletions Code/Mantid/Framework/Algorithms/test/ScaleXTest.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@ class ScaleXTest : public CxxTest::TestSuite
TS_ASSERT_EQUALS( scale.version(), 1 )
}

void testCategory()
{
TS_ASSERT_EQUALS( scale.category(), "Arithmetic" )
}

void testInit()
{
TS_ASSERT_THROWS_NOTHING( scale.initialize() )
Expand Down
5 changes: 0 additions & 5 deletions Code/Mantid/Framework/Algorithms/test/SmoothDataTest.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,6 @@ class SmoothDataTest : public CxxTest::TestSuite
TS_ASSERT_EQUALS( smooth.version(), 1 );
}

void testCategory()
{
TS_ASSERT_EQUALS( smooth.category(), "General" );
}

void testInit()
{
TS_ASSERT_THROWS_NOTHING( smooth.initialize() );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ class SpatialGroupingTest : public CxxTest::TestSuite
alg = new Mantid::Algorithms::SpatialGrouping();
TS_ASSERT_EQUALS(alg->name(), "SpatialGrouping");
TS_ASSERT_EQUALS(alg->version(), 1);
TS_ASSERT_EQUALS(alg->category(), "General");
delete alg;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,6 @@ class SphericalAbsorptionTest : public CxxTest::TestSuite
TS_ASSERT_EQUALS( atten->version(), 1 );
}

void testCategory()
{
IAlgorithm* atten = Mantid::API::FrameworkManager::Instance().createAlgorithm("SphericalAbsorption");
TS_ASSERT_EQUALS( atten->category(), "Absorption Corrections" );
}

void testInit()
{
IAlgorithm* atten = Mantid::API::FrameworkManager::Instance().createAlgorithm("SphericalAbsorption");
Expand Down
1 change: 0 additions & 1 deletion Code/Mantid/Framework/Algorithms/test/StripPeaksTest.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ class StripPeaksTest : public CxxTest::TestSuite
{
TS_ASSERT_EQUALS( strip.name(), "StripPeaks" );
TS_ASSERT_EQUALS( strip.version(), 1 );
TS_ASSERT_EQUALS( strip.category(), "General" );
}

void testInit()
Expand Down

0 comments on commit 2f6f0e6

Please sign in to comment.