We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2cdf910 commit f4a706eCopy full SHA for f4a706e
src/substrait/function/tests/FunctionLookupTest.cpp
@@ -2,6 +2,7 @@
2
3
#include <gtest/gtest.h>
4
5
+#include <filesystem>
6
#include <iostream>
7
8
#include "substrait/function/FunctionLookup.h"
@@ -12,9 +13,10 @@ class FunctionLookupTest : public ::testing::Test {
12
13
protected:
14
static std::string getExtensionAbsolutePath() {
15
const std::string absolutePath = __FILE__;
- auto const pos = absolutePath.find_last_of('/');
16
- return absolutePath.substr(0, pos) +
17
- "/../../../../third_party/substrait/extensions/";
+ std::filesystem::path path(absolutePath);
+ std::filesystem::path parentDir = path.parent_path();
18
+ return (parentDir / "../../../../third_party/substrait/extensions/")
19
+ .string();
20
}
21
22
void SetUp() override {
0 commit comments