Skip to content

Commit 14cc0b2

Browse files
fix build failures in test
1 parent 1e5c750 commit 14cc0b2

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

test/src/unit-cppapi-max-fragment-size.cc

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -555,13 +555,13 @@ TEST_CASE(
555555

556556
// Read data to validate write and num of fragments.
557557
CHECK(tiledb::test::num_fragments(array_name) == 3);
558+
558559
Array array(ctx, array_name, TILEDB_READ);
559-
const std::vector<int32_t> subarray = {0, 2, 0, 2};
560+
tiledb::Subarray sub(ctx, array);
561+
sub.set_subarray({0, 2, 0, 2});
560562
std::vector<int32_t> a(9);
561563
Query query(ctx, array, TILEDB_READ);
562-
query.set_subarray(subarray)
563-
.set_layout(TILEDB_ROW_MAJOR)
564-
.set_data_buffer("a", a);
564+
query.set_subarray(sub).set_layout(TILEDB_ROW_MAJOR).set_data_buffer("a", a);
565565
query.submit();
566566
array.close();
567567

@@ -582,10 +582,11 @@ TEST_CASE(
582582

583583
// Read data to validate correctness
584584
Array array2(ctx, array_name, TILEDB_READ);
585-
const std::vector<int32_t> subarray2 = {0, 2, 0, 2};
585+
tiledb::Subarray sub2(ctx, array2);
586+
sub2.set_subarray({0, 2, 0, 2});
586587
std::vector<int32_t> a2(9);
587588
Query query2(ctx, array2, TILEDB_READ);
588-
query2.set_subarray(subarray2)
589+
query2.set_subarray(sub2)
589590
.set_layout(TILEDB_ROW_MAJOR)
590591
.set_data_buffer("a", a2);
591592
query2.submit();

0 commit comments

Comments
 (0)