Skip to content

Commit b0736f6

Browse files
authored
Merge pull request #1745 from SCIInstitute/work
Bunch of small issues
2 parents 5027096 + 1105fbb commit b0736f6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+3468
-2295
lines changed

src/Core/CommandLine/Tests/ScirunCommandLineSpecTests.cc

Lines changed: 20 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,14 @@ TEST(ScirunCommandLineSpecTest, CanReadBasicOptions)
3636
CommandLineParser parser;
3737

3838
const std::string expectedHelp =
39-
"SCIRun5 basic options:\n"
39+
"SCIRun 5 command line options:\n"
4040
" -h [ --help ] prints usage information\n"
4141
" -v [ --version ] prints out version information\n"
4242
" -e [ --execute ] executes the given network on startup\n"
4343
" -E [ --Execute ] executes the given network on startup and quits when \n"
4444
" done\n"
4545
" -d [ --datadir ] arg scirun data directory\n"
4646
" -r [ --regression ] arg regression test a network\n"
47-
" -l [ --logfile ] arg add output messages to a logfile--TODO\n"
4847
" -1 [ --most-recent ] load the most recently used file\n"
4948
" -i [ --interactive ] interactive mode\n"
5049
" -x [ --headless ] disable GUI\n"
@@ -55,10 +54,6 @@ TEST(ScirunCommandLineSpecTest, CanReadBasicOptions)
5554
" execution pass\n"
5655
" -0 [ --no_splash ] Turn off splash screen\n"
5756
" --verbose Turn on debug log information\n"
58-
" --threadMode arg network execution threading mode--DEVELOPER USE ONLY\n"
59-
" --reexecuteMode arg network reexecution mode--DEVELOPER USE ONLY\n"
60-
" --frameInitLimit arg ViewScene frame init limit--increase if renderer \n"
61-
" fails\n"
6257
" --guiExpandFactor arg Expansion factor for high resolution displays\n"
6358
" --max-cores arg Limit the number of cores used by multithreaded \n"
6459
" algorithms\n"
@@ -143,25 +138,25 @@ TEST(ScirunCommandLineSpecTest, CanReadBasicOptions)
143138
EXPECT_EQ("net.srn5", aph->inputFiles()[0]);
144139
}
145140

146-
{
147-
const char* argv[] = {"scirun.exe", "--threadMode", "serial"};
148-
int argc = sizeof(argv)/sizeof(char*);
149-
150-
auto aph = parser.parse(argc, argv);
151-
152-
ASSERT_TRUE(!!aph->developerParameters()->threadMode());
153-
EXPECT_EQ("serial", *aph->developerParameters()->threadMode());
154-
}
155-
156-
{
157-
const char* argv[] = {"scirun.exe", "--threadMode=serial"};
158-
int argc = sizeof(argv)/sizeof(char*);
159-
160-
auto aph = parser.parse(argc, argv);
161-
162-
ASSERT_TRUE(!!aph->developerParameters()->threadMode());
163-
EXPECT_EQ("serial", *aph->developerParameters()->threadMode());
164-
}
141+
// {
142+
// const char* argv[] = {"scirun.exe", "--threadMode", "serial"};
143+
// int argc = sizeof(argv)/sizeof(char*);
144+
//
145+
// auto aph = parser.parse(argc, argv);
146+
//
147+
// ASSERT_TRUE(!!aph->developerParameters()->threadMode());
148+
// EXPECT_EQ("serial", *aph->developerParameters()->threadMode());
149+
// }
150+
151+
// {
152+
// const char* argv[] = {"scirun.exe", "--threadMode=serial"};
153+
// int argc = sizeof(argv)/sizeof(char*);
154+
//
155+
// auto aph = parser.parse(argc, argv);
156+
//
157+
// ASSERT_TRUE(!!aph->developerParameters()->threadMode());
158+
// EXPECT_EQ("serial", *aph->developerParameters()->threadMode());
159+
// }
165160

166161
{
167162
const char* argv[] = { "scirun.exe", "-1" };

src/Core/DatabaseManager/Tests/ModuleDatabaseQueries.cc

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ class ModuleDatabaseQueries : public ::testing::Test
9494
// ChangeMesh
9595
"('AlignMeshBoundingBoxes', 1, 0, 0, 0, 1, 0, 1, 0, 1, 0),"
9696
"('ConvertQuadSurfToTriSurf', 1, 0, 0, 0, 1, 0, 0, 0, 1, 0),"
97-
"('ConvertHexVolToTetVol', 1, 1, 0, 0, 1, 0, 1, 0, 1, 1),"
97+
"('ConvertHexVolToTetVol', 1, 1, 0, 0, 1, 0, 1, 0, 1, 1),"
9898
"('GetFieldNodes', 1, 0, 0, 0, 1, 0, 0, 0, 1, 0),"
9999
"('SetFieldNodes', 1, 0, 0, 0, 1, 0, 0, 0, 1, 0),"
100100
// DataIO
@@ -148,8 +148,8 @@ class ModuleDatabaseQueries : public ::testing::Test
148148
// Visualization
149149
"('CreateStandardColorMap', 1, 1, 1, 0, 1, 0, 0, 0, 1, 0),"
150150
"('ExtractSimpleIsosurface', 1, 0, 0, 0, 0, 0, 0, 0, 0, 0),"
151-
"('ClipVolumeByIsovalue', 1, 0, 0, 0, 0, 0, 0, 0, 0, 0),"
152-
"('RemoveUnsedNodes', 1, 0, 0, 0, 1, 0, 1, 0, 0, 1),"
151+
"('ClipVolumeByIsovalue', 1, 0, 0, 0, 0, 0, 0, 0, 0, 0),"
152+
"('RemoveUnsedNodes', 1, 0, 0, 0, 1, 0, 1, 0, 0, 1),"
153153
"('ShowField', 1, 1, 1, 0, 0, 0, 0, 0, 1, 0)";
154154

155155
std::string error;
@@ -213,19 +213,20 @@ class ModuleDatabaseQueries : public ::testing::Test
213213

214214
DatabaseManager ModuleDatabaseQueries::moduleDb_;
215215

216-
TEST_F(ModuleDatabaseQueries, CountEnabledModules)
217-
{
218-
auto count = countEnabledModules();
219-
std::cout << "# of enabled modules: " << count << std::endl;
220-
EXPECT_EQ(57, count);
221-
}
222-
223216
//TODO: figure out better way to generate a report from these tests. Need a process to enforce keeping them up to date (special branch?)
224217
namespace
225218
{
226219
bool assertTestStatistics = false;
227220
}
228221

222+
TEST_F(ModuleDatabaseQueries, CountEnabledModules)
223+
{
224+
auto count = countEnabledModules();
225+
std::cout << "# of enabled modules: " << count << std::endl;
226+
if (assertTestStatistics)
227+
EXPECT_EQ(57, count);
228+
}
229+
229230
TEST_F(ModuleDatabaseQueries, AllModulesUnitTested)
230231
{
231232
auto count = countModulesWhere("ModuleUnitTest > 0");

src/Core/ImportExport/GenericIEPlugin.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,12 @@ std::string dialogBoxFilterFromFileTypeDescription(const GenericIEPluginManager<
350350
return filter.str();
351351
}
352352

353+
template <class Data>
354+
std::function<std::string(const std::string&)> dialogBoxFilterFromFileTypeDescription(const GenericIEPluginManager<Data>& mgr)
355+
{
356+
return [&mgr](const std::string& name) { return dialogBoxFilterFromFileTypeDescription(mgr, name); };
357+
}
358+
353359
template <class Data>
354360
std::string printPluginDescriptionsForFilter(const GenericIEPluginManager<Data>& mgr, const std::string& defaultType, const std::vector<std::string>& pluginNames)
355361
{

0 commit comments

Comments
 (0)