From 7afc39a7079f7afe424f42d86348590b1646d852 Mon Sep 17 00:00:00 2001 From: Mike Fleetwood Date: Sat, 29 Jun 2019 09:46:43 +0100 Subject: [PATCH] Erase correct key in unit test PasswordRAMStoreTest.TooLongPassword Was attempting to erase the wrong key "key-long" for the test. It should be erasing "key-too-long". Fix this. Given that that line in the test was to erase a non-existent key and confirm failure; the test passed before with the wrong non-existent key, and still passes with the right non-existent key. Clearly a cut and paste error as a result of copying the previous LongPassword test when initially added in: c6657aab9efe8cefece2017bee4bef9ece607e73 Add unit tests for PasswordRAMStore module (#795617) --- tests/test_PasswordRAMStore.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_PasswordRAMStore.cc b/tests/test_PasswordRAMStore.cc index 7c96b608..5cfd0d12 100644 --- a/tests/test_PasswordRAMStore.cc +++ b/tests/test_PasswordRAMStore.cc @@ -272,7 +272,7 @@ TEST_F( PasswordRAMStoreTest, TooLongPassword ) looked_up_pw = PasswordRAMStore::lookup( "key-too-long" ); EXPECT_TRUE( looked_up_pw == NULL ); - EXPECT_FALSE( PasswordRAMStore::erase( "key-long" ) ); + EXPECT_FALSE(PasswordRAMStore::erase("key-too-long")); EXPECT_TRUE( mem_is_zero( protected_mem, ProtectedMemSize ) ); }