Commit 960708a4 authored by Gigg, Martyn Anthony's avatar Gigg, Martyn Anthony
Browse files

Kill gcc 4.8 warnings in tests.

Refs #9421
parent 166f0334
......@@ -237,16 +237,6 @@ public:
TS_ASSERT_THROWS(runInfo.getPropertyAsSingleValue(name), std::invalid_argument);
}
void test_GetPropertyAsSingleValue_Throws_If_StatisticType_Is_Unknown_And_Type_Is_TimeSeries()
{
LogManager runInfo;
const std::string name = "series";
addTestTimeSeries(runInfo, name);
const unsigned int statistic(100);
TS_ASSERT_THROWS(runInfo.getPropertyAsSingleValue(name, (Math::StatisticType)statistic), std::invalid_argument);
}
void test_GetPropertyAsSingleValue_Returns_Simple_Mean_By_Default_For_Time_Series()
{
LogManager runInfo;
......
......@@ -202,16 +202,6 @@ public:
TS_ASSERT_THROWS(runInfo.getPropertyAsSingleValue(name), std::invalid_argument);
}
void test_GetPropertyAsSingleValue_Throws_If_StatisticType_Is_Unknown_And_Type_Is_TimeSeries()
{
Run runInfo;
const std::string name = "series";
addTestTimeSeries(runInfo, name);
const unsigned int statistic(100);
TS_ASSERT_THROWS(runInfo.getPropertyAsSingleValue(name, (Math::StatisticType)statistic), std::invalid_argument);
}
void test_GetPropertyAsSingleValue_Returns_Simple_Mean_By_Default_For_Time_Series()
{
Run runInfo;
......
......@@ -300,7 +300,7 @@ public:
const size_t NY = 9;
const size_t NX = NY + 1;
double dBlockSize = 2 * ( sizeof(int) + ( NX + 2*NY ) * sizeof(double) );
double dBlockSize = static_cast<double>(2 * ( sizeof(int) + ( NX + 2*NY ) * sizeof(double) ));
// This will make sure 1 ManagedDataBlock = 2 Vectors
Mantid::Kernel::ConfigServiceImpl& conf = Mantid::Kernel::ConfigService::Instance();
......
......@@ -47,13 +47,6 @@ public:
TS_ASSERT_EQUALS(DeltaEMode::fromString(m_elasticString), DeltaEMode::Elastic);
}
void test_unknown_mode_raises_error_in_to_and_from_string()
{
const unsigned int mode = 1000;
TS_ASSERT_THROWS(DeltaEMode::asString((DeltaEMode::Type)mode), std::invalid_argument);
TS_ASSERT_THROWS(DeltaEMode::fromString("Not emode"), std::invalid_argument);
}
private:
const std::string m_elasticString, m_directString, m_indirectString;
};
......
......@@ -32,15 +32,6 @@ public:
TS_ASSERT_THROWS(UnitConversion::run("Wavelength", "xszfsdf", 0.0,0.0,0.0,0.0,DeltaEMode::Elastic,0.0), NotFoundError);
}
void test_Run_Gives_Throws_With_Unknown_EMode_When_Applicable()
{
// Important to test as if another mode is added but this class is not updated to deal with it
using namespace Mantid::Kernel::Exception;
using Mantid::Kernel::DeltaEMode;
const unsigned int mode = 1000;
TS_ASSERT_THROWS(UnitConversion::run("Wavelength", "MomentumTransfer", 0.0,0.0,0.0,0.0,(DeltaEMode::Type)mode,0.0), std::invalid_argument);
}
void test_Run_Gives_Correct_Value_For_Units_That_Can_Be_Converted_By_Simply_Factor_And_Geometry_Is_Ignored()
{
using Mantid::Kernel::DeltaEMode;
......
......@@ -119,7 +119,6 @@ public:
TSM_ASSERT_DIFFERS( "Dimensions were not deep-copied", copy.getDimension(0), ew3.getDimension(0));
/*Test that the boxes were deep copied and that their BoxController pointers have been updated too.*/
typedef MDBoxBase<MDLeanEvent<3>, 3> MDBoxBaseType;
std::vector<API::IMDNode *> originalBoxes;
ew3.getBox()->getBoxes(originalBoxes, 10000, false);
......
......@@ -1047,7 +1047,6 @@ public:
void test_splitAllIfNeeded_usingThreadPool()
{
typedef MDGridBox<MDLeanEvent<2>,2> gbox_t;
typedef MDBox<MDLeanEvent<2>,2> box_t;
typedef MDBoxBase<MDLeanEvent<2>,2> ibox_t;
gbox_t * b = MDEventsTestHelper::makeMDGridBox<2>();
......@@ -1136,8 +1135,6 @@ public:
void test_centerpointBin()
{
typedef MDGridBox<MDLeanEvent<2>,2> gbox_t;
typedef MDBox<MDLeanEvent<2>,2> box_t;
typedef MDBoxBase<MDLeanEvent<2>,2> ibox_t;
// 10x10 bins, 2 events per bin, each weight of 1.0
gbox_t * b = MDEventsTestHelper::makeMDGridBox<2>();
......
......@@ -55,7 +55,6 @@ public:
const std::string testData = "abc";
vtkFieldData* fieldData = createFieldDataWithCharArray(testData, id);
typedef std::binary_function<vtkFieldData*, std::string, std::string> BaseType;
FieldDataToMetadata function;
TSM_ASSERT_EQUALS("Results from two equivalent methods differ.", function(fieldData, id), function.execute(fieldData, id));
fieldData->Delete();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment