24 cache.Insert(10,
"a");
25 cache.Insert(20,
"b");
26 cache.Insert(40,
"c");
28 cache.Insert(15,
"ab");
29 cache.Insert(25,
"bc");
33 EXPECT(strcmp(*cache.Lookup(5),
"_") == 0);
34 EXPECT(strcmp(*cache.Lookup(10),
"a") == 0);
35 EXPECT(strcmp(*cache.Lookup(20),
"b") == 0);
36 EXPECT(strcmp(*cache.Lookup(40),
"c") == 0);
37 EXPECT(strcmp(*cache.Lookup(25),
"bc") == 0);
39 EXPECT(cache.Lookup(1) ==
nullptr);
40 EXPECT(cache.Lookup(35) ==
nullptr);
41 EXPECT(cache.Lookup(50) ==
nullptr);