Skip to content

Commit

Permalink
Add read test for timestamps.unit and timestamps.interval
Browse files Browse the repository at this point in the history
  • Loading branch information
oruebel committed Jan 9, 2025
1 parent 675a8db commit 2408a08
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions tests/testBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,19 @@ TEST_CASE("TimeSeries", "[base]")
REQUIRE(readDataContinuityValues
== AQNWB::NWB::TimeSeries::ContinuityTypeNames[continuity]);

// TODO Read missing readControlDescription,
// readControl, readTimestampsUnit, readTimestampsInterval,
// Read the timestamps unit
auto readTimestampsUnitWrapper = readTimeSeries->readTimestampsUnit();
auto readTimestampsUnitValues = readTimestampsUnitWrapper->values().data[0];
REQUIRE(readTimestampsUnitValues == "seconds");

// Read the timestamps interval
auto readTimestampsIntervalWrapper =
readTimeSeries->readTimestampsInterval();
auto readTimestampsIntervalValues =
readTimestampsIntervalWrapper->values().data[0];
REQUIRE(readTimestampsIntervalValues == 1);

// TODO Read missing readControlDescription, readControl,
// readStartingTimeUnit, readStartingTimeRate, readStartingTime. Some of
// these may not be written yet.
}
Expand Down

0 comments on commit 2408a08

Please sign in to comment.