コード例 #1
0
 def test_is_hit_false_index_mismatch(self):
     """is_hit should return False if index does not exist in cache"""
     nose.assert_false(sim.is_hit(self.cache, '011', '1011'))
コード例 #2
0
 def test_is_hit_false_tag_mismatch(self):
     """is_hit should return False if tag does not exist in cache"""
     nose.assert_false(sim.is_hit(self.cache, '010', '1010'))
コード例 #3
0
 def test_is_hit_true(self):
     """is_hit should return True if index and tag exist in cache"""
     nose.assert_true(sim.is_hit(self.cache, '010', '1011'))