Example #1
0
 private TestLightWeightCache.IntEntry GetTest(TestLightWeightCache.IntEntry key)
 {
     TestLightWeightCache.IntEntry c = cache.Get(key);
     if (c != null)
     {
         Assert.Equal(hashMap.Get(key).id, c.id);
     }
     else
     {
         TestLightWeightCache.IntEntry h = hashMap.Remove(key);
         if (h != null)
         {
             Assert.True(cache.IsExpired(h, currentTestTime));
         }
     }
     return(c);
 }
Example #2
0
 private TestGSet.IntElement GetTest(TestGSet.IntElement key)
 {
     TestGSet.IntElement e = expected.Get(key);
     Assert.Equal(e.id, gset.Get(key).id);
     return(e);
 }