diff --git a/tests/unit/unittest/clangquerygatherer-test.cpp b/tests/unit/unittest/clangquerygatherer-test.cpp index b4808b45c57..d1ff0a508e3 100644 --- a/tests/unit/unittest/clangquerygatherer-test.cpp +++ b/tests/unit/unittest/clangquerygatherer-test.cpp @@ -25,6 +25,8 @@ #include "googletest.h" +#include "filesystem-utilities.h" + #include "sourcerangecontainer-matcher.h" #include @@ -77,13 +79,13 @@ protected: Utils::SmallString sourceContent{"#include \"query_simplefunction.h\"\nvoid f() {}"}; FileContainer source{{TESTDATA_DIR, "query_simplefunction.cpp"}, sourceContent.clone(), - {"cc", TESTDATA_DIR"/query_simplefunction.cpp", "-I", TESTDATA_DIR}}; + {"cc", toNativePath(TESTDATA_DIR"/query_simplefunction.cpp"), "-I", TESTDATA_DIR}}; FileContainer source2{{TESTDATA_DIR, "query_simplefunction2.cpp"}, {}, - {"cc", TESTDATA_DIR"/query_simplefunction2.cpp", "-I", TESTDATA_DIR}}; + {"cc", toNativePath(TESTDATA_DIR"/query_simplefunction2.cpp"), "-I", TESTDATA_DIR}}; FileContainer source3{{TESTDATA_DIR, "query_simplefunction3.cpp"}, {}, - {"cc", TESTDATA_DIR"/query_simplefunction3.cpp", "-I", TESTDATA_DIR}}; + {"cc", toNativePath(TESTDATA_DIR"/query_simplefunction3.cpp"), "-I", TESTDATA_DIR}}; Utils::SmallString unsavedContent{"void f();"}; FileContainer unsaved{{TESTDATA_DIR, "query_simplefunction.h"}, unsavedContent.clone(), diff --git a/tests/unit/unittest/refactoringserver-test.cpp b/tests/unit/unittest/refactoringserver-test.cpp index 39db78bdcd0..40ca87031ea 100644 --- a/tests/unit/unittest/refactoringserver-test.cpp +++ b/tests/unit/unittest/refactoringserver-test.cpp @@ -25,6 +25,7 @@ #include "googletest.h" +#include "filesystem-utilities.h" #include "mockrefactoringclient.h" #include "sourcerangecontainer-matcher.h" @@ -78,7 +79,7 @@ protected: Utils::SmallString sourceContent{"void f()\n {}"}; FileContainer source{{TESTDATA_DIR, "query_simplefunction.cpp"}, sourceContent.clone(), - {"cc", TESTDATA_DIR"/query_simplefunction.cpp"}}; + {"cc", toNativePath(TESTDATA_DIR"/query_simplefunction.cpp")}}; int processingSlotCount = 2; };