No description provided.
[tests] Remove printf(...) #10524
pull practicalswift wants to merge 1 commits into bitcoin:master from practicalswift:u-for-unsigned-int changing 1 files +0 −2-
practicalswift commented at 11:31 PM on June 3, 2017: contributor
- fanquake added the label Tests on Jun 4, 2017
- practicalswift renamed this:
Fix incorrect format strings
[tests] Fix incorrect format strings
on Jun 4, 2017 -
sipa commented at 6:25 PM on June 4, 2017: member
These should just be changed to use
LogPrintf(or nothing at all, it's debug code!) instead ofprintf.Historically,
printfwas a macro in the codebase that invoked the logging code. Since then we have 1) switched to tinyformat (where %d is legal for unsigned values) and 2) replaced theprintfcalls withLogPrintf. It seems these two are somehow copied from an old version of the code. - practicalswift force-pushed on Jun 4, 2017
-
practicalswift commented at 6:41 PM on June 4, 2017: contributor
@sipa Thanks for the review!
Turns out that these two were the last remaining instances of
printf:$ git grep "[^a-z]printf(" -- "*.cpp" "*.h" | egrep -v "(univalue|tinyformat|secp256k1)" src/test/sighash_tests.cpp: printf("ERROR: SignatureHash(): nIn=%d out of range\n", nIn); src/test/sighash_tests.cpp: printf("ERROR: SignatureHash(): nOut=%d out of range\n", nOut);Looks good now?
- practicalswift force-pushed on Jun 4, 2017
- practicalswift renamed this:
[tests] Fix incorrect format strings
tests] Use LogPrintf(...) instead of printf(...)
on Jun 4, 2017 - practicalswift renamed this:
tests] Use LogPrintf(...) instead of printf(...)
[tests] Use LogPrintf(...) instead of printf(...)
on Jun 4, 2017 -
laanwj commented at 12:53 PM on June 5, 2017: member
The logging output of the tests is ignored, I don't think there's any flag to show/store it (at least with printf they still did something, print to stdout). So I think it'd be better to just remove these lines then?
-
MarcoFalke commented at 5:16 PM on June 5, 2017: member
As they indicate an error, the alternative would be to replace them with
BOOST_CHECK_MESSAGE, which also works with the operator<< -
laanwj commented at 10:12 AM on June 6, 2017: member
As they indicate an error
Sure, though I guess if it fails, I'd hope the test will fail later on anyhow because of the return value.
-
[tests] Remove printf(...) 0abc58890c
- practicalswift force-pushed on Jun 7, 2017
-
practicalswift commented at 6:43 PM on June 7, 2017: contributor
PR updated. Now simply removing the
printf(…):s :-) -
sipa commented at 6:56 PM on June 7, 2017: member
utACK 0abc58890c1a6600fa5097603febd3990a071d03
- laanwj renamed this:
[tests] Use LogPrintf(...) instead of printf(...)
[tests] Remove printf(...)
on Jun 8, 2017 - laanwj merged this on Jun 8, 2017
- laanwj closed this on Jun 8, 2017
- laanwj referenced this in commit 6c2d81f34d on Jun 8, 2017
- jasonbcox referenced this in commit f1c98bdf36 on Jun 13, 2019
- jtoomim referenced this in commit 6a476a666a on Jun 29, 2019
- jonspock referenced this in commit 773a162132 on Jul 4, 2019
- jonspock referenced this in commit 2c1056d027 on Jul 4, 2019
- PastaPastaPasta referenced this in commit 29f3b6b624 on Jul 5, 2019
- proteanx referenced this in commit 4d52f0671d on Jul 5, 2019
- PastaPastaPasta referenced this in commit 4504e0e310 on Jul 5, 2019
- PastaPastaPasta referenced this in commit 7602da3104 on Jul 6, 2019
- PastaPastaPasta referenced this in commit 20e30fb93c on Jul 8, 2019
- jonspock referenced this in commit 0b4a16fa7a on Jul 9, 2019
- barrystyle referenced this in commit dfbe6ce797 on Jan 22, 2020
- practicalswift deleted the branch on Apr 10, 2021
- DrahtBot locked this on Aug 18, 2022