Skip to content

Commit a01983e

Browse files
Fixing config parsing test
1 parent 31f3ecd commit a01983e

File tree

2 files changed

+14
-10
lines changed

2 files changed

+14
-10
lines changed

Include/Tests/ConfigParsing/MockComponents.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@ namespace ghc
1919
CO_INSERT_METHOD( OverrideInstance,
2020
bool,
2121
Mock_exists,
22-
(const std::string&, std::error_code&),
22+
(const ghc::filesystem::path&, std::error_code&),
2323
/* no prepend */,
2424
noexcept)
2525

2626
CO_INSERT_METHOD( OverrideInstance,
2727
bool,
2828
Mock_is_directory,
29-
(const std::string&, std::error_code&),
29+
(const ghc::filesystem::path&, std::error_code&),
3030
/* no prepend */,
3131
noexcept)
3232
}

Src/Tests/ConfigParsingTest.cpp

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -60,17 +60,19 @@ int main(int argc, char** argv)
6060
*/
6161

6262
CO_INSTRUCT_REF (OverrideInstance, ghc::filesystem, Mock_exists)
63-
.WhenCalledWith<const std::string&, CO_ANY_TYPE>(configPath, CO_ANY)
63+
.WhenCalledWith<const ghc::filesystem::path&, CO_ANY_TYPE>(configPath, CO_ANY)
6464
.Times(1)
6565
.Returns<bool>(true)
6666
.Expected();
6767
CO_INSTRUCT_REF (OverrideInstance, ghc::filesystem, Mock_exists)
68-
.WhenCalledWith<const std::string&, CO_ANY_TYPE>(versionPath, CO_ANY)
68+
.WhenCalledWith<const ghc::filesystem::path&, CO_ANY_TYPE>( versionPath,
69+
CO_ANY)
6970
.Times(1)
7071
.Returns<bool>(true)
7172
.Expected();
7273
CO_INSTRUCT_REF (OverrideInstance, ghc::filesystem, Mock_is_directory)
73-
.WhenCalledWith<const std::string&, CO_ANY_TYPE>(configPath, CO_ANY)
74+
.WhenCalledWith<const ghc::filesystem::path&, CO_ANY_TYPE>( configPath,
75+
CO_ANY)
7476
.Times(1)
7577
.Returns<bool>(false)
7678
.Expected();
@@ -292,12 +294,14 @@ int main(int argc, char** argv)
292294
(
293295
ssTEST_CALL_COMMON_CLEANUP();
294296
CO_INSTRUCT_REF (OverrideInstance, ghc::filesystem, Mock_exists)
295-
.WhenCalledWith<const std::string&, CO_ANY_TYPE>(configPath, CO_ANY)
297+
.WhenCalledWith<const ghc::filesystem::path&, CO_ANY_TYPE>( configPath,
298+
CO_ANY)
296299
.Times(1)
297300
.Returns<bool>(true)
298301
.Expected();
299302
CO_INSTRUCT_REF (OverrideInstance, ghc::filesystem, Mock_exists)
300-
.WhenCalledWith<const std::string&, CO_ANY_TYPE>(versionPath, CO_ANY)
303+
.WhenCalledWith<const ghc::filesystem::path&, CO_ANY_TYPE>( versionPath,
304+
CO_ANY)
301305
.Times(1)
302306
.Returns<bool>(false)
303307
.Expected();
@@ -660,14 +664,14 @@ int main(int argc, char** argv)
660664
"some/config/dir/Default/gccCompilerLinker.yaml";
661665

662666
CO_INSTRUCT_REF (OverrideInstance, ghc::filesystem, Mock_exists)
663-
.WhenCalledWith<const std::string&,
667+
.WhenCalledWith<const ghc::filesystem::path&,
664668
CO_ANY_TYPE>( gccExpectedImportPath,
665669
CO_ANY)
666670
.Returns<bool>(true)
667671
.Times(1)
668672
.Expected();
669673
CO_INSTRUCT_REF (OverrideInstance, ghc::filesystem, Mock_exists)
670-
.WhenCalledWith<const std::string&,
674+
.WhenCalledWith<const ghc::filesystem::path&,
671675
CO_ANY_TYPE>( filetypesExpectedImportPath,
672676
CO_ANY)
673677
.Returns<bool>(true)
@@ -676,7 +680,7 @@ int main(int argc, char** argv)
676680
CO_INSTRUCT_REF (OverrideInstance, ghc::filesystem, Mock_exists)
677681
.WhenCalledWith
678682
<
679-
const std::string&,
683+
const ghc::filesystem::path&,
680684
CO_ANY_TYPE
681685
>
682686
(

0 commit comments

Comments
 (0)