[gparted] Erase correct key in unit test PasswordRAMStoreTest.TooLongPassword



commit 7afc39a7079f7afe424f42d86348590b1646d852
Author: Mike Fleetwood <mike fleetwood googlemail com>
Date:   Sat Jun 29 09:46:43 2019 +0100

    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 ) );
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]