Refactor Input/Output file to use const char* instead of standard string, and to use parent_folder and file_name for input and output files. This also incorporates the move from nearby_connections to nearby.

PiperOrigin-RevId: 415587802
This commit is contained in:
jfcarroll
2021-12-10 12:49:50 -08:00
committed by Copybara-Service
parent 5ba6623eac
commit f12bb6c405
48 changed files with 540 additions and 377 deletions
+13 -7
View File
@@ -15,14 +15,8 @@
#ifndef PLATFORM_IMPL_WINDOWS_TEST_UTILS_H_
#define PLATFORM_IMPL_WINDOWS_TEST_UTILS_H_
#include <Windows.h>
#include <stdio.h>
#include <string>
#include <xstring>
#include "platform/base/payload_id.h"
#define TEST_BUFFER_SIZE 256
#define TEST_PAYLOAD_ID 64l
#define TEST_STRING \
@@ -39,9 +33,21 @@
"eu tellus. Cras feugiat ornare vestibulum. Nullam at ipsum vestibulum " \
"sapien luctus dictum ac vel ligula."
#define TEST_FILE_PATH std::string("testfilename.txt")
namespace test_utils {
std::wstring StringToWideString(const std::string& s);
std::string GetPayloadPath(location::nearby::PayloadId payload_id);
class TempPath {
public:
enum Location {
Local, // Some local directory, works for unittest and on borglets.
CNSTest, // Creates a directory on the cns test cell.
};
TempPath(Location location) : location_(location) {}
Location location_;
const std::string path() { return ""; }
};
} // namespace test_utils
#endif // PLATFORM_IMPL_WINDOWS_TEST_UTILS_H_