From 61cc95696cfc492a82a6c8fe39b81a6cb9ffde86 Mon Sep 17 00:00:00 2001 From: randomdan Date: Thu, 6 Nov 2014 23:24:23 +0000 Subject: Write test data to the correct paths --- slicer/test/fileStructure.cpp | 6 +----- slicer/test/fileStructure.h | 2 -- 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 & 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 p = Slicer::Deserialize(input); @@ -64,7 +66,9 @@ class FileBased : public FileStructure { const boost::function & 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); -- cgit v1.2.3