Fixed unit tests. Unit tests were failing locally, mostly just type mismatches, but there was an error in the GetDownloadPath for the test utilities.

PiperOrigin-RevId: 474358069
This commit is contained in:
John Carroll
2022-09-14 12:17:35 -07:00
committed by Copybara-Service
parent 6b5251f8d2
commit 0b57cd5c5f
3 changed files with 43 additions and 21 deletions
@@ -16,8 +16,12 @@
#include <shlobj.h>
#include <algorithm>
#include <sstream>
#include "absl/strings/str_format.h"
#include "absl/strings/str_replace.h"
namespace test_utils {
std::wstring StringToWideString(const std::string& s) {
int len;
@@ -60,11 +64,12 @@ std::string GetPayloadPath(location::nearby::PayloadId payload_id) {
CoTaskMemFree(basePath);
std::stringstream path("");
std::string path =
absl::StrFormat("%s\\%s", fullPath, std::to_string(payload_id));
path << fullPath << "\\" << std::to_string(payload_id);
path = absl::StrReplaceAll(path, {{"\\", "/"}});
return path.str();
return path;
}
} // namespace test_utils