bdk-ffi icon indicating copy to clipboard operation
bdk-ffi copied to clipboard

Remove print lines in tests

Open thunderbiscuit opened this issue 4 months ago • 1 comments

I think integrating examples directories for both the libraries here could be a better place for these print statements. In general, unit tests don't need to have a ton of print statements if they succeed, and their error message should they fail should be enough to diagnose the issue.

We've been mixing up unit tests with integration tests, and adding print statement to that whole mix for a long time, but a little cleanup there would not be a bad thing IMO. Thoughts?

thunderbiscuit avatar Sep 08 '25 13:09 thunderbiscuit

After cleaning up the tests in bdk-jvm for example, this is my output when I run them:

just test
./gradlew test

> Task :lib:test

CreatingWalletTest > Failure > You cannot create a wallet with two identical descriptors() PASSED
CreatingWalletTest > Failure > Descriptors do not match provided network() PASSED
CreatingWalletTest > Success > Create a wallet with a non-extended descriptor() PASSED
CreatingWalletTest > Success > Create TR wallet() PASSED
CreatingWalletTest > Success > Create WPKH wallet() PASSED
CreatingWalletTest > Success > Create a wallet with a public multipath descriptor() PASSED
DescriptorTest > Descriptors can be created from multipath public descriptor string() PASSED
DescriptorTest > Failure > Descriptor cannot be created from multipath private descriptor string() PASSED
DescriptorTest > Failure > Cannot create addr() descriptor() PASSED
DescriptorTest > Success > Create non-extended descriptors for all networks() PASSED\
DescriptorTest > Success > Create extended WPKH descriptors for all networks 2() PASSED
DescriptorTest > Success > Create extended TR descriptors for all networks() PASSED
MnemonicTest > Mnemonics create valid descriptors() PASSED
PersistenceTest > Correctly load wallet from sqlite persistence() PASSED
WalletTest > Wallet has 0 balance prior to sync() PASSED
WalletTest > Wallet produces valid addresses for its network() PASSED

BUILD SUCCESSFUL in 13s
8 actionable tasks: 6 executed, 2 up-to-date

thunderbiscuit avatar Sep 08 '25 13:09 thunderbiscuit