Code is compatible with gcc 4.8
This commit is contained in:
parent
8dc31b7a85
commit
fb733929d8
1
implementations/caching/cache/Cache.h
vendored
1
implementations/caching/cache/Cache.h
vendored
@ -10,6 +10,7 @@
|
||||
#include <future>
|
||||
#include <messmer/cpp-utils/assert/assert.h>
|
||||
#include <messmer/cpp-utils/lock/MutexPoolLock.h>
|
||||
#include <messmer/cpp-utils/pointer/gcc_4_8_compatibility.h>
|
||||
|
||||
namespace blockstore {
|
||||
namespace caching {
|
||||
|
@ -5,8 +5,8 @@
|
||||
#include <future>
|
||||
#include <messmer/cpp-utils/lock/ConditionBarrier.h>
|
||||
|
||||
using namespace std::chrono_literals;
|
||||
using namespace blockstore::caching;
|
||||
using std::chrono::seconds;
|
||||
using std::string;
|
||||
using cpputils::ConditionBarrier;
|
||||
using std::unique_ptr;
|
||||
@ -24,7 +24,7 @@ public:
|
||||
: _onDestructorStarted(onDestructorStarted), _destructorFinished(destructorFinished) {}
|
||||
~ObjectWithLongDestructor() {
|
||||
_onDestructorStarted->release();
|
||||
std::this_thread::sleep_for(1s);
|
||||
std::this_thread::sleep_for(seconds(1));
|
||||
*_destructorFinished = true;
|
||||
}
|
||||
private:
|
||||
|
@ -79,7 +79,9 @@ private:
|
||||
EXPECT_DATA_READS_AS_OUTSIDE_OF(ZEROES, block, start, count);
|
||||
}
|
||||
};
|
||||
constexpr std::initializer_list<DataRange> DATA_RANGES = {
|
||||
|
||||
inline std::vector<DataRange> DATA_RANGES() {
|
||||
return {
|
||||
DataRange{1024, 0, 1024}, // full size leaf, access beginning to end
|
||||
DataRange{1024, 100, 1024 - 200}, // full size leaf, access middle to middle
|
||||
DataRange{1024, 0, 1024 - 100}, // full size leaf, access beginning to middle
|
||||
@ -89,9 +91,10 @@ constexpr std::initializer_list<DataRange> DATA_RANGES = {
|
||||
DataRange{1024 - 100, 0, 1024 - 200}, // non-full size leaf, access beginning to middle
|
||||
DataRange{1024 - 100, 100, 1024 - 200} // non-full size leaf, access middle to end
|
||||
};
|
||||
};
|
||||
#define TYPED_TEST_P_FOR_ALL_DATA_RANGES(TestName) \
|
||||
TYPED_TEST_P(BlockStoreTest, TestName) { \
|
||||
for (auto dataRange: DATA_RANGES) { \
|
||||
for (auto dataRange: DATA_RANGES()) { \
|
||||
BlockStoreDataParametrizedTest(this->fixture.createBlockStore(), dataRange) \
|
||||
.Test##TestName(); \
|
||||
} \
|
||||
|
Loading…
Reference in New Issue
Block a user