From 452d4fae396589850e4dcf66dbf1209ea96f0ef1 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Tue, 3 Oct 2017 00:51:53 +0100 Subject: tests: fix hashchain unit tests and relax the not-empty safety check to stay more intuitiuve --- tests/unit_tests/hashchain.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/unit_tests/hashchain.cpp') diff --git a/tests/unit_tests/hashchain.cpp b/tests/unit_tests/hashchain.cpp index 0fa0f784a..e764f6afc 100644 --- a/tests/unit_tests/hashchain.cpp +++ b/tests/unit_tests/hashchain.cpp @@ -122,7 +122,7 @@ TEST(hashchain, trim) ASSERT_EQ(hashchain.size(), 3); ASSERT_EQ(hashchain[2], make_hash(3)); hashchain.trim(3); - ASSERT_EQ(hashchain.offset(), 3); + ASSERT_EQ(hashchain.offset(), 2); // never gets it empty ASSERT_EQ(hashchain.size(), 3); ASSERT_FALSE(hashchain.empty()); ASSERT_EQ(hashchain.genesis(), make_hash(1)); -- cgit v1.2.3