2017-02-17 09:57:44 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
2017-03-04 01:45:20 +00:00
|
|
|
#include <memory>
|
2017-02-17 09:57:44 +00:00
|
|
|
|
2017-03-05 19:48:05 +00:00
|
|
|
// Finds all files in the given folder. This is recursive.
|
|
|
|
std::vector<std::string> GetFilesInFolder(std::string folder, bool add_folder_to_path);
|
2017-02-17 09:57:44 +00:00
|
|
|
std::vector<std::string> ReadLines(std::string filename);
|
2017-02-23 08:18:54 +00:00
|
|
|
void ParseTestExpectation(std::string filename, std::string* expected_output);
|
|
|
|
|
2017-03-01 08:36:11 +00:00
|
|
|
void Fail(const std::string& message);
|
|
|
|
|
|
|
|
|
2017-03-04 01:45:20 +00:00
|
|
|
void WriteToFile(const std::string& filename, const std::string& content);
|
|
|
|
|
|
|
|
// note: this implementation does not disable this overload for array types
|
|
|
|
// See http://en.cppreference.com/w/cpp/memory/unique_ptr/make_unique#Possible_Implementatiog
|
|
|
|
template<typename T, typename... Args>
|
|
|
|
std::unique_ptr<T> MakeUnique(Args&&... args) {
|
|
|
|
return std::unique_ptr<T>(new T(std::forward<Args>(args)...));
|
|
|
|
}
|