-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't delete old log Don't delete existing -xpansion directory Create -xpansion and lp directories during problem generation CPP Remove "dead" code path using results from file or from antares: simplify, only keep zip path
- Loading branch information
1 parent
7693da1
commit debef8a
Showing
10 changed files
with
265 additions
and
255 deletions.
There are no files selected for viewing
332 changes: 176 additions & 156 deletions
332
conception/SequenceDiagrams/FileManipulation/diagram.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// | ||
// Created by marechaljas on 10/10/23. | ||
// | ||
|
||
#include <filesystem> | ||
|
||
#include "ArchiveIO.h" | ||
#include "LoggerBuilder.h" | ||
#include "RunProblemGeneration.h" | ||
#include "gtest/gtest.h" | ||
|
||
TEST(InitializationTest, FoldersAreEmpty) { | ||
auto workingDirectory = | ||
std::filesystem::temp_directory_path() / std::tmpnam(nullptr); | ||
auto simulationDirectory = workingDirectory / "output" / "simulation"; | ||
auto logger = emptyLogger(); | ||
std::filesystem::create_directories(simulationDirectory); | ||
|
||
auto xpansionDirectory = | ||
(simulationDirectory.parent_path() / | ||
(simulationDirectory.filename().string() + "-Xpansion")); | ||
std::filesystem::create_directories(xpansionDirectory); | ||
std::ofstream emptyfile(xpansionDirectory / "garbage.txt"); | ||
|
||
EXPECT_TRUE(std::filesystem::exists(xpansionDirectory / "garbage.txt")); | ||
EXPECT_THROW( | ||
RunProblemGeneration(simulationDirectory, "integer", "", "", logger, | ||
simulationDirectory / "logs.txt", "", false), | ||
ArchiveIOGeneralException); | ||
|
||
EXPECT_FALSE(std::filesystem::exists(simulationDirectory / "garbage.txt")); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters