@@ -100,7 +100,7 @@ TEST_F(RuntimeTest, UniqueSlabAllocations) {
100
100
101
101
TEST_F (RuntimeTest, CapacityGrowth) {
102
102
// Allocate a large number of slabs
103
- for (int i = 0 ; i < alaska::HandleTable::initial_capacity * 2 ; i++) {
103
+ for (size_t i = 0 ; i < alaska::HandleTable::initial_capacity * 2 ; i++) {
104
104
auto * slab = runtime.handle_table .fresh_slab (DUMMY_THREADCACHE);
105
105
ASSERT_NE (slab, nullptr );
106
106
}
@@ -149,7 +149,7 @@ TEST_F(RuntimeTest, SlabNFreeOnInitialAllocation) {
149
149
// Make sure that for many slabs, get_slab returns the right one
150
150
TEST_F (RuntimeTest, SlabGetSlab) {
151
151
// Allocate a large number of slabs
152
- for (int i = 0 ; i < alaska::HandleTable::initial_capacity * 2 ; i++) {
152
+ for (size_t i = 0 ; i < alaska::HandleTable::initial_capacity * 2 ; i++) {
153
153
auto * slab = runtime.handle_table .fresh_slab (DUMMY_THREADCACHE);
154
154
ASSERT_NE (slab, nullptr );
155
155
// Check that get_slab returns the right slab
@@ -162,7 +162,7 @@ TEST_F(RuntimeTest, SlabGetReturnsNullWhenOutOfCapacity) {
162
162
// Allocate a fresh slab from the handle table
163
163
auto * slab = runtime.handle_table .fresh_slab (DUMMY_THREADCACHE);
164
164
// Fill up the slab with handles
165
- for (int i = 0 ; i < alaska::HandleTable::slab_capacity; i++) {
165
+ for (size_t i = 0 ; i < alaska::HandleTable::slab_capacity; i++) {
166
166
auto handle = slab->alloc ();
167
167
ASSERT_NE (handle, nullptr );
168
168
}
@@ -180,7 +180,7 @@ TEST_F(RuntimeTest, SlabUniqueHandles) {
180
180
// Create a set to store the handles
181
181
std::set<alaska::Mapping*> handles;
182
182
// Fill up the slab with handles
183
- for (int i = 0 ; i < alaska::HandleTable::slab_capacity; i++) {
183
+ for (size_t i = 0 ; i < alaska::HandleTable::slab_capacity; i++) {
184
184
auto handle = slab->alloc ();
185
185
ASSERT_NE (handle, nullptr );
186
186
// Check that the handle is unique
@@ -215,7 +215,7 @@ TEST_F(RuntimeTest, SlabMappingIndex) {
215
215
// Allocate a fresh slab from the handle table
216
216
auto * slab = runtime.handle_table .fresh_slab (DUMMY_THREADCACHE);
217
217
// Fill up the slab with handles
218
- for (int i = 0 ; i < alaska::HandleTable::slab_capacity; i++) {
218
+ for (size_t i = 0 ; i < alaska::HandleTable::slab_capacity; i++) {
219
219
auto handle = slab->alloc ();
220
220
ASSERT_NE (handle, nullptr );
221
221
// Check that the handle is in the right index
@@ -238,7 +238,7 @@ TEST_F(RuntimeTest, HandleSlabQueuePop) {
238
238
// Create a vector to store the slabs
239
239
std::vector<alaska::HandleSlab*> slabs;
240
240
// For a few iterations...
241
- for (int i = 0 ; i < 10 ; i++) {
241
+ for (size_t i = 0 ; i < 10 ; i++) {
242
242
// Allocate a fresh slab from the handle table
243
243
auto * slab = runtime.handle_table .fresh_slab (DUMMY_THREADCACHE);
244
244
// Push the slab to the queue
@@ -248,7 +248,7 @@ TEST_F(RuntimeTest, HandleSlabQueuePop) {
248
248
}
249
249
250
250
// Pop all the slabs from the queue
251
- for (int i = 0 ; i < 10 ; i++) {
251
+ for (size_t i = 0 ; i < 10 ; i++) {
252
252
auto * slab = queue.pop ();
253
253
// Check that the slab is the same as the one that was pushed
254
254
ASSERT_EQ (slab, slabs[i]);
0 commit comments