The default initalization for mNullValue uses 0 which is in the case of
a std::string TValue will invoke the contructor with undefined behavior
parameter.
Using an empty uniform initialization {} addresses the problem.
Test: Already tested in lrucache_test.cpp
Bug: 257127748
Change-Id: I37420ce8a16c99f3014538a0208d7e113870b1c7
The callback can be called by the destructor of LruCache, so it needs to be destructed last.
Bug: 227635615
Change-Id: I7d965a2000c1ec32d9c9e88d25ab0c1ba3e9c739
Move tests in the same directory as the corresponding code, so it's
easier to see what is/isn't tested.
Fix naming of libcutils_tests (plural) to match the singular that's more
common (even though the plural makes more sense to me).
Add these two to system/core/'s TEST_MAPPING.
Remove obsolete AndroidTest.xml.
Fix a flaky (timing-dependent) libcutils test.
Test: ran tests
Change-Id: I7e0a31ff45c8a152562bf66fc97161594249366e
2019-02-11 13:15:56 -08:00
Renamed from libutils/tests/LruCache_test.cpp (Browse further)