Auto merge of #1231 - rcseacord:rcseacord-patch-3, r=str4d

Address incorrect use of shared_ptr in test_equihash.cpp

Closes #1228
This commit is contained in:
zkbot 2016-08-17 01:30:26 +00:00
commit 39af39fb85
1 changed files with 3 additions and 3 deletions

View File

@ -4,9 +4,9 @@
#include "crypto/equihash.h"
TEST(equihash_tests, is_probably_duplicate) {
std::shared_ptr<eh_trunc> p1 (new eh_trunc[4] {0, 1, 2, 3});
std::shared_ptr<eh_trunc> p2 (new eh_trunc[4] {0, 1, 1, 3});
std::shared_ptr<eh_trunc> p3 (new eh_trunc[4] {3, 1, 1, 3});
std::shared_ptr<eh_trunc> p1 (new eh_trunc[4] {0, 1, 2, 3}, std::default_delete<eh_trunc[]>());
std::shared_ptr<eh_trunc> p2 (new eh_trunc[4] {0, 1, 1, 3}, std::default_delete<eh_trunc[]>());
std::shared_ptr<eh_trunc> p3 (new eh_trunc[4] {3, 1, 1, 3}, std::default_delete<eh_trunc[]>());
ASSERT_FALSE(IsProbablyDuplicate<4>(p1, 4));
ASSERT_FALSE(IsProbablyDuplicate<4>(p2, 4));