-
-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #138 from jamesmudd/btree-v2-records
Btree v2 records
- Loading branch information
Showing
4 changed files
with
72 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
jhdf/src/test/java/io/jhdf/btree/record/BTreeRecordTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
* This file is part of jHDF. A pure Java library for accessing HDF5 files. | ||
* | ||
* http://jhdf.io | ||
* | ||
* Copyright 2019 James Mudd | ||
* | ||
* MIT License see 'LICENSE' file | ||
*/ | ||
package io.jhdf.btree.record; | ||
|
||
import io.jhdf.exceptions.HdfException; | ||
import io.jhdf.exceptions.UnsupportedHdfException; | ||
import org.junit.jupiter.api.Test; | ||
|
||
import static org.junit.jupiter.api.Assertions.assertThrows; | ||
|
||
class BTreeRecordTest { | ||
|
||
@Test | ||
void testUnsupportedRecordTypesThrow() { | ||
assertThrows(HdfException.class, () -> BTreeRecord.readRecord(0, null, null)); | ||
assertThrows(UnsupportedHdfException.class, () -> BTreeRecord.readRecord(1, null, null)); | ||
assertThrows(UnsupportedHdfException.class, () -> BTreeRecord.readRecord(2, null, null)); | ||
assertThrows(UnsupportedHdfException.class, () -> BTreeRecord.readRecord(3, null, null)); | ||
assertThrows(UnsupportedHdfException.class, () -> BTreeRecord.readRecord(4, null, null)); | ||
assertThrows(UnsupportedHdfException.class, () -> BTreeRecord.readRecord(6, null, null)); | ||
assertThrows(UnsupportedHdfException.class, () -> BTreeRecord.readRecord(7, null, null)); | ||
assertThrows(UnsupportedHdfException.class, () -> BTreeRecord.readRecord(9, null, null)); | ||
} | ||
|
||
@Test | ||
void testUnreconizedRecordTypeThrows() { | ||
assertThrows(HdfException.class, () -> BTreeRecord.readRecord(63, null, null)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters