Ejemplo n.º 1
0
            private bool ContainsTest(TestGSet.IntElement key)
            {
                bool e = expected.Contains(key);

                Assert.Equal(e, gset.Contains(key));
                return(e);
            }
Ejemplo n.º 2
0
            private bool ContainsTest(TestLightWeightCache.IntEntry key)
            {
                bool c = cache.Contains(key);

                if (c)
                {
                    Assert.True(hashMap.Contains(key));
                }
                else
                {
                    TestLightWeightCache.IntEntry h = hashMap.Remove(key);
                    if (h != null)
                    {
                        Assert.True(cache.IsExpired(h, currentTestTime));
                    }
                }
                return(c);
            }