From 12d19f15e03394c90f3b2629eefcae5cb9211648 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Tue, 16 Nov 2010 06:43:29 +0000 Subject: [PATCH] fix test --- test/test_web_seed.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/test_web_seed.cpp b/test/test_web_seed.cpp index c84ccb2a1..02d2923d9 100644 --- a/test/test_web_seed.cpp +++ b/test/test_web_seed.cpp @@ -256,8 +256,8 @@ int run_suite(char const* protocol, bool test_url_seed, bool chunked_encoding) // verify that the file hashes are correct for (int i = 0; i < torrent_file->num_files(); ++i) { - TEST_CHECK(torrent_file->file_at(i).filehash); - sha1_hash h1 = *torrent_file->file_at(i).filehash; + TEST_CHECK(torrent_file->file_at(i).filehash_index >= 0); + sha1_hash h1 = torrent_file->files().hash(torrent_file->file_at(i).filehash_index); sha1_hash h2 = file_hash(combine_path("./tmp1_web_seed", torrent_file->file_at(i).path)); fprintf(stderr, "%s: %s == %s\n", torrent_file->file_at(i).path.c_str() , to_hex(h1.to_string()).c_str(), to_hex(h2.to_string()).c_str());