Skip to content

Commit 23f3bdf

Browse files
committed
Build/Test: Dropping 2013 allows using the latest googletests.
These have a new spelling: INSTANTIATE_TEST_CASE_P -> INSTANTIATE_TEST_SUITE_P
1 parent 2de6d65 commit 23f3bdf

12 files changed

+51
-63
lines changed

.appveyor.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,6 @@ install:
4848
- C:/Python27/python.exe update_glslang_sources.py
4949
- set PATH=C:\ninja;C:\Python36;%PATH%
5050
- git clone https://github.com/google/googletest.git External/googletest
51-
- cd External/googletest
52-
- git checkout 440527a61e1c91188195f7de212c63c77e8f0a45
53-
- cd ../..
5451

5552
build:
5653
parallel: true # enable MSBuild parallel builds

README.md

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ branch.
9999
### Dependencies
100100

101101
* A C++11 compiler.
102-
(For MSVS: 2015 is recommended, 2013 is fully supported/tested, and 2010 support is attempted, but not tested.)
102+
(For MSVS: use 2015 or later.)
103103
* [CMake][cmake]: for generating compilation targets.
104104
* make: _Linux_, ninja is an alternative, if configured.
105105
* [Python 3.x][python]: for executing SPIRV-Tools scripts. (Optional if not using SPIRV-Tools and the 'External' subdirectory does not exist.)
@@ -125,15 +125,6 @@ cd <the directory glslang was cloned to, "External" will be a subdirectory>
125125
git clone https://github.com/google/googletest.git External/googletest
126126
```
127127

128-
If you want to use googletest with Visual Studio 2013, you also need to check out an older version:
129-
130-
```bash
131-
# to use googletest with Visual Studio 2013
132-
cd External/googletest
133-
git checkout 440527a61e1c91188195f7de212c63c77e8f0a45
134-
cd ../..
135-
```
136-
137128
If you wish to assure that SPIR-V generated from HLSL is legal for Vulkan,
138129
wish to invoke -Os to reduce SPIR-V size from HLSL or GLSL, or wish to run the
139130
integrated test suite, install spirv-tools with this:

WORKSPACE

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ load(
66

77
http_archive(
88
name = "com_google_googletest",
9-
sha256 = "ef9e2e12e7bf115ee48b427ae171fc869eeaf1b532c0fcfd982f6a353d2471b4",
10-
strip_prefix = "googletest-37ae1fc5e6be26f367d76c078beabd7024fed53a",
11-
urls = ["https://github.com/google/googletest/archive/37ae1fc5e6be26f367d76c078beabd7024fed53a.zip"], # 2018-07-16
9+
sha256 = "94c634d499558a76fa649edb13721dce6e98fb1e7018dfaeba3cd7a083945e91",
10+
strip_prefix = "googletest-release-1.10.0",
11+
urls = ["https://github.com/google/googletest/archive/release-1.10.0.zip"], # 3-Oct-2019
1212
)
1313

1414
http_archive(

gtests/AST.FromFile.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ TEST_P(CompileToAstTestNV, FromFile)
5959
}
6060

6161
// clang-format off
62-
INSTANTIATE_TEST_CASE_P(
62+
INSTANTIATE_TEST_SUITE_P(
6363
Glsl, CompileToAstTest,
6464
::testing::ValuesIn(std::vector<std::string>({
6565
"sample.frag",
@@ -282,7 +282,7 @@ INSTANTIATE_TEST_CASE_P(
282282
FileNameAsCustomTestSuffix
283283
);
284284

285-
INSTANTIATE_TEST_CASE_P(
285+
INSTANTIATE_TEST_SUITE_P(
286286
Glsl, CompileToAstTestNV,
287287
::testing::ValuesIn(std::vector<std::string>({
288288
"nvShaderNoperspectiveInterpolation.frag",

gtests/Config.FromFile.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ TEST_P(ConfigTest, FromFile)
9595
}
9696

9797
// clang-format off
98-
INSTANTIATE_TEST_CASE_P(
98+
INSTANTIATE_TEST_SUITE_P(
9999
Glsl, ConfigTest,
100100
::testing::ValuesIn(std::vector<TestCaseSpec>({
101101
{"specExamples.vert", "baseResults/test.conf", "specExamplesConf.vert.out", (EShMessages)(EShMsgAST | EShMsgCascadingErrors)},

gtests/HexFloat.cpp

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ TEST_P(HexDoubleTest, DecodeCorrectly) {
7777
EXPECT_THAT(Decode<double>(GetParam().second), Eq(GetParam().first));
7878
}
7979

80-
INSTANTIATE_TEST_CASE_P(
80+
INSTANTIATE_TEST_SUITE_P(
8181
Float32Tests, HexFloatTest,
8282
::testing::ValuesIn(std::vector<std::pair<FloatProxy<float>, std::string>>({
8383
{0.f, "0x0p+0"},
@@ -129,7 +129,7 @@ INSTANTIATE_TEST_CASE_P(
129129

130130
})));
131131

132-
INSTANTIATE_TEST_CASE_P(
132+
INSTANTIATE_TEST_SUITE_P(
133133
Float32NanTests, HexFloatTest,
134134
::testing::ValuesIn(std::vector<std::pair<FloatProxy<float>, std::string>>({
135135
// Various NAN and INF cases
@@ -147,7 +147,7 @@ INSTANTIATE_TEST_CASE_P(
147147
{uint32_t(0x7FFFFFFF), "0x1.fffffep+128"}, // +nan
148148
})));
149149

150-
INSTANTIATE_TEST_CASE_P(
150+
INSTANTIATE_TEST_SUITE_P(
151151
Float64Tests, HexDoubleTest,
152152
::testing::ValuesIn(
153153
std::vector<std::pair<FloatProxy<double>, std::string>>({
@@ -220,7 +220,7 @@ INSTANTIATE_TEST_CASE_P(
220220

221221
})));
222222

223-
INSTANTIATE_TEST_CASE_P(
223+
INSTANTIATE_TEST_SUITE_P(
224224
Float64NanTests, HexDoubleTest,
225225
::testing::ValuesIn(std::vector<
226226
std::pair<FloatProxy<double>, std::string>>({
@@ -262,7 +262,7 @@ TEST_P(DecodeHexDoubleTest, DecodeCorrectly) {
262262
EXPECT_THAT(Decode<double>(GetParam().first), Eq(GetParam().second));
263263
}
264264

265-
INSTANTIATE_TEST_CASE_P(
265+
INSTANTIATE_TEST_SUITE_P(
266266
Float32DecodeTests, DecodeHexFloatTest,
267267
::testing::ValuesIn(std::vector<std::pair<std::string, FloatProxy<float>>>({
268268
{"0x0p+000", 0.f},
@@ -284,7 +284,7 @@ INSTANTIATE_TEST_CASE_P(
284284
{"0x0.4p+0", 0.25f},
285285
})));
286286

287-
INSTANTIATE_TEST_CASE_P(
287+
INSTANTIATE_TEST_SUITE_P(
288288
Float32DecodeInfTests, DecodeHexFloatTest,
289289
::testing::ValuesIn(std::vector<std::pair<std::string, FloatProxy<float>>>({
290290
// inf cases
@@ -294,7 +294,7 @@ INSTANTIATE_TEST_CASE_P(
294294
{"-0x32p+127", uint32_t(0xFF800000)}, // -inf
295295
})));
296296

297-
INSTANTIATE_TEST_CASE_P(
297+
INSTANTIATE_TEST_SUITE_P(
298298
Float64DecodeTests, DecodeHexDoubleTest,
299299
::testing::ValuesIn(
300300
std::vector<std::pair<std::string, FloatProxy<double>>>({
@@ -317,7 +317,7 @@ INSTANTIATE_TEST_CASE_P(
317317
{"0x0.4p+0", 0.25},
318318
})));
319319

320-
INSTANTIATE_TEST_CASE_P(
320+
INSTANTIATE_TEST_SUITE_P(
321321
Float64DecodeInfTests, DecodeHexDoubleTest,
322322
::testing::ValuesIn(
323323
std::vector<std::pair<std::string, FloatProxy<double>>>({
@@ -465,7 +465,7 @@ TEST_P(FloatProxyDoubleTest, EncodeCorrectly) {
465465
Eq(GetParam().second));
466466
}
467467

468-
INSTANTIATE_TEST_CASE_P(
468+
INSTANTIATE_TEST_SUITE_P(
469469
Float32Tests, FloatProxyFloatTest,
470470
::testing::ValuesIn(std::vector<std::pair<FloatProxy<float>, std::string>>({
471471
// Zero
@@ -497,7 +497,7 @@ INSTANTIATE_TEST_CASE_P(
497497
{-std::numeric_limits<float>::infinity(), "-0x1p+128"},
498498
})));
499499

500-
INSTANTIATE_TEST_CASE_P(
500+
INSTANTIATE_TEST_SUITE_P(
501501
Float64Tests, FloatProxyDoubleTest,
502502
::testing::ValuesIn(
503503
std::vector<std::pair<FloatProxy<double>, std::string>>({
@@ -747,7 +747,7 @@ TEST_P(HexFloatRoundTest, RoundDownToFP16) {
747747
}
748748

749749
// clang-format off
750-
INSTANTIATE_TEST_CASE_P(F32ToF16, HexFloatRoundTest,
750+
INSTANTIATE_TEST_SUITE_P(F32ToF16, HexFloatRoundTest,
751751
::testing::ValuesIn(std::vector<RoundSignificandCase>(
752752
{
753753
{float_fractions({0}), std::make_pair(half_bits_set({}), false), spvutils::kRoundToZero},
@@ -828,7 +828,7 @@ TEST_P(HexFloatRoundUpSignificandTest, Widening) {
828828
}
829829
}
830830

831-
INSTANTIATE_TEST_CASE_P(F16toF32, HexFloatRoundUpSignificandTest,
831+
INSTANTIATE_TEST_SUITE_P(F16toF32, HexFloatRoundUpSignificandTest,
832832
// 0xFC00 of the source 16-bit hex value cover the sign and the exponent.
833833
// They are ignored for this test.
834834
::testing::ValuesIn(std::vector<UpCastSignificandCase>(
@@ -879,7 +879,7 @@ TEST_P(HexFloatFP32To16Tests, NarrowingCasts) {
879879
const uint16_t positive_infinity = 0x7C00;
880880
const uint16_t negative_infinity = 0xFC00;
881881

882-
INSTANTIATE_TEST_CASE_P(F32ToF16, HexFloatFP32To16Tests,
882+
INSTANTIATE_TEST_SUITE_P(F32ToF16, HexFloatFP32To16Tests,
883883
::testing::ValuesIn(std::vector<DownCastTest>(
884884
{
885885
// Exactly representable as half.
@@ -944,7 +944,7 @@ TEST_P(HexFloatFP16To32Tests, WideningCasts) {
944944
}
945945
}
946946

947-
INSTANTIATE_TEST_CASE_P(F16ToF32, HexFloatFP16To32Tests,
947+
INSTANTIATE_TEST_SUITE_P(F16ToF32, HexFloatFP16To32Tests,
948948
::testing::ValuesIn(std::vector<UpCastCase>(
949949
{
950950
{0x0000, 0.f},
@@ -1039,7 +1039,7 @@ FloatParseCase<T> GoodFloatParseCase(std::string literal, bool negate_value,
10391039
return FloatParseCase<T>{literal, negate_value, true, proxy_expected_value};
10401040
}
10411041

1042-
INSTANTIATE_TEST_CASE_P(
1042+
INSTANTIATE_TEST_SUITE_P(
10431043
FloatParse, ParseNormalFloatTest,
10441044
::testing::ValuesIn(std::vector<FloatParseCase<float>>{
10451045
// Failing cases due to trivially incorrect syntax.
@@ -1090,7 +1090,7 @@ TEST_P(ParseNormalFloat16Test, Samples) {
10901090
}
10911091
}
10921092

1093-
INSTANTIATE_TEST_CASE_P(
1093+
INSTANTIATE_TEST_SUITE_P(
10941094
Float16Parse, ParseNormalFloat16Test,
10951095
::testing::ValuesIn(std::vector<FloatParseCase<Float16>>{
10961096
// Failing cases due to trivially incorrect syntax.
@@ -1137,7 +1137,7 @@ TEST_P(FloatProxyParseOverflowFloatTest, Sample) {
11371137
}
11381138
}
11391139

1140-
INSTANTIATE_TEST_CASE_P(
1140+
INSTANTIATE_TEST_SUITE_P(
11411141
FloatOverflow, FloatProxyParseOverflowFloatTest,
11421142
::testing::ValuesIn(std::vector<OverflowParseCase<float>>({
11431143
{"0", true, 0.0f},
@@ -1164,7 +1164,7 @@ TEST_P(FloatProxyParseOverflowDoubleTest, Sample) {
11641164
}
11651165
}
11661166

1167-
INSTANTIATE_TEST_CASE_P(
1167+
INSTANTIATE_TEST_SUITE_P(
11681168
DoubleOverflow, FloatProxyParseOverflowDoubleTest,
11691169
::testing::ValuesIn(std::vector<OverflowParseCase<double>>({
11701170
{"0", true, 0.0},
@@ -1193,7 +1193,7 @@ TEST_P(FloatProxyParseOverflowFloat16Test, Sample) {
11931193
}
11941194
}
11951195

1196-
INSTANTIATE_TEST_CASE_P(
1196+
INSTANTIATE_TEST_SUITE_P(
11971197
Float16Overflow, FloatProxyParseOverflowFloat16Test,
11981198
::testing::ValuesIn(std::vector<OverflowParseCase<uint16_t>>({
11991199
{"0", true, uint16_t{0}},

gtests/Hlsl.FromFile.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ TEST_P(HlslLegalDebugTest, FromFile)
129129
}
130130

131131
// clang-format off
132-
INSTANTIATE_TEST_CASE_P(
132+
INSTANTIATE_TEST_SUITE_P(
133133
ToSpirv, HlslCompileTest,
134134
::testing::ValuesIn(std::vector<FileNameEntryPointPair>{
135135
{"hlsl.amend.frag", "f1"},
@@ -430,7 +430,7 @@ INSTANTIATE_TEST_CASE_P(
430430
// clang-format on
431431

432432
// clang-format off
433-
INSTANTIATE_TEST_CASE_P(
433+
INSTANTIATE_TEST_SUITE_P(
434434
ToSpirv, HlslVulkan1_1CompileTest,
435435
::testing::ValuesIn(std::vector<FileNameEntryPointPair>{
436436
{"hlsl.wavebroadcast.comp", "CSMain"},
@@ -448,7 +448,7 @@ INSTANTIATE_TEST_CASE_P(
448448
// clang-format on
449449

450450
// clang-format off
451-
INSTANTIATE_TEST_CASE_P(
451+
INSTANTIATE_TEST_SUITE_P(
452452
ToSpirv, HlslCompileAndFlattenTest,
453453
::testing::ValuesIn(std::vector<FileNameEntryPointPair>{
454454
{"hlsl.array.flatten.frag", "main"},
@@ -460,7 +460,7 @@ INSTANTIATE_TEST_CASE_P(
460460

461461
#if ENABLE_OPT
462462
// clang-format off
463-
INSTANTIATE_TEST_CASE_P(
463+
INSTANTIATE_TEST_SUITE_P(
464464
ToSpirv, HlslLegalizeTest,
465465
::testing::ValuesIn(std::vector<FileNameEntryPointPair>{
466466
{"hlsl.aliasOpaque.frag", "main"},
@@ -478,15 +478,15 @@ INSTANTIATE_TEST_CASE_P(
478478
#endif
479479

480480
// clang-format off
481-
INSTANTIATE_TEST_CASE_P(
481+
INSTANTIATE_TEST_SUITE_P(
482482
ToSpirv, HlslDebugTest,
483483
::testing::ValuesIn(std::vector<FileNameEntryPointPair>{
484484
{"hlsl.pp.line2.frag", "MainPs"}
485485
}),
486486
FileNameAsCustomTestSuffix
487487
);
488488

489-
INSTANTIATE_TEST_CASE_P(
489+
INSTANTIATE_TEST_SUITE_P(
490490
ToSpirv, HlslDX9CompatibleTest,
491491
::testing::ValuesIn(std::vector<FileNameEntryPointPair>{
492492
{"hlsl.sample.dx9.frag", "main"},
@@ -496,7 +496,7 @@ INSTANTIATE_TEST_CASE_P(
496496
);
497497

498498
// clang-format off
499-
INSTANTIATE_TEST_CASE_P(
499+
INSTANTIATE_TEST_SUITE_P(
500500
ToSpirv, HlslLegalDebugTest,
501501
::testing::ValuesIn(std::vector<FileNameEntryPointPair>{
502502
{"hlsl.pp.line4.frag", "MainPs"}

gtests/Link.FromFile.Vk.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ TEST_P(LinkTestVulkan, FromFile)
109109
}
110110

111111
// clang-format off
112-
INSTANTIATE_TEST_CASE_P(
112+
INSTANTIATE_TEST_SUITE_P(
113113
Glsl, LinkTestVulkan,
114114
::testing::ValuesIn(std::vector<std::vector<std::string>>({
115115
{"link1.vk.frag", "link2.vk.frag"},

gtests/Link.FromFile.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ TEST_P(LinkTest, FromFile)
8686
}
8787

8888
// clang-format off
89-
INSTANTIATE_TEST_CASE_P(
89+
INSTANTIATE_TEST_SUITE_P(
9090
Glsl, LinkTest,
9191
::testing::ValuesIn(std::vector<std::vector<std::string>>({
9292
{"mains1.frag", "mains2.frag", "noMain1.geom", "noMain2.geom"},

gtests/Pp.FromFile.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ TEST_P(PreprocessingTest, FromFile)
4747
}
4848

4949
// clang-format off
50-
INSTANTIATE_TEST_CASE_P(
50+
INSTANTIATE_TEST_SUITE_P(
5151
Glsl, PreprocessingTest,
5252
::testing::ValuesIn(std::vector<std::string>({
5353
"preprocessor.bad_arg.vert",

0 commit comments

Comments
 (0)