diff options
author | randomdan <randomdan@localhost> | 2014-11-06 23:24:23 +0000 |
---|---|---|
committer | randomdan <randomdan@localhost> | 2014-11-06 23:24:23 +0000 |
commit | 61cc95696cfc492a82a6c8fe39b81a6cb9ffde86 (patch) | |
tree | 76382acbc0be5046f12c2e6d16ab22e1bf54d6e3 | |
parent | Big refactor to use Boost UTF (diff) | |
download | slicer-61cc95696cfc492a82a6c8fe39b81a6cb9ffde86.tar.bz2 slicer-61cc95696cfc492a82a6c8fe39b81a6cb9ffde86.tar.xz slicer-61cc95696cfc492a82a6c8fe39b81a6cb9ffde86.zip |
Write test data to the correct paths
-rw-r--r-- | slicer/test/fileStructure.cpp | 6 | ||||
-rw-r--r-- | slicer/test/fileStructure.h | 2 | ||||
-rw-r--r-- | slicer/test/serializers.cpp | 12 |
3 files changed, 9 insertions, 11 deletions
diff --git a/slicer/test/fileStructure.cpp b/slicer/test/fileStructure.cpp index d586786..28d1229 100644 --- a/slicer/test/fileStructure.cpp +++ b/slicer/test/fileStructure.cpp @@ -8,13 +8,9 @@ FileStructure::FileStructure() : bjamout(me.parent_path()), root(me.parent_path().parent_path().parent_path().parent_path()), slice(fs::change_extension(root / base, ".ice")), - tmp(root / "bin" / "slicer"), - tmpf(tmp / "byFile"), - tmph(tmp / "byHelper") + tmp(root / "bin" / "slicer") { fs::create_directory(tmp); - fs::create_directory(tmpf); - fs::create_directory(tmph); } FileStructure::~FileStructure() diff --git a/slicer/test/fileStructure.h b/slicer/test/fileStructure.h index 475146c..ac5d4dd 100644 --- a/slicer/test/fileStructure.h +++ b/slicer/test/fileStructure.h @@ -17,8 +17,6 @@ class FileStructure { const fs::path root; const fs::path slice; const fs::path tmp; - const fs::path tmpf; - const fs::path tmph; }; #endif diff --git a/slicer/test/serializers.cpp b/slicer/test/serializers.cpp index 74ecf40..0319473 100644 --- a/slicer/test/serializers.cpp +++ b/slicer/test/serializers.cpp @@ -28,9 +28,11 @@ class FileBased : public FileStructure { verifyByFile(const fs::path & infile, const boost::function<void(const T &)> & check = NULL) { const fs::path input = root / "initial" / infile; - const fs::path output = tmp / infile; - const fs::path outputJson = tmp / fs::change_extension(infile, "json"); - const fs::path outputXml = tmp / fs::change_extension(infile, "xml"); + const fs::path tmpf = tmp / "byFile"; + fs::create_directory(tmpf); + const fs::path output = tmpf / infile; + const fs::path outputJson = tmpf / fs::change_extension(infile, "json"); + const fs::path outputXml = tmpf / fs::change_extension(infile, "xml"); BOOST_TEST_CHECKPOINT("Deserialize: " << input); IceInternal::Handle<T> p = Slicer::Deserialize<DeserializerIn, T>(input); @@ -64,7 +66,9 @@ class FileBased : public FileStructure { const boost::function<void(const T &)> & check = NULL) { const fs::path input = root / "initial" / infile; - const fs::path output = tmp / infile; + const fs::path tmph = tmp / "byHandler"; + fs::create_directory(tmph); + const fs::path output = tmph / infile; BOOST_TEST_CHECKPOINT("Read: " << input); Internal docRead = in(input); |