Skip to content

Commit c5f7b18

Browse files
committed
Paths
1 parent b4236f3 commit c5f7b18

File tree

2 files changed

+22
-23
lines changed

2 files changed

+22
-23
lines changed

src/Core/Algorithms/Math/Tests/SolveLinearSystemAlgoTestsParameterized.cc

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,13 @@ using namespace SCIRun::TestUtils;
5050
using namespace SCIRun;
5151
using namespace ::testing;
5252

53-
#if GTEST_HAS_COMBINE
53+
#if GTEST_HAS_COMBINE
5454

5555
using ::testing::Values;
5656
using ::testing::Combine;
57-
using ::testing::Range;
57+
using ::testing::Range;
5858

59-
class SolveLinearSystemTestsAlgoParameterized : public ::testing::TestWithParam < ::std::tr1::tuple<const char*, const char*, int> >
59+
class SolveLinearSystemTestsAlgoParameterized : public ::testing::TestWithParam < ::std::tr1::tuple<const char*, const char*, int> >
6060
{
6161
public:
6262
ReadMatrixAlgorithm reader;
@@ -70,9 +70,9 @@ class SolveLinearSystemTestsAlgoParameterized : public ::testing::TestWithParam
7070
protected:
7171
virtual void SetUp()
7272
{
73-
auto Afile = TestResources::rootDir() / "moritz_A.mat";
73+
auto Afile = TestResources::rootDir() / "Matrices" / "moritz_A.mat";
7474

75-
auto rhsFile = TestResources::rootDir() / "moritz_b.mat";
75+
auto rhsFile = TestResources::rootDir() / "Matrices" / "moritz_b.mat";
7676
if (!boost::filesystem::exists(Afile) || !boost::filesystem::exists(rhsFile))
7777
{
7878
FAIL() << "TODO: Issue #142 will standardize these file locations other than being on Dan's hard drive." << std::endl
@@ -89,7 +89,7 @@ class SolveLinearSystemTestsAlgoParameterized : public ::testing::TestWithParam
8989
}
9090
// algo object will initialize x0 to the zero vector
9191

92-
algo.set(Variables::Preconditioner, ::std::tr1::get<1>(GetParam()));
92+
algo.set(Variables::Preconditioner, ::std::tr1::get<1>(GetParam()));
9393
algo.set(Variables::MaxIterations, 670);
9494
algo.set(Variables::TargetError, ::std::tr1::get<2>(GetParam()));
9595

@@ -101,9 +101,9 @@ class SolveLinearSystemTestsAlgoParameterized : public ::testing::TestWithParam
101101

102102
/*
103103
{
104-
ScopedTimer t("Running solver");
104+
ScopedTimer t("Running solver");
105105
}
106-
const std::string& c = ::std::tr1::get<0>(GetParam());
106+
const std::string& c = ::std::tr1::get<0>(GetParam());
107107
108108
auto solutionFile = TestResources::rootDir() / ("dan_sol_" + c + ".mat");
109109
@@ -139,7 +139,7 @@ TEST_P(SolveLinearSystemTestsAlgoParameterized, CanSolveDarrellParameterized)
139139
ASSERT_FALSE(x0);
140140

141141
ASSERT_TRUE(algo.run(A, matrix_convert::to_column(rhs), x0, solution));
142-
142+
143143
ASSERT_TRUE(solution.get() != nullptr);
144144
EXPECT_EQ(10149, solution->nrows());
145145
EXPECT_EQ(1, solution->ncols());
@@ -159,4 +159,4 @@ INSTANTIATE_TEST_CASE_P(
159159
);
160160
#else
161161
TEST(DummyTest, CombineIsNotSupportedOnThisPlatform(){}
162-
#endif
162+
#endif

src/Modules/Math/Tests/AddKnownsToLinearSystemTests.cc

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -62,17 +62,17 @@ namespace
6262
{
6363
FieldHandle CreateTriSurfScalarOnNode()
6464
{
65-
return loadFieldFromFile(TestResources::rootDir() / "_etfielddata/tri_surf/data_defined_on_node/scalar/tri_scalar_on_node.fld");
65+
return loadFieldFromFile(TestResources::rootDir() / "Fields/tri_surf/data_defined_on_node/scalar/tri_scalar_on_node.fld");
6666
}
6767
FieldHandle CreateTetMeshScalarOnNode()
6868
{
69-
return loadFieldFromFile(TestResources::rootDir() / "_etfielddata/tet_mesh/data_defined_on_node/scalar/tet_scalar_on_node.fld");
69+
return loadFieldFromFile(TestResources::rootDir() / "Fields/tet_mesh/data_defined_on_node/scalar/tet_scalar_on_node.fld");
7070
}
7171
FieldHandle CreatePointCloudeScalar()
7272
{
73-
return loadFieldFromFile(TestResources::rootDir() / "_etfielddata/point_cloud/scalar/pts_scalar.fld");
73+
return loadFieldFromFile(TestResources::rootDir() / "Fields/point_cloud/scalar/pts_scalar.fld");
7474
}
75-
75+
7676
// x vector [1; 2; ... n]
7777
DenseMatrixHandle x_num(int rows)
7878
{
@@ -90,7 +90,7 @@ namespace
9090
(*m)(2, 0) = std::numeric_limits<double>::quiet_NaN();
9191
return m;
9292
}
93-
93+
9494
// symmetric LHS (stiff) matrix
9595
SparseRowMatrixHandle lhs()
9696
{
@@ -107,7 +107,7 @@ namespace
107107
m->makeCompressed();
108108
return m;
109109
}
110-
110+
111111
// RHS vector of zeros
112112
DenseMatrixHandle rhs_zero(int rows)
113113
{
@@ -165,11 +165,11 @@ TEST_F(AddKnownsToLinearSystemTests, ThrowsForFieldInputOnPortZero)
165165
FieldHandle stiff = CreatePointCloudeScalar();
166166
DenseMatrixHandle bvect = rhs_zero(3);
167167
DenseMatrixHandle known = x_num(3);
168-
168+
169169
stubPortNWithThisData(test, 0, stiff);
170170
stubPortNWithThisData(test, 1, bvect);
171171
stubPortNWithThisData(test, 2, known);
172-
172+
173173
EXPECT_THROW(test->execute(), DataPortException);
174174
}
175175

@@ -179,11 +179,11 @@ TEST_F(AddKnownsToLinearSystemTests, ThrowsForFieldInputOnPortOne)
179179
SparseRowMatrixHandle stiff = lhs();
180180
FieldHandle bvect = CreateTetMeshScalarOnNode();
181181
DenseMatrixHandle known = x_num(3);
182-
182+
183183
stubPortNWithThisData(test, 0, stiff);
184184
stubPortNWithThisData(test, 1, bvect);
185185
stubPortNWithThisData(test, 2, known);
186-
186+
187187
EXPECT_THROW(test->execute(), DataPortException);
188188
}
189189

@@ -193,11 +193,11 @@ TEST_F(AddKnownsToLinearSystemTests, ThrowsForFieldInputOnPortTwo)
193193
SparseRowMatrixHandle stiff = lhs();
194194
DenseMatrixHandle bvect = rhs_zero(3);
195195
FieldHandle known = CreateTriSurfScalarOnNode();
196-
196+
197197
stubPortNWithThisData(test, 0, stiff);
198198
stubPortNWithThisData(test, 1, bvect);
199199
stubPortNWithThisData(test, 2, known);
200-
200+
201201
EXPECT_THROW(test->execute(), DataPortException);
202202
}
203203

@@ -212,4 +212,3 @@ TEST_F(AddKnownsToLinearSystemTests, ThrowsForNullInput)
212212

213213
EXPECT_THROW(csdf->execute(), NullHandleOnPortException);
214214
}
215-

0 commit comments

Comments
 (0)