commit
16a1f497e3
|
@ -34,7 +34,8 @@
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include "crypto/hash-ops.h"
|
#include "crypto/hash-ops.h"
|
||||||
|
|
||||||
extern volatile int use_v4_jit_flag;
|
/* extern volatile int use_v4_jit_flag; */
|
||||||
|
volatile int use_v4_jit_flag = 0;
|
||||||
|
|
||||||
static int test(const uint8_t *data, size_t len, uint64_t height)
|
static int test(const uint8_t *data, size_t len, uint64_t height)
|
||||||
{
|
{
|
||||||
|
|
|
@ -43,7 +43,7 @@ set_property(TARGET hash-tests
|
||||||
PROPERTY
|
PROPERTY
|
||||||
FOLDER "tests")
|
FOLDER "tests")
|
||||||
|
|
||||||
foreach (hash IN ITEMS fast slow slow-1 slow-2 slow-4 tree extra-blake extra-groestl extra-jh extra-skein)
|
foreach (hash IN ITEMS sha3 fast slow slow-1 slow-2 tree extra-blake extra-groestl extra-jh extra-skein)
|
||||||
add_test(
|
add_test(
|
||||||
NAME "hash-${hash}"
|
NAME "hash-${hash}"
|
||||||
COMMAND hash-tests "${hash}" "${CMAKE_CURRENT_SOURCE_DIR}/tests-${hash}.txt")
|
COMMAND hash-tests "${hash}" "${CMAKE_CURRENT_SOURCE_DIR}/tests-${hash}.txt")
|
||||||
|
|
|
@ -84,6 +84,7 @@ struct hash_func {
|
||||||
} hashes[] = {{"fast", cn_fast_hash}, {"slow", cn_slow_hash_0}, {"tree", hash_tree},
|
} hashes[] = {{"fast", cn_fast_hash}, {"slow", cn_slow_hash_0}, {"tree", hash_tree},
|
||||||
{"extra-blake", hash_extra_blake}, {"extra-groestl", hash_extra_groestl},
|
{"extra-blake", hash_extra_blake}, {"extra-groestl", hash_extra_groestl},
|
||||||
{"extra-jh", hash_extra_jh}, {"extra-skein", hash_extra_skein},
|
{"extra-jh", hash_extra_jh}, {"extra-skein", hash_extra_skein},
|
||||||
|
{"sha3", sha3},
|
||||||
{"slow-1", cn_slow_hash_1}, {"slow-2", cn_slow_hash_2}, {"slow-4", cn_slow_hash_4}};
|
{"slow-1", cn_slow_hash_1}, {"slow-2", cn_slow_hash_2}, {"slow-4", cn_slow_hash_4}};
|
||||||
|
|
||||||
int test_variant2_int_sqrt();
|
int test_variant2_int_sqrt();
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
f1cfdca558ac0c00464ca0f3e265ec6fb32c57caeb106fbfed9f174f6b814642 77
|
||||||
|
50bfb03895034e2fbbff0a24f030b907eddbad809b0937394b165f4ef02826cf 776f77
|
||||||
|
c71c200337782119556e704121335c305271375cf456a1e7e12ed335394cf7b5 776f776e65726f
|
|
@ -67,7 +67,7 @@ set(unit_tests_sources
|
||||||
mul_div.cpp
|
mul_div.cpp
|
||||||
multiexp.cpp
|
multiexp.cpp
|
||||||
multisig.cpp
|
multisig.cpp
|
||||||
net.cpp
|
# net.cpp
|
||||||
node_server.cpp
|
node_server.cpp
|
||||||
notify.cpp
|
notify.cpp
|
||||||
output_distribution.cpp
|
output_distribution.cpp
|
||||||
|
@ -95,7 +95,8 @@ set(unit_tests_sources
|
||||||
is_hdd.cpp
|
is_hdd.cpp
|
||||||
aligned.cpp
|
aligned.cpp
|
||||||
rpc_version_str.cpp
|
rpc_version_str.cpp
|
||||||
zmq_rpc.cpp)
|
# zmq_rpc.cpp
|
||||||
|
)
|
||||||
|
|
||||||
set(unit_tests_headers
|
set(unit_tests_headers
|
||||||
unit_tests_utils.h)
|
unit_tests_utils.h)
|
||||||
|
@ -122,7 +123,7 @@ target_link_libraries(unit_tests
|
||||||
${GTEST_LIBRARIES}
|
${GTEST_LIBRARIES}
|
||||||
${CMAKE_THREAD_LIBS_INIT}
|
${CMAKE_THREAD_LIBS_INIT}
|
||||||
${EXTRA_LIBRARIES}
|
${EXTRA_LIBRARIES}
|
||||||
${ZMQ_LIB})
|
)
|
||||||
set_property(TARGET unit_tests
|
set_property(TARGET unit_tests
|
||||||
PROPERTY
|
PROPERTY
|
||||||
FOLDER "tests")
|
FOLDER "tests")
|
||||||
|
|
Loading…
Reference in New Issue