@ -524,6 +524,7 @@ TEST_F(DBBasicTest, Snapshot) {
ASSERT_EQ ( 1U , GetNumSnapshots ( ) ) ;
ASSERT_EQ ( 1U , GetNumSnapshots ( ) ) ;
uint64_t time_snap1 = GetTimeOldestSnapshots ( ) ;
uint64_t time_snap1 = GetTimeOldestSnapshots ( ) ;
ASSERT_GT ( time_snap1 , 0U ) ;
ASSERT_GT ( time_snap1 , 0U ) ;
ASSERT_EQ ( GetSequenceOldestSnapshots ( ) , s1 - > GetSequenceNumber ( ) ) ;
Put ( 0 , " foo " , " 0v2 " ) ;
Put ( 0 , " foo " , " 0v2 " ) ;
Put ( 1 , " foo " , " 1v2 " ) ;
Put ( 1 , " foo " , " 1v2 " ) ;
@ -532,6 +533,7 @@ TEST_F(DBBasicTest, Snapshot) {
const Snapshot * s2 = db_ - > GetSnapshot ( ) ;
const Snapshot * s2 = db_ - > GetSnapshot ( ) ;
ASSERT_EQ ( 2U , GetNumSnapshots ( ) ) ;
ASSERT_EQ ( 2U , GetNumSnapshots ( ) ) ;
ASSERT_EQ ( time_snap1 , GetTimeOldestSnapshots ( ) ) ;
ASSERT_EQ ( time_snap1 , GetTimeOldestSnapshots ( ) ) ;
ASSERT_EQ ( GetSequenceOldestSnapshots ( ) , s1 - > GetSequenceNumber ( ) ) ;
Put ( 0 , " foo " , " 0v3 " ) ;
Put ( 0 , " foo " , " 0v3 " ) ;
Put ( 1 , " foo " , " 1v3 " ) ;
Put ( 1 , " foo " , " 1v3 " ) ;
@ -539,6 +541,7 @@ TEST_F(DBBasicTest, Snapshot) {
ManagedSnapshot s3 ( db_ ) ;
ManagedSnapshot s3 ( db_ ) ;
ASSERT_EQ ( 3U , GetNumSnapshots ( ) ) ;
ASSERT_EQ ( 3U , GetNumSnapshots ( ) ) ;
ASSERT_EQ ( time_snap1 , GetTimeOldestSnapshots ( ) ) ;
ASSERT_EQ ( time_snap1 , GetTimeOldestSnapshots ( ) ) ;
ASSERT_EQ ( GetSequenceOldestSnapshots ( ) , s1 - > GetSequenceNumber ( ) ) ;
Put ( 0 , " foo " , " 0v4 " ) ;
Put ( 0 , " foo " , " 0v4 " ) ;
Put ( 1 , " foo " , " 1v4 " ) ;
Put ( 1 , " foo " , " 1v4 " ) ;
@ -554,6 +557,7 @@ TEST_F(DBBasicTest, Snapshot) {
ASSERT_EQ ( 2U , GetNumSnapshots ( ) ) ;
ASSERT_EQ ( 2U , GetNumSnapshots ( ) ) ;
ASSERT_EQ ( time_snap1 , GetTimeOldestSnapshots ( ) ) ;
ASSERT_EQ ( time_snap1 , GetTimeOldestSnapshots ( ) ) ;
ASSERT_EQ ( GetSequenceOldestSnapshots ( ) , s1 - > GetSequenceNumber ( ) ) ;
ASSERT_EQ ( " 0v1 " , Get ( 0 , " foo " , s1 ) ) ;
ASSERT_EQ ( " 0v1 " , Get ( 0 , " foo " , s1 ) ) ;
ASSERT_EQ ( " 1v1 " , Get ( 1 , " foo " , s1 ) ) ;
ASSERT_EQ ( " 1v1 " , Get ( 1 , " foo " , s1 ) ) ;
ASSERT_EQ ( " 0v2 " , Get ( 0 , " foo " , s2 ) ) ;
ASSERT_EQ ( " 0v2 " , Get ( 0 , " foo " , s2 ) ) ;
@ -568,9 +572,11 @@ TEST_F(DBBasicTest, Snapshot) {
ASSERT_EQ ( " 1v4 " , Get ( 1 , " foo " ) ) ;
ASSERT_EQ ( " 1v4 " , Get ( 1 , " foo " ) ) ;
ASSERT_EQ ( 1U , GetNumSnapshots ( ) ) ;
ASSERT_EQ ( 1U , GetNumSnapshots ( ) ) ;
ASSERT_LT ( time_snap1 , GetTimeOldestSnapshots ( ) ) ;
ASSERT_LT ( time_snap1 , GetTimeOldestSnapshots ( ) ) ;
ASSERT_EQ ( GetSequenceOldestSnapshots ( ) , s2 - > GetSequenceNumber ( ) ) ;
db_ - > ReleaseSnapshot ( s2 ) ;
db_ - > ReleaseSnapshot ( s2 ) ;
ASSERT_EQ ( 0U , GetNumSnapshots ( ) ) ;
ASSERT_EQ ( 0U , GetNumSnapshots ( ) ) ;
ASSERT_EQ ( GetSequenceOldestSnapshots ( ) , 0 ) ;
ASSERT_EQ ( " 0v4 " , Get ( 0 , " foo " ) ) ;
ASSERT_EQ ( " 0v4 " , Get ( 0 , " foo " ) ) ;
ASSERT_EQ ( " 1v4 " , Get ( 1 , " foo " ) ) ;
ASSERT_EQ ( " 1v4 " , Get ( 1 , " foo " ) ) ;
} while ( ChangeOptions ( ) ) ;
} while ( ChangeOptions ( ) ) ;