style: format code (#4212)

close #4204
This commit is contained in:
acbin
2023-06-09 18:52:05 +08:00
committed by GitHub
parent ad03086f54
commit 00282efd8b
521 changed files with 5233 additions and 7309 deletions

View File

@@ -15,19 +15,19 @@ class LFUCacheTest {
lfuCache.put(4, 40);
lfuCache.put(5, 50);
//get method call will increase frequency of key 1 by 1
// get method call will increase frequency of key 1 by 1
assertEquals(10, lfuCache.get(1));
//this operation will remove value with key as 2
// this operation will remove value with key as 2
lfuCache.put(6, 60);
//will return null as value with key 2 is now evicted
// will return null as value with key 2 is now evicted
assertEquals(null, lfuCache.get(2));
//should return 60
// should return 60
assertEquals(60, lfuCache.get(6));
//this operation will remove value with key as 3
// this operation will remove value with key as 3
lfuCache.put(7, 70);
assertEquals(null, lfuCache.get(2));
@@ -43,19 +43,19 @@ class LFUCacheTest {
lfuCache.put(4, "Delta");
lfuCache.put(5, "Eplison");
//get method call will increase frequency of key 1 by 1
// get method call will increase frequency of key 1 by 1
assertEquals("Alpha", lfuCache.get(1));
//this operation will remove value with key as 2
// this operation will remove value with key as 2
lfuCache.put(6, "Digamma");
//will return null as value with key 2 is now evicted
// will return null as value with key 2 is now evicted
assertEquals(null, lfuCache.get(2));
//should return string Digamma
// should return string Digamma
assertEquals("Digamma", lfuCache.get(6));
//this operation will remove value with key as 3
// this operation will remove value with key as 3
lfuCache.put(7, "Zeta");
assertEquals(null, lfuCache.get(2));