commit 8594cfd27029857d6e0937e8f35a88f652aadccc
Author: Jon Bell <j.to.the.bell@gmail.com>
AuthorDate: Wed Oct 18 22:12:06 2023 -0600
Commit: Jon Bell <j.to.the.bell@gmail.com>
CommitDate: Wed Oct 18 22:12:06 2023 -0600
fix broken builds
move file system used by commented out e2e test into e2e test file
---
source/filehelpers.cpp | 15 ---------------
source/filehelpers.h | 2 --
test/endtoendtests.cpp | 17 +++++++++++++++++
3 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/source/filehelpers.cpp b/source/filehelpers.cpp
index ffdbb12..0e681c7 100644
--- a/source/filehelpers.cpp
+++ b/source/filehelpers.cpp
@@ -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){
@@ -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;
-}
-
diff --git a/source/filehelpers.h b/source/filehelpers.h
index 0251204..1482ca4 100644
--- a/source/filehelpers.h
+++ b/source/filehelpers.h
@@ -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);
diff --git a/test/endtoendtests.cpp b/test/endtoendtests.cpp
index 4cfb290..6ec850e 100644
--- a/test/endtoendtests.cpp
+++ b/test/endtoendtests.cpp
@@ -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);