Skip to content

Commit

Permalink
Remove returns from BOOST_AUTO_TEST_CASEs
Browse files Browse the repository at this point in the history
These returns are not needed for the tests to run properly, and their
inconsistent use could cause confusion down the road.

Fixes #337.
  • Loading branch information
gadomski committed May 1, 2014
1 parent ffcc61c commit 760c6f4
Show file tree
Hide file tree
Showing 60 changed files with 0 additions and 436 deletions.
12 changes: 0 additions & 12 deletions test/unit/BoundsTest.cpp
Expand Up @@ -218,8 +218,6 @@ BOOST_AUTO_TEST_CASE(test_grow)
r4.grow(ptHi);
Bounds<int> r5(-1,-2,20,201);
BOOST_CHECK(r4 == r5);

return;
}


Expand Down Expand Up @@ -257,8 +255,6 @@ BOOST_AUTO_TEST_CASE(test_output)

BOOST_CHECK_EQUAL(out2, "([1, 101], [2, 102])");
BOOST_CHECK_EQUAL(out3, "([1.1, 101.1], [2.2, 102.2], [3.3, 103.3])");

return;
}


Expand All @@ -277,8 +273,6 @@ BOOST_AUTO_TEST_CASE(BoundsTest_ptree)
const std::string ref = xml_header + "<0><minimum>1</minimum><maximum>101</maximum></0><1><minimum>2</minimum><maximum>102</maximum></1>";

BOOST_CHECK_EQUAL(ref, out1);

return;
}


Expand All @@ -297,8 +291,6 @@ BOOST_AUTO_TEST_CASE(test_input)
Bounds<double> empty2;
empty2_s >> empty2;
BOOST_CHECK_EQUAL(true, empty2.empty());

return;
}


Expand All @@ -308,16 +300,12 @@ BOOST_AUTO_TEST_CASE(test_lexicalcast_whitespace)
const Bounds<double> b2 = boost::lexical_cast< Bounds<double> >("([1, 101], [2, 102], [3, 103])");

BOOST_CHECK_EQUAL(b1, b2);

return;
}

BOOST_AUTO_TEST_CASE(test_wkt)
{
const Bounds<double> b(1.1,2.2,3.3,101.1,102.2,103.3);
BOOST_CHECK_EQUAL(b.toWKT(1), "POLYGON ((1.1 2.2, 1.1 102.2, 101.1 102.2, 101.1 2.2, 1.1 2.2))");

return;
}

BOOST_AUTO_TEST_SUITE_END()
4 changes: 0 additions & 4 deletions test/unit/ConfigTest.cpp
Expand Up @@ -65,8 +65,6 @@ BOOST_AUTO_TEST_CASE(test_3rdparty_libs)
#else
BOOST_CHECK(!laszip);
#endif

return;
}

BOOST_AUTO_TEST_CASE(test_version)
Expand All @@ -87,8 +85,6 @@ BOOST_AUTO_TEST_CASE(test_version)

int bignum = GetVersionInteger();
BOOST_CHECK(bignum > 0);

return;
}

BOOST_AUTO_TEST_SUITE_END()
4 changes: 0 additions & 4 deletions test/unit/DimensionTest.cpp
Expand Up @@ -151,9 +151,6 @@ BOOST_AUTO_TEST_CASE(DimensionTest_ptree)
BOOST_CHECK_EQUAL(tree.get<std::string>("namespace"), "");

BOOST_CHECK_EQUAL(tree.get<std::string>("uuid"), "9bf8d966-0c0d-4c94-a14e-bce97e860bde");


return;
}


Expand All @@ -166,7 +163,6 @@ BOOST_AUTO_TEST_CASE(DimensionTest_Interpretation)
dimension::Interpretation interp = Dimension::getInterpretation(x.getInterpretationName());

BOOST_CHECK_EQUAL(interp, pdal::dimension::SignedInteger);
return;
}


Expand Down
4 changes: 0 additions & 4 deletions test/unit/EnvironmentTest.cpp
Expand Up @@ -54,8 +54,6 @@ BOOST_AUTO_TEST_CASE(EnvironmentTest_1)

(void)python_env;
#endif

return;
}

boost::test_tools::predicate_result
Expand Down Expand Up @@ -127,8 +125,6 @@ BOOST_AUTO_TEST_CASE(EnvironmentTest_rng)
// }
//
// BOOST_CHECK(compare_uuids(e, f));

return;
}


Expand Down
10 changes: 0 additions & 10 deletions test/unit/FileUtilsTest.cpp
Expand Up @@ -90,8 +90,6 @@ BOOST_AUTO_TEST_CASE(test_readFileIntoString)
const std::string ref = "Redistribution and use in source and binary forms, with or without modification...";

BOOST_CHECK(source == ref);

return;
}


Expand All @@ -102,8 +100,6 @@ BOOST_AUTO_TEST_CASE(test_getcwd)
const std::string cwd = FileUtils::getcwd();
BOOST_CHECK(cwd == "D:/dev/pdal/test/unit/");
#endif

return;
}


Expand Down Expand Up @@ -149,8 +145,6 @@ BOOST_AUTO_TEST_CASE(test_toAbsolutePath)
// check 1-arg version: make absolute when file is already absolute
const string e = FileUtils::toAbsolutePath(drive+"/baz/foo.txt", drive+"/a/b/c/d");
compare_paths(e, drive + "/baz/foo.txt");

return;
}


Expand All @@ -163,8 +157,6 @@ BOOST_AUTO_TEST_CASE(test_getDirectory)
// test relative case
const std::string b = FileUtils::getDirectory("a/b/foo.txt");
compare_paths(b, "a/b/");

return;
}


Expand All @@ -177,8 +169,6 @@ BOOST_AUTO_TEST_CASE(test_isAbsolute)
// test relative case
const bool b = FileUtils::isAbsolutePath("a/b/foo.txt");
BOOST_CHECK(!b);

return;
}


Expand Down
6 changes: 0 additions & 6 deletions test/unit/GDALUtilsTest.cpp
Expand Up @@ -94,8 +94,6 @@ BOOST_AUTO_TEST_CASE(test_wrapped_vsifile_read)
VSIFCloseL/*fclose*/(fp);

pdal::FileUtils::deleteFile(tempfile);

return;
}


Expand Down Expand Up @@ -146,8 +144,6 @@ BOOST_AUTO_TEST_CASE(GDALUtilsTest_test_vsifile_write)

pdal::FileUtils::deleteFile(tempfile_a);
pdal::FileUtils::deleteFile(tempfile_b);

return;
}


Expand Down Expand Up @@ -208,8 +204,6 @@ BOOST_AUTO_TEST_CASE(test_wrapped_vsifile_subsequence)
VSIFCloseL/*fclose*/(vsi_file);

pdal::FileUtils::deleteFile(tempfile);

return;
}


Expand Down
11 changes: 0 additions & 11 deletions test/unit/LogTest.cpp
Expand Up @@ -85,9 +85,6 @@ BOOST_AUTO_TEST_CASE(test_one)
{
FileUtils::deleteFile(Support::temppath("mylog_one.txt"));
}


return;
}

#ifdef PDAL_HAVE_PYTHON
Expand Down Expand Up @@ -180,8 +177,6 @@ BOOST_AUTO_TEST_CASE(test_two_a)

//FileUtils::deleteFile(Support::temppath("logtest_2.txt"));
//FileUtils::deleteFile(Support::temppath("logtest_3.txt"));

return;
}


Expand Down Expand Up @@ -286,8 +281,6 @@ BOOST_AUTO_TEST_CASE(test_two_b)
{
FileUtils::deleteFile(Support::temppath("logtest_test_two_b_3.txt"));
}

return;
}


Expand Down Expand Up @@ -352,10 +345,6 @@ BOOST_AUTO_TEST_CASE(test_three)
{
FileUtils::deleteFile(Support::temppath("mylog_three.txt"));
}



return;
}

#endif
Expand Down
10 changes: 0 additions & 10 deletions test/unit/MetadataTest.cpp
Expand Up @@ -136,8 +136,6 @@ BOOST_AUTO_TEST_CASE(test_construction)
m.setValue<boost::uint64_t>(u64);
BOOST_CHECK_EQUAL(m.getValue<boost::uint64_t>(), 64u);
BOOST_CHECK_EQUAL(m.getType(), "nonNegativeInteger");

return;
}

BOOST_AUTO_TEST_CASE(test_metadata_copy)
Expand Down Expand Up @@ -170,8 +168,6 @@ BOOST_AUTO_TEST_CASE(test_metadata_copy)
// pdal::Metadata m22 = b2.getEntry("m2");
// BOOST_CHECK_EQUAL(m22.getValue<boost::uint32_t>(), 1u);
//BOOST_CHECK_THROW(m22.getValue<boost::uint32_t>(), boost::bad_get);

return;
}

BOOST_AUTO_TEST_CASE(test_metadata_set)
Expand All @@ -195,8 +191,6 @@ BOOST_AUTO_TEST_CASE(test_metadata_set)


b.addMetadata("uuid", boost::uuids::nil_uuid());

return;
}

BOOST_AUTO_TEST_CASE(test_metadata_stage)
Expand All @@ -222,17 +216,13 @@ BOOST_AUTO_TEST_CASE(test_metadata_stage)
// boost::property_tree::write_xml(std::cout, pipeline_metadata.toPTree());

BOOST_CHECK_EQUAL(pipeline_metadata.toPTree().get_child("metadata").size(), 32u);

return;
}

BOOST_AUTO_TEST_CASE(test_metadata_constructor_no_throw)
{

pdal::Bounds<double> b;
pdal::Metadata entry("name", b);

return;
}


Expand Down
18 changes: 0 additions & 18 deletions test/unit/OptionsTest.cpp
Expand Up @@ -62,8 +62,6 @@ BOOST_AUTO_TEST_CASE(test_static_options)
BOOST_CHECK(!opts.hasOption("metes"));
const boost::property_tree::ptree& pt = opts.toPTree();
BOOST_CHECK(pt.size() == 3);

return;
}


Expand Down Expand Up @@ -95,8 +93,6 @@ BOOST_AUTO_TEST_CASE(test_option_writing)
boost::property_tree::xml_parser::write_xml(ostr_s, tree_s);
const std::string str_s = ostr_s.str();
BOOST_CHECK(str_s == ref_s);

return;
}


Expand All @@ -121,8 +117,6 @@ BOOST_AUTO_TEST_CASE(test_option_reading)
BOOST_CHECK(opt_from_ptree.getDescription() == "This is my integral option.");
BOOST_CHECK(opt_from_ptree.getValue<std::string>() == "17");
BOOST_CHECK(opt_from_ptree.getValue<int>() == 17);

return;
}


Expand All @@ -141,8 +135,6 @@ BOOST_AUTO_TEST_CASE(test_options_copy_ctor)

BOOST_CHECK(copy.hasOption("my_int"));
BOOST_CHECK(copy.hasOption("my_string"));

return;
}

BOOST_AUTO_TEST_CASE(test_options_multi)
Expand All @@ -164,8 +156,6 @@ BOOST_AUTO_TEST_CASE(test_options_multi)

pdal::Option const& s = o->getOption("b");
BOOST_CHECK_EQUAL(s.getValue<std::string>(), "2");

return;
}

BOOST_AUTO_TEST_CASE(test_options_writing)
Expand Down Expand Up @@ -193,8 +183,6 @@ BOOST_AUTO_TEST_CASE(test_options_writing)
BOOST_CHECK(val_s == "Yow.");
BOOST_CHECK(desc_i == "This is my integral option.");
BOOST_CHECK(desc_s == "This is my stringy option.");

return;
}


Expand All @@ -211,8 +199,6 @@ BOOST_AUTO_TEST_CASE(test_options_reading)

BOOST_CHECK(opt.getValue<std::string>() == "17");
BOOST_CHECK(opt.getValue<int>() == 17);

return;
}


Expand Down Expand Up @@ -261,8 +247,6 @@ BOOST_AUTO_TEST_CASE(test_valid_options)

BOOST_CHECK(options[1].getValue<std::string>() == "nineteen");
}

return;
}


Expand Down Expand Up @@ -298,8 +282,6 @@ BOOST_AUTO_TEST_CASE(Options_test_bool)
BOOST_CHECK_EQUAL(bv, false);
BOOST_CHECK_EQUAL(cv, true);
BOOST_CHECK_EQUAL(dv, false);

return;
}


Expand Down
4 changes: 0 additions & 4 deletions test/unit/PipelineManagerTest.cpp
Expand Up @@ -70,8 +70,6 @@ BOOST_AUTO_TEST_CASE(PipelineManagerTest_test1)
}

FileUtils::deleteFile("temp.las");

return;
}


Expand Down Expand Up @@ -150,8 +148,6 @@ BOOST_AUTO_TEST_CASE(PipelineManagerTest_test2)
}

FileUtils::deleteFile("temp.las");

return;
}

BOOST_AUTO_TEST_SUITE_END()
2 changes: 0 additions & 2 deletions test/unit/PointBufferCacheTest.cpp
Expand Up @@ -89,8 +89,6 @@ BOOST_AUTO_TEST_CASE(test1)
BOOST_CHECK(lookupHits == 5);
BOOST_CHECK(insertMisses == 4);
BOOST_CHECK(insertHits == 0);

return;
}


Expand Down

0 comments on commit 760c6f4

Please sign in to comment.