test: remove gMock dependency - #802
Conversation
|
There seems to be a conflict with the merged #796. Could you rebase please? |
0df5590 to
f9154ab
Compare
| get_target_property(qt_lib_type Qt6::Core TYPE) | ||
| if(qt_lib_type STREQUAL "STATIC_LIBRARY") | ||
| qt6_import_plugins(bitcoinqml_unit_tests INCLUDE Qt6::QMinimalIntegrationPlugin) | ||
| qt6_import_plugins(bitcoinqml_qmltests INCLUDE Qt6::QMinimalIntegrationPlugin) |
There was a problem hiding this comment.
@hebasto can you confirm if this is correct? I tried offscreen but it seems it isn't available on macos.
There was a problem hiding this comment.
guess not, ci failing
f9154ab to
54ee9e1
Compare
| $(package)_config_opts_darwin := -no-dbus | ||
| $(package)_config_opts_darwin += -no-feature-printsupport | ||
| -$(package)_config_opts_darwin += -no-feature-freetype | ||
| +$(package)_config_opts_darwin += -qt-freetype |
There was a problem hiding this comment.
@hebasto This seems to be required for Qt to build the offscreen qpa for macos
There was a problem hiding this comment.
we use offscreen for gui automation testing
There was a problem hiding this comment.
@hebasto This seems to be required for Qt to build the offscreen qpa for macos
we use offscreen for gui automation testing
There was a problem hiding this comment.
we use offscreen for gui automation testing
Is it for sure that the minimal plugin can't be used?
There was a problem hiding this comment.
We have some qml tests that fail on minimal due to some differences with window focus but I'm looking again and I think they can be rewritten to work with minimal and still provide the correct test coverage.
There was a problem hiding this comment.
I went ahead and pushed the changes to use minimal
|
Rebased and ready for review |
54ee9e1 to
de58e55
Compare
ed1eb19 to
abe69e3
Compare
Replace gMock with small handwritten Node and Wallet test doubles. The doubles expose a `calls` object with one counter per configurable function, using the same name and case as the function. Every configurable override increments its counter. Tests declare exact, minimum, or zero-call expectations, and `VerifyOnExit()` checks them at the end of the scope. Expectations start from the count at registration time, so calls made during setup do not affect checks for the action under test. Tests control results through function callbacks and check captured arguments or event lists directly. The wallet double falls back to harmless stub values for behavior a test does not configure. The normal node double also permits unconfigured calls, while `StrictMockNode` records them and reports them together at scope exit. This keeps call behavior visible in each test without recreating a matcher language.
Reuse QtTest's existing window for tests that need a visible scene. The minimal platform does not reliably expose child objects created under a separate Window with static Qt 6.8.3.
abe69e3 to
cd06356
Compare
Build app tests by default when GUI support is enabled, while retaining the explicit BUILD_APP_TESTS opt-out. Build and run the app tests in the depends CI job, use the minimal QPA platform, and import the static Qt minimal and QML plugins needed by the test binaries.
cd06356 to
cee0b56
Compare
Summary
Tests
Closes #753
Closes #754
Closes #778