Update tests

This commit is contained in:
Joe Farebrother
2021-08-17 16:44:58 +01:00
parent 48c61fc4b4
commit 076aeb5d80
2 changed files with 23 additions and 7 deletions

View File

@@ -25,7 +25,7 @@ private class GuavaBaseCsv extends SummaryModelCsv {
"com.google.common.cache;LoadingCache;true;getUnchecked;(Object);;MapValue of Argument[-1];ReturnValue;value",
"com.google.common.cache;LoadingCache;true;apply;(Object);;MapValue of Argument[-1];ReturnValue;value",
"com.google.common.cache;LoadingCache;true;getAll;(Iterable);;Element of Argument[0];MapKey of ReturnValue;value",
"com.google.common.cache;LoadingCache;true;getAll;(Iterable);;Element of Argument[0];MapKey of Agument[-1];value",
"com.google.common.cache;LoadingCache;true;getAll;(Iterable);;Element of Argument[0];MapKey of Argument[-1];value",
"com.google.common.cache;LoadingCache;true;getAll;(Iterable);;MapValue of Argument[-1];MapValue of ReturnValue;value"
]
}

View File

@@ -83,11 +83,19 @@ public class Test {
sink(out); // $ hasValueFlow
}
{
// "com.google.common.cache;Cache;true;getAllPresent;(Iterable);;MapValue of Argument[-1];MapValue of ReturnValue;value"
// "com.google.common.cache;Cache;true;getAllPresent;(Iterable);;Element of Argument[0];MapKey of ReturnValue;value"
ImmutableMap out = null;
Cache in = newCacheWithMapValue(source());
Iterable in = newWithElement(source());
Cache instance = null;
out = instance.getAllPresent(in);
sink(getMapKey(out)); // $ hasValueFlow
}
{
// "com.google.common.cache;Cache;true;getAllPresent;(Iterable);;MapKey of Argument[-1];MapKey of ReturnValue;value"
ImmutableMap out = null;
Cache in = newCacheWithMapKey(source());
out = in.getAllPresent(null);
sink(getMapValue(out)); // $ hasValueFlow
sink(getMapKey(out)); // $ hasValueFlow
}
{
// "com.google.common.cache;Cache;true;getIfPresent;;;MapValue of Argument[-1];ReturnValue;value"
@@ -139,10 +147,18 @@ public class Test {
sink(out); // $ hasValueFlow
}
{
// "com.google.common.cache;LoadingCache;true;getAll;(Iterable);;MapKey of Argument[-1];MapKey of ReturnValue;value"
// "com.google.common.cache;LoadingCache;true;getAll;(Iterable);;Element of Argument[0];MapKey of Argument[-1];value"
LoadingCache out = null;
Iterable in = (Iterable)newWithElement(source());
out.getAll(in);
sink(getMapKey(out)); // $ hasValueFlow
}
{
// "com.google.common.cache;LoadingCache;true;getAll;(Iterable);;Element of Argument[0];MapKey of ReturnValue;value"
ImmutableMap out = null;
LoadingCache in = newCacheWithMapKey(source());
out = in.getAll(null);
Iterable in = (Iterable)newWithElement(source());
LoadingCache instance = null;
out = instance.getAll(in);
sink(getMapKey(out)); // $ hasValueFlow
}
{