mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-16 15:36:12 -04:00
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:
committed by
Copybara-Service
parent
6b5251f8d2
commit
0b57cd5c5f
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user