Skip to content

Commit

Permalink
fix broken builds
Browse files Browse the repository at this point in the history
move file system used by commented out e2e test into e2e test file
  • Loading branch information
jtothebell committed Oct 19, 2023
1 parent 56551b4 commit 8594cfd
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
15 changes: 0 additions & 15 deletions source/filehelpers.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#include <string>
#include <fstream>
#include <vector>
#include <filesystem>
namespace fs = std::filesystem;

//http://insanecoding.blogspot.com/2011/11/how-to-read-in-file-in-c.html
std::string get_file_contents(std::string filename){
Expand Down Expand Up @@ -127,16 +125,3 @@ bool isCPostFile (std::string const &fullString) {
return !isHiddenFile(fullString) &&
fullString.rfind("cpost", 0) == 0;
}

std::vector<std::string> get_cart_files_in_dir(std::string directory){
std::vector<std::string> files;
for (const auto & entry : fs::directory_iterator(directory)) {
std::string path = entry.path().string();
if (isCartFile(path)) {
files.push_back(path.substr(path.find_last_of("/\\") + 1));
}
}

return files;
}

2 changes: 0 additions & 2 deletions source/filehelpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,3 @@ bool isHiddenFile (std::string const &fullString);
bool isAbsolutePath (std::string const &path);

std::string getFileExtension(std::string const &path);

std::vector<std::string> get_cart_files_in_dir(std::string directory);
17 changes: 17 additions & 0 deletions test/endtoendtests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,23 @@ bool verifyScreenshot(Vm* vm, Host* host, std::string screenshotFilename) {

}

/*
#include <filesystem>
namespace fs = std::filesystem;
std::vector<std::string> get_cart_files_in_dir(std::string directory){
std::vector<std::string> files;
for (const auto & entry : fs::directory_iterator(directory)) {
std::string path = entry.path().string();
if (isCartFile(path)) {
files.push_back(path.substr(path.find_last_of("/\\") + 1));
}
}
return files;
}
*/

TEST_CASE("Loading and running carts") {
Host* host = new Host();
Vm* vm = new Vm(host);
Expand Down

0 comments on commit 8594cfd

Please sign in to comment.