瀏覽代碼

Fix minor unit test memory leaks

tags/v0.15.1
Pieter Wuille 8 年之前
父節點
當前提交
1657ed2ab4
共有 2 個文件被更改,包括 5 次插入0 次删除
  1. 4
    0
      src/test/miner_tests.cpp
  2. 1
    0
      src/test/wallet_tests.cpp

+ 4
- 0
src/test/miner_tests.cpp 查看文件

@@ -83,6 +83,7 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity)

// Just to make sure we can still make simple blocks
BOOST_CHECK(pblocktemplate = CreateNewBlockWithKey(reservekey));
delete pblocktemplate;

// block sigops > limit: 1000 CHECKMULTISIG + 1
tx.vin.resize(1);
@@ -200,6 +201,9 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity)
BOOST_CHECK(pblocktemplate = CreateNewBlockWithKey(reservekey));
delete pblocktemplate;
pindexBest->nHeight = nHeight;

BOOST_FOREACH(CTransaction *tx, txFirst)
delete tx;
}

BOOST_AUTO_TEST_CASE(sha256transform_equality)

+ 1
- 0
src/test/wallet_tests.cpp 查看文件

@@ -289,6 +289,7 @@ BOOST_AUTO_TEST_CASE(coin_selection_tests)
BOOST_CHECK_NE(fails, RANDOM_REPEATS);
}
}
empty_wallet();
}

BOOST_AUTO_TEST_SUITE_END()

Loading…
取消
儲存