Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

51 lines (37 sloc) 1.411 kB
// __BEGIN_LICENSE__
// Copyright (C) 2006-2010 United States Government as represented by
// the Administrator of the National Aeronautics and Space Administration.
// All Rights Reserved.
// __END_LICENSE__
#include <gtest/gtest.h>
#include <test/Helpers.h>
#include <vw/Core/Settings.h>
#include <boost/filesystem/operations.hpp>
namespace fs = boost::filesystem;
int main(int argc, char **argv) {
// Disable the user's config file
vw::vw_settings().set_rc_filename("");
::testing::InitGoogleTest(&argc, argv);
// Default to the "threadsafe" style because we can't delete our singletons
// yet; this style of test launches a new process, so the singletons are
// fresh.
::testing::FLAGS_gtest_death_test_style = "threadsafe";
return RUN_ALL_TESTS();
}
namespace vw {
namespace test {
UnlinkName::UnlinkName(const std::string& base, const std::string& directory)
: std::string(directory + "/" + base) {
VW_ASSERT(!directory.empty(), ArgumentErr() << "An empty directory path is dangerous");
fs::remove_all(this->c_str());
}
UnlinkName::UnlinkName(const char *base, const std::string& directory)
: std::string(directory + "/" + base) {
VW_ASSERT(!directory.empty(), ArgumentErr() << "An empty directory path is dangerous");
fs::remove_all(this->c_str());
}
UnlinkName::~UnlinkName() {
if (!this->empty())
fs::remove_all(this->c_str());
}
}} // namespace vw::test
Jump to Line
Something went wrong with that request. Please try again.