Skip to content

Commit f987a54

Browse files
committed
Formatting
1 parent a362c57 commit f987a54

File tree

2 files changed

+14
-9
lines changed

2 files changed

+14
-9
lines changed

mdio/dataset_test.cc

+13-8
Original file line numberDiff line numberDiff line change
@@ -538,11 +538,13 @@ TEST(Dataset, iselWithStrideAndExistingData) {
538538
std::string testPath = "zarrs/slice_scale_test";
539539
float scaleFactor = 2.5f;
540540

541-
// --- Step 1: Initialize the entire image variable with QC values and Write it ---
541+
// --- Step 1: Initialize the entire image variable with QC values and Write
542+
// it ---
542543
{
543544
// Create a new dataset
544545
auto json_vars = GetToyExample();
545-
auto dataset = mdio::Dataset::from_json(json_vars, testPath, mdio::constants::kCreateClean);
546+
auto dataset = mdio::Dataset::from_json(json_vars, testPath,
547+
mdio::constants::kCreateClean);
546548
ASSERT_TRUE(dataset.status().ok()) << dataset.status();
547549
auto ds = dataset.value();
548550

@@ -571,7 +573,8 @@ TEST(Dataset, iselWithStrideAndExistingData) {
571573
ASSERT_TRUE(writeFut.status().ok()) << writeFut.status();
572574
} // End of Step 1
573575

574-
// --- Step 2: Slice with stride of 2 and scale the values of the "image" variable ---
576+
// --- Step 2: Slice with stride of 2 and scale the values of the "image"
577+
// variable ---
575578
{
576579
// Re-open the dataset for modifications.
577580
auto reopenedDsFut = mdio::Dataset::Open(testPath, mdio::constants::kOpen);
@@ -594,9 +597,10 @@ TEST(Dataset, iselWithStrideAndExistingData) {
594597
auto imageData = imageDataFut.value();
595598
auto imageAccessor = imageData.get_data_accessor().data();
596599

597-
// The sliced "image" now has dimensions 128 x 512 x 384 because we selected every 2nd index.
598-
// Scale each element in the slice by 'scaleFactor'
599-
for (uint32_t ii = 0; ii < 128; ii++) { // 'ii' corresponds to original index i = ii * 2.
600+
// The sliced "image" now has dimensions 128 x 512 x 384 because we selected
601+
// every 2nd index. Scale each element in the slice by 'scaleFactor'
602+
for (uint32_t ii = 0; ii < 128;
603+
ii++) { // 'ii' corresponds to original index i = ii * 2.
600604
for (uint32_t j = 0; j < 512; j++) {
601605
for (uint32_t k = 0; k < 384; k++) {
602606
size_t index = ii * (512 * 384) + j * 384 + k;
@@ -626,8 +630,9 @@ TEST(Dataset, iselWithStrideAndExistingData) {
626630
auto imageAccessor = imageData.get_data_accessor().data();
627631

628632
// Validate the values over the entire "image" variable.
629-
// For even inline indices (i % 2 == 0) we expect the initial QC value scaled by 'scaleFactor'.
630-
// For odd inline indices, the original QC values should remain.
633+
// For even inline indices (i % 2 == 0) we expect the initial QC value
634+
// scaled by 'scaleFactor'. For odd inline indices, the original QC values
635+
// should remain.
631636
for (uint32_t i = 0; i < 256; i++) {
632637
for (uint32_t j = 0; j < 512; j++) {
633638
for (uint32_t k = 0; k < 384; k++) {

mdio/variable_test.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -754,7 +754,7 @@ TEST(Variable, outOfBoundsSlice) {
754754
auto badDomain = outbounds.value();
755755
EXPECT_THAT(badDomain.dimensions().shape(), ::testing::ElementsAre(250, 500))
756756
<< badDomain.dimensions();
757-
757+
758758
auto var1 =
759759
mdio::Variable<>::Open(json_good, mdio::constants::kCreateClean).result();
760760

0 commit comments

Comments
 (0)