Commit 3bc90ba5 for openh264

commit 3bc90ba54124ad64a25f5845daf78d4949aae50d
Author: BenzhengZhang <140143892+BenzhengZhang@users.noreply.github.com>
Date:   Thu Jul 9 10:55:40 2026 +0800

    build: upgrade bundled gtest to 1.15.2 (#3963)

    * build: upgrade bundled gtest to 1.15.2

    The vendored googletest 1.8.0 (2016) trips newer Apple Clang's -Wuninitialized-const-pointer on StackGrowsDown()/StackLowerThanAddress(), which combined with -Werror breaks the macOS CI intermittently (only on runner images shipping Clang 17+). gtest 1.15.2 initializes the dummy stack variable, fixing the diagnostic at the source. Wrap taken from Meson WrapDB (gtest_1.15.2-1).

    * test: replace deprecated INSTANTIATE_TEST_CASE_P with INSTANTIATE_TEST_SUITE_P

    gtest 1.15.2 marks INSTANTIATE_TEST_CASE_P deprecated; with -Werror -Wdeprecated-declarations this breaks the macOS build. Switch to the modern INSTANTIATE_TEST_SUITE_P spelling.

    ---------

    Co-authored-by: benzzhan <benzzhan@cisco.com>

diff --git a/Makefile b/Makefile
index 65494f5f..636a7372 100644
--- a/Makefile
+++ b/Makefile
@@ -30,7 +30,7 @@ SHAREDLIB_DIR=$(PREFIX)/lib
 PROJECT_NAME=openh264
 MODULE_NAME=gmpopenh264
 GMP_API_BRANCH=Firefox135
-GTEST_VER=release-1.8.1
+GTEST_VER=v1.15.2
 CCASFLAGS=$(CFLAGS)
 STATIC_LDFLAGS=-lstdc++
 STRIP ?= strip
diff --git a/subprojects/gtest.wrap b/subprojects/gtest.wrap
index 8d87fa8d..197210c6 100644
--- a/subprojects/gtest.wrap
+++ b/subprojects/gtest.wrap
@@ -1,10 +1,16 @@
 [wrap-file]
-directory = googletest-release-1.8.0
+directory = googletest-1.15.2
+source_url = https://github.com/google/googletest/archive/refs/tags/v1.15.2.tar.gz
+source_filename = gtest-1.15.2.tar.gz
+source_hash = 7b42b4d6ed48810c5362c265a17faebe90dc2373c885e5216439d37927f02926
+patch_filename = gtest_1.15.2-1_patch.zip
+patch_url = https://wrapdb.mesonbuild.com/v2/gtest_1.15.2-1/get_patch
+patch_hash = b41cba05fc61d47b2ba5bf95732eb86ce2b67303f291b68a9587b7563c318141
+source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/gtest_1.15.2-1/gtest-1.15.2.tar.gz
+wrapdb_version = 1.15.2-1

-source_url = https://github.com/google/googletest/archive/release-1.8.0.zip
-source_filename = gtest-1.8.0.zip
-source_hash = f3ed3b58511efd272eb074a3a6d6fb79d7c2e6a0e374323d1e6bcbcc1ef141bf
-
-patch_url = https://wrapdb.mesonbuild.com/v1/projects/gtest/1.8.0/4/get_zip
-patch_filename = gtest-1.8.0-4-wrap.zip
-patch_hash = 0b90fe055acbdb002a37dfb035184b306008b763931158497ef5dbaa8c7925af
+[provide]
+gtest = gtest_dep
+gtest_main = gtest_main_dep
+gmock = gmock_dep
+gmock_main = gmock_main_dep
diff --git a/test/api/decode_encode_test.cpp b/test/api/decode_encode_test.cpp
index 11a40421..4553df62 100644
--- a/test/api/decode_encode_test.cpp
+++ b/test/api/decode_encode_test.cpp
@@ -135,5 +135,5 @@ static const DecodeEncodeFileParam kFileParamArray[] = {
 };


-INSTANTIATE_TEST_CASE_P (DecodeEncodeFile, DecodeEncodeTest,
-                         ::testing::ValuesIn (kFileParamArray));
+INSTANTIATE_TEST_SUITE_P (DecodeEncodeFile, DecodeEncodeTest,
+                          ::testing::ValuesIn (kFileParamArray));
diff --git a/test/api/decoder_ec_test.cpp b/test/api/decoder_ec_test.cpp
index 1bc4a778..35dceb17 100644
--- a/test/api/decoder_ec_test.cpp
+++ b/test/api/decoder_ec_test.cpp
@@ -140,8 +140,8 @@ static const EncodeDecodeFileParamBase kFileParamArray[] = {
   {300, 140, 96, 6.0f, 4, 1, "000000000000001010111010101011101010101001101010100000010101110011010101"},
 };

-INSTANTIATE_TEST_CASE_P (EncodeDecodeTestAPIBase, EncodeDecodeTestAPI,
-                         ::testing::ValuesIn (kFileParamArray));
+INSTANTIATE_TEST_SUITE_P (EncodeDecodeTestAPIBase, EncodeDecodeTestAPI,
+                          ::testing::ValuesIn (kFileParamArray));

 TEST_P (EncodeDecodeTestAPI, SetOptionECIDC_GeneralSliceChange) {
   uint32_t uiEcIdc;
diff --git a/test/api/decoder_test.cpp b/test/api/decoder_test.cpp
index 988e18f8..ab060a3a 100644
--- a/test/api/decoder_test.cpp
+++ b/test/api/decoder_test.cpp
@@ -141,5 +141,5 @@ static const FileParam kFileParamArray[] = {
   {"res/VID_1920x1080_cavlc_temporal_direct.264", "b35dc99604ea2a1fda5b84d1b9098cb7565dec8f"},
 };

-INSTANTIATE_TEST_CASE_P (DecodeFile, DecoderOutputTest,
-                         ::testing::ValuesIn (kFileParamArray));
+INSTANTIATE_TEST_SUITE_P (DecodeFile, DecoderOutputTest,
+                          ::testing::ValuesIn (kFileParamArray));
diff --git a/test/api/encode_options_test.cpp b/test/api/encode_options_test.cpp
index 8e9fef5a..bd33e985 100644
--- a/test/api/encode_options_test.cpp
+++ b/test/api/encode_options_test.cpp
@@ -1324,8 +1324,8 @@ class EncodeTestAPI : public ::testing::TestWithParam<EncodeOptionParam>, public
   }
 };

-INSTANTIATE_TEST_CASE_P (EncodeDecodeTestAPIBase, EncodeTestAPI,
-                         ::testing::ValuesIn (kOptionParamArray));
+INSTANTIATE_TEST_SUITE_P (EncodeDecodeTestAPIBase, EncodeTestAPI,
+                          ::testing::ValuesIn (kOptionParamArray));

 TEST_P (EncodeTestAPI, SetEncOptionSize) {
   EncodeOptionParam p = GetParam();
diff --git a/test/api/encoder_test.cpp b/test/api/encoder_test.cpp
index 764d0257..ebe4a039 100644
--- a/test/api/encoder_test.cpp
+++ b/test/api/encoder_test.cpp
@@ -181,8 +181,8 @@ static const EncodeFileParam kFileParamArray[] = {

 };

-INSTANTIATE_TEST_CASE_P (EncodeFile, EncoderOutputTest,
-                         ::testing::ValuesIn (kFileParamArray));
+INSTANTIATE_TEST_SUITE_P (EncodeFile, EncoderOutputTest,
+                          ::testing::ValuesIn (kFileParamArray));

 class RandomInputStream : public InputStream {
  public:
diff --git a/test/api/thread_decoder_test.cpp b/test/api/thread_decoder_test.cpp
index 40946ef1..1c303f3d 100644
--- a/test/api/thread_decoder_test.cpp
+++ b/test/api/thread_decoder_test.cpp
@@ -149,5 +149,5 @@ static const FileParam kFileParamArray[] = {
   {"res/VID_1920x1080_cavlc_temporal_direct.264", "4467039825f472bae31e58b383b1f2c9a73ce8e0"},
 };

-INSTANTIATE_TEST_CASE_P (ThreadDecodeFile, ThreadDecoderOutputTest,
-                         ::testing::ValuesIn (kFileParamArray));
+INSTANTIATE_TEST_SUITE_P (ThreadDecodeFile, ThreadDecoderOutputTest,
+                          ::testing::ValuesIn (kFileParamArray));