Skip to content

Commit 9a2beb2

Browse files
author
Brig Bagley
committed
satisfying unknown colormap name test
1 parent 55478b9 commit 9a2beb2

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/Core/Datatypes/ColorMap.cc

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,12 @@
3232
using namespace SCIRun::Core::Datatypes;
3333

3434
ColorMap::ColorMap(const std::string& name, const size_t resolution, const double shift, const bool invert)
35-
: name_(name), resolution_(resolution), shift_(shift), invert_(invert) {}
35+
: name_(name), resolution_(resolution), shift_(shift), invert_(invert) {
36+
if (!(name_ == "Rainbow" ||
37+
name_ == "Blackbody" ||
38+
name_ == "Grayscale" ))
39+
throw InvalidArgumentException();
40+
}
3641

3742
ColorMap* ColorMap::clone() const
3843
{

src/Modules/Visualization/Tests/ShowFieldTests.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ INSTANTIATE_TEST_CASE_P(
7474
ConstructLatVolGeometry,
7575
ShowFieldScalingTest,
7676
Values(20, 40, 60, 80
77-
, 100, 120, 150, //200 //to speed up make test
77+
, 100, 120, 150//, //200 //to speed up make test
7878
//, 256 // probably runs out of memory
7979
)
8080
);

0 commit comments

Comments
 (0)