GoogleTests are broken on macOS after upgrading to Boost 1.84.0
str4d opened this issue · comments
str4d commented
Describe the issue
See title.
Can you reliably reproduce the issue?
If so, please list the steps to reproduce below:
- Upgrade Boost from 1.83.0 to 1.84.0
./zcutil/build.sh
on macOS./src/zcash-gtest
Expected behaviour
All tests pass (as they do on other platforms).
Actual behaviour + errors
Tests that use GoogleMock break like so:
[ RUN ] ChecktransactionTests.BadVersionTooLow
gtest/test_checktransaction.cpp:149: Failure
Actual function call count doesn't match EXPECT_CALL(state, DoS(100, false, REJECT_INVALID, "bad-txns-version-too-low", false, ""))...
Expected: to be called once
Actual: never called - unsatisfied and active
--- Logs:
ERROR rustzcash::transaction_ffi: Failed to parse transaction: Unknown transaction format
ERROR main: CheckTransaction(): version too low
---
[ FAILED ] ChecktransactionTests.BadVersionTooLow (0 ms)
The test is clearly doing the right thing (the log lines are from the correct error("...")
calls). But the actual call to state.DoS(...)
isn't being detected by the mock.
The weird thing is that GoogleTest does not depend on Boost, and there is no Boost code involved in the CValidationState
API.
The version of Zcash you were using:
Latest master
(as tested in #6798).