cryptozeny / sugarchain-v0.16.3

OUTDATED! This repo is moved to:
https://github.com/sugarchain-project/sugarchain
MIT License
0 stars 1 forks source link

remove debug printf on <src/test/addrman_tests.cpp> #59

Closed cryptozeny closed 5 years ago

cryptozeny commented 5 years ago

https://github.com/cryptozeny/sugarchain-v0.16.3/blob/c2120ecb89ba9b5f42bd79f84b3dfcc82a633ead/src/test/addrman_tests.cpp#L425

    // BEGIN - DELME.SUGAR: just for debugging
    printf("addr1 = %s\n", addr1.ToString().c_str());
    printf("source1 = %s\n", source1.ToString().c_str());
    printf("CAddrInfo(addr1, source1) = %s\n", CAddrInfo(addr1, source1).ToString().c_str());
    printf("info1 = %s\n", info1.ToString().c_str());
    printf("nKey1 = %s\n", nKey1.ToString().c_str());
    printf("info1.GetTriedBucket(nKey1) = %d\n", info1.GetTriedBucket(nKey1));
    BOOST_CHECK_EQUAL(CAddrInfo(addr1, source1).GetTriedBucket( (uint256)(CHashWriter(SER_GETHASH, 0) << 1).GetHash() ), 14); // DOUBLE CHECK
    // END - DELME.SUGAR: just for debugging

remove this lines, because test_sugarchain.exe on win64 report this lines

C:\sugarchain-0.16.3\bin>test_sugarchain.exe
Running 282 test cases...
addr1 = 250.1.1.1:7979
source1 = 250.1.1.1
CAddrInfo(addr1, source1) = 250.1.1.1:7979
info1 = 250.1.1.1:7979
nKey1 = 1bd164d5d22d98dc2b5720c02ca95f732d0cb60cfcb495378d07cce5f258f741
info1.GetTriedBucket(nKey1) = 14

*** No errors detected
cryptozeny commented 5 years ago

another files

$ git grep "\bprintf\b" | grep tests.cpp
src/qt/test/paymentservertests.cpp:    printf( "\n\n\n" );
src/qt/test/paymentservertests.cpp:    printf( "%s =\n", "src/qt/test/paymentrequestdata.h/paymentrequest5_cert2_BASE64" );
src/qt/test/paymentservertests.cpp:    printf( "***\n" );
src/qt/test/paymentservertests.cpp:    printf( "%s\n", paymentrequest5_cert2_BASE64 );
src/qt/test/paymentservertests.cpp:    printf( "***\n" );
src/qt/test/paymentservertests.cpp:    printf( "\n\n\n" );
src/test/addrman_tests.cpp:    printf("addr1 = %s\n", addr1.ToString().c_str());
src/test/addrman_tests.cpp:    printf("source1 = %s\n", source1.ToString().c_str());
src/test/addrman_tests.cpp:    printf("CAddrInfo(addr1, source1) = %s\n", CAddrInfo(addr1, source1).ToString().c_str());
src/test/addrman_tests.cpp:    printf("info1 = %s\n", info1.ToString().c_str());
src/test/addrman_tests.cpp:    printf("nKey1 = %s\n", nKey1.ToString().c_str());
src/test/addrman_tests.cpp:    printf("info1.GetTriedBucket(nKey1) = %d\n", info1.GetTriedBucket(nKey1));
src/test/compress_tests.cpp:    BOOST_CHECK(TestPair(2520000000*COIN, 0x96342600));  // 120x bitcoin // 21000000 * 120 = 2520000000 // $ printf "%x\n" 2520000000
src/test/key_tests.cpp:    // for (int i = 0; i <= 9; i++) { printf("detsig[%d] = %d\n", i, detsig[i]); } // FIXME.SUGAR // SURE?
src/test/key_tests.cpp:    // for (int i = 0; i <= 9; i++) { printf("detsig[%d] = %d\n", i, detsig[i]); } // FIXME.SUGAR // SURE?
src/test/key_tests.cpp:    // for (int i = 0; i <= 9; i++) { printf("detsig[%d] = %d\n", i, detsig[i]); } // FIXME.SUGAR // SURE?
src/test/key_tests.cpp:    // for (int i = 0; i <= 9; i++) { printf("detsig[%d] = %d\n", i, detsigc[i]); } // FIXME.SUGAR // SURE?
src/test/key_tests.cpp:    // for (int i = 0; i <= 9; i++) { printf("detsig[%d] = %d\n", i, detsig[i]); } // FIXME.SUGAR // SURE?
src/test/key_tests.cpp:    // for (int i = 0; i <= 9; i++) { printf("detsig[%d] = %d\n", i, detsigc[i]); } // FIXME.SUGAR // SURE?
$ git grep -l "\bprintf\b" | grep tests.cpp
src/qt/test/paymentservertests.cpp
src/test/addrman_tests.cpp
src/test/compress_tests.cpp
src/test/key_tests.cpp
cryptozeny commented 5 years ago
$ ./src/test/test_sugarchain --log-level=none

Running 282 test cases...
addr1 = 250.1.1.1:7979
source1 = 250.1.1.1
CAddrInfo(addr1, source1) = 250.1.1.1:7979
info1 = 250.1.1.1:7979
nKey1 = 1bd164d5d22d98dc2b5720c02ca95f732d0cb60cfcb495378d07cce5f258f741
info1.GetTriedBucket(nKey1) = 14

*** No errors detected
$
cryptozeny commented 5 years ago

fixed https://github.com/cryptozeny/sugarchain-v0.16.3/commit/afe2bba1cdb60a43aa648d5851803d944f11507a

cryptozeny commented 5 years ago
$ ./src/test/test_sugarchain --log-level=none
Running 282 test cases...

*** No errors detected

resolved