Skip to content

Commit dda3fea

Browse files
Fix: fix the 32 bit windows test as the analytics dll isn't 32 bit (#1816)
* Fix: fix the 32 bit windows test as the analytics dll isn't 32 bit * Update testing/test_framework/src/firebase_test_framework.h Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * Update testing/test_framework/src/firebase_test_framework.h Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * fix formating and name of skip --------- Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
1 parent 7e10493 commit dda3fea

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

analytics/integration_test/src/integration_test.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,8 @@ TEST_F(FirebaseAnalyticsTest, TestSetProperties) {
248248
// The windows analytics DLL enables users to // set a callback function that is
249249
// triggered when the underlying DLL logs something.
250250
TEST_F(FirebaseAnalyticsTest, TestSetLogCallback) {
251+
SKIP_TEST_ON_WINDOWS_32BIT;
252+
251253
std::promise<void> finishedPromise;
252254
std::future<void> finished = finishedPromise.get_future();
253255
bool log_callback_called = false;

testing/test_framework/src/firebase_test_framework.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,14 +128,29 @@ namespace firebase_test_framework {
128128
#endif // (defined(TARGET_OS_OSX) && TARGET_OS_OSX)
129129

130130
#if defined(_WIN32)
131+
// defined when the compilation target is 32-bit ARM, 64-bit ARM, x86, x64
131132
#define SKIP_TEST_ON_WINDOWS \
132133
{ \
133134
app_framework::LogInfo("Skipping %s on Windows.", test_info_->name()); \
134135
GTEST_SKIP(); \
135136
return; \
136137
}
138+
#if !defined(_WIN64)
139+
// _WIN64 is defined for 64-bit targets (e.g., x64, 64-bit ARM).
140+
// Its absence on a Windows build indicates a 32-bit target.
141+
#define SKIP_TEST_ON_WINDOWS_32BIT \
142+
{ \
143+
app_framework::LogInfo("Skipping %s on 32-bit Windows.", \
144+
test_info_->name()); \
145+
GTEST_SKIP(); \
146+
return; \
147+
}
148+
#else
149+
#define SKIP_TEST_ON_WINDOWS_32BIT ((void)0)
150+
#endif // !defined(_WIN64)
137151
#else
138152
#define SKIP_TEST_ON_WINDOWS ((void)0)
153+
#define SKIP_TEST_ON_WINDOWS_32BIT ((void)0)
139154
#endif // defined(_WIN32)
140155

141156
#if defined(__linux__)

0 commit comments

Comments
 (0)