Skip to content

Commit

Permalink
Fixup checkstyle issues
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesmudd committed Jun 25, 2024
1 parent 3194c9d commit 5771580
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 2 deletions.
9 changes: 9 additions & 0 deletions jhdf/src/main/java/io/jhdf/api/WritableAttributeImpl.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/*
* This file is part of jHDF. A pure Java library for accessing HDF5 files.
*
* http://jhdf.io
*
* Copyright (c) 2024 James Mudd
*
* MIT License see 'LICENSE' file
*/
package io.jhdf.api;

import io.jhdf.Utils;
Expand Down
13 changes: 13 additions & 0 deletions jhdf/src/test/java/io/jhdf/SimpleWritingTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,19 @@ void writeAttributes() throws Exception {
assertThat(attribute.getDimensions()).isEqualTo(new int[] {3});
assertThat(attribute.getJavaType()).isEqualTo(int.class);
}
}

@Test
@Order(6)
@EnabledIfH5DumpAvailable
void readAttributesWithH5Dump() throws Exception {
// Read with h5dump
HDF5FileXml hdf5FileXml = H5Dump.dumpAndParse(tempFile);

// Read with jhdf
try(HdfFile hdfFile = new HdfFile(tempFile)) {
// Compare
H5Dump.assetXmlAndHdfFileMatch(hdf5FileXml, hdfFile);
}
}
}
Original file line number Diff line number Diff line change
@@ -1,17 +1,24 @@
/*
* This file is part of jHDF. A pure Java library for accessing HDF5 files.
*
* http://jhdf.io
*
* Copyright (c) 2024 James Mudd
*
* MIT License see 'LICENSE' file
*/
package io.jhdf.object.message;

import io.jhdf.Superblock;
import io.jhdf.api.WritableAttributeImpl;
import io.jhdf.storage.HdfBackingStorage;
import org.junit.jupiter.api.Test;
import org.mockito.Mockito;

import java.nio.ByteBuffer;
import java.nio.IntBuffer;
import java.util.BitSet;

import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.jupiter.api.Assertions.*;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;

Expand Down

0 comments on commit 5771580

Please sign in to comment.