Skip to content

Commit 77060de

Browse files
committed
reformat code
1 parent 9b73829 commit 77060de

5 files changed

Lines changed: 8 additions & 19 deletions

File tree

src/test/java/dev/zarr/zarrjava/ZarrPythonTests.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ public class ZarrPythonTests extends ZarrTest {
3232

3333
final static Path PYTHON_TEST_PATH = Paths.get("src/test/python-scripts/");
3434

35-
3635
public static int runCommand(String... command) throws IOException, InterruptedException {
3736
ProcessBuilder pb = new ProcessBuilder();
3837
pb.command().addAll(Arrays.asList(command));
@@ -91,13 +90,13 @@ static ucar.ma2.Array testdata(dev.zarr.zarrjava.core.DataType dt) {
9190
break;
9291
case LONG:
9392
case ULONG:
94-
array.setLong(i, (long) i);
93+
array.setLong(i, i);
9594
break;
9695
case FLOAT:
9796
array.setFloat(i, (float) i);
9897
break;
9998
case DOUBLE:
100-
array.setDouble(i, (double) i);
99+
array.setDouble(i, i);
101100
break;
102101
default:
103102
throw new IllegalArgumentException("Invalid DataType: " + dt);
@@ -130,13 +129,13 @@ static void assertIsTestdata(ucar.ma2.Array result, dev.zarr.zarrjava.core.DataT
130129
break;
131130
case LONG:
132131
case ULONG:
133-
Assertions.assertEquals((long) i, result.getLong(i));
132+
Assertions.assertEquals(i, result.getLong(i));
134133
break;
135134
case FLOAT:
136135
Assertions.assertEquals((float) i, result.getFloat(i), 1e-6);
137136
break;
138137
case DOUBLE:
139-
Assertions.assertEquals((double) i, result.getDouble(i), 1e-12);
138+
Assertions.assertEquals(i, result.getDouble(i), 1e-12);
140139
break;
141140
default:
142141
throw new IllegalArgumentException("Invalid DataType: " + dt);

src/test/java/dev/zarr/zarrjava/store/BufferedZipStoreTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,9 +157,9 @@ public void testZipStoreV2(boolean flushOnWrite) throws ZarrException, IOExcepti
157157
Store writableStore() {
158158
Path path = TESTOUTPUT.resolve("writableStore.ZIP");
159159
if (Files.exists(path)) {
160-
try{
160+
try {
161161
Files.delete(path);
162-
}catch (IOException e) {
162+
} catch (IOException e) {
163163
throw new RuntimeException("Failed to delete existing test ZIP store at: " + path.toAbsolutePath(), e);
164164
}
165165
}

src/test/java/dev/zarr/zarrjava/store/FileSystemStoreTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
import static dev.zarr.zarrjava.v3.Node.makeObjectMapper;
1313

14-
public class FileSystemStoreTest extends WritableStoreTest{
14+
public class FileSystemStoreTest extends WritableStoreTest {
1515

1616
@Override
1717
StoreHandle storeHandleWithData() {

src/test/java/dev/zarr/zarrjava/store/MemoryStoreTest.java

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,10 @@
11
package dev.zarr.zarrjava.store;
22

3-
import dev.zarr.zarrjava.ZarrException;
4-
import dev.zarr.zarrjava.core.Array;
5-
import dev.zarr.zarrjava.core.Attributes;
6-
import dev.zarr.zarrjava.core.Node;
7-
import org.junit.jupiter.api.Assertions;
8-
import org.junit.jupiter.params.ParameterizedTest;
9-
import org.junit.jupiter.params.provider.CsvSource;
10-
11-
import java.io.IOException;
123
import java.nio.ByteBuffer;
13-
import java.util.stream.Stream;
144

155
public class MemoryStoreTest extends WritableStoreTest {
166

177

18-
198
@Override
209
Store writableStore() {
2110
return new MemoryStore();

src/test/java/dev/zarr/zarrjava/store/StoreTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ byte[] testData() {
5151
}
5252
return testData;
5353
}
54+
5455
int[] testDataInt() {
5556
int[] testData = new int[1024 * 1024];
5657
for (int i = 0; i < testData.length; i++) {

0 commit comments

Comments
 (0)