aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests/data/hash
diff options
context:
space:
mode:
authorDaniel Neus <[email protected]>2016-07-19 18:17:19 +0200
committerDaniel Neus <[email protected]>2016-07-20 14:56:18 +0200
commit8f53d3f6efd1419e8feac027035fc8d407e1e75f (patch)
treefc3060e3414f3dc3d562e43c6879f7a6dbdfc298 /src/tests/data/hash
parent308c7d5eda678566edd26e9ab20edbe772f46363 (diff)
improve parallel hash tests + memory leak fix
- add one test with SHA-256,SHA-512 - test Parallel::clone() - test Parallel ctor - fix memory leak in Parallel::clone(): Currently Parallel::clone() calls hash->clone() (first heap allocation) and after this clone() calls Parallel(const std::vector<HashFunction*>& in) which does another heap allocation. So its sufficient to pass the hash pointer to the Parallel ctor instead of a clone
Diffstat (limited to 'src/tests/data/hash')
-rw-r--r--src/tests/data/hash/parallel.vec4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/tests/data/hash/parallel.vec b/src/tests/data/hash/parallel.vec
index 8fd62a76b..544ecc0b8 100644
--- a/src/tests/data/hash/parallel.vec
+++ b/src/tests/data/hash/parallel.vec
@@ -9,3 +9,7 @@ Out = 0CC175B9C0F1B6A831C399E26977266186F7E437FAA5A7FCE15D1DDCB9EAEAEA377667B8
In =
Out = DA39A3EE5E6B4B0D3255BFEF95601890AFD80709CDF26213A150DC3ECB610F18F6B38B463293AC630C13F0245F92BBB1766E16167A4E58492DDE73F3
+[Parallel(SHA-256,SHA-512)]
+In =
+Out = E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855CF83E1357EEFB8BDF1542850D66D8007D620E4050B5715DC83F4A921D36CE9CE47D0D13C5D85F2B0FF8318D2877EEC2F63B931BD47417A81A538327AF927DA3E
+