Skip to content

Commit 0c2d1cd

Browse files
authored
Update ort_model_only_test.cc
Fix for undeclared identifier linker error
1 parent b133782 commit 0c2d1cd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

onnxruntime/test/framework/ort_model_only_test.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424

2525
#include "gmock/gmock.h"
2626
#include "gtest/gtest.h"
27+
#define WIDEN2(x) L##x
28+
#define WIDEN(x) WIDEN2(x)
2729

2830
using namespace ONNX_NAMESPACE;
2931

@@ -41,7 +43,7 @@ std::filesystem::path ResolveTestPath(const std::filesystem::path& path) {
4143
}
4244

4345
static const std::filesystem::path kSourceTestRoot =
44-
std::filesystem::path{ORT_TSTR(__FILE__)}.parent_path().parent_path();
46+
std::filesystem::path{WIDEN(__FILE__)}.parent_path().parent_path();
4547
std::filesystem::path source_candidate = kSourceTestRoot / path;
4648
if (std::filesystem::exists(source_candidate)) {
4749
return source_candidate;

0 commit comments

Comments
 (0)