File tree 2 files changed +24
-7
lines changed
2 files changed +24
-7
lines changed Original file line number Diff line number Diff line change @@ -109,14 +109,24 @@ TEST_P(SaveAndLoadTestFixture, SaveAndLoad) {
109
109
})" )));
110
110
}
111
111
112
+ static auto getFormats () {
113
+ return testing::Values (
114
+ PlanFileFormat::kBinary ,
115
+ PlanFileFormat::kJson ,
116
+ PlanFileFormat::kProtoText
117
+
118
+ #ifndef _WIN32
119
+ // Text format is currently not supported on Windows
120
+ ,
121
+ PlanFileFormat::kText
122
+ #endif
123
+ );
124
+ }
125
+
112
126
INSTANTIATE_TEST_SUITE_P (
113
127
SaveAndLoadTests,
114
128
SaveAndLoadTestFixture,
115
- testing::Values (
116
- PlanFileFormat::kBinary ,
117
- PlanFileFormat::kJson ,
118
- PlanFileFormat::kProtoText ,
119
- PlanFileFormat::kText ),
129
+ getFormats (),
120
130
[](const testing::TestParamInfo<SaveAndLoadTestFixture::ParamType>& info) {
121
131
return planFileEncodingToString (info.param );
122
132
});
Original file line number Diff line number Diff line change @@ -27,7 +27,14 @@ class TestCase {
27
27
::testing::Matcher<const ParseResult&> expectedMatch;
28
28
};
29
29
30
- class TextPlanParserTestFixture : public ::testing::TestWithParam<TestCase> {};
30
+ class TextPlanParserTestFixture : public ::testing::TestWithParam<TestCase> {
31
+ void SetUp () override {
32
+ #if defined(_WIN32) || defined(_WIN64)
33
+ GTEST_SKIP () << " Skipping textplanparser test on Windows." ;
34
+ #endif
35
+ ::testing::TestWithParam<TestCase>::SetUp ();
36
+ }
37
+ };
31
38
32
39
std::vector<TestCase> getTestCases () {
33
40
static std::vector<TestCase> cases = {
@@ -1301,7 +1308,7 @@ std::vector<TestCase> getTestCases() {
1301
1308
return cases;
1302
1309
}
1303
1310
1304
- TEST (TextPlanParser , LoadFromFile) {
1311
+ TEST_P (TextPlanParserTestFixture , LoadFromFile) {
1305
1312
auto stream = loadTextFile (" data/provided_sample1.splan" );
1306
1313
ASSERT_TRUE (stream.has_value ()) << " Test input file missing." ;
1307
1314
auto result = parseStream (&*stream);
You can’t perform that action at this time.
0 commit comments