Skip to content

Commit 4a27916

Browse files
committed
test some timestamp helpers
1 parent a38253d commit 4a27916

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

test/testBlocks.jl

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,13 @@ function DFGVariableSCA()
242242

243243
v1_lbl = :a
244244
v1_tags = Set([:VARIABLE, :POSE])
245-
testTimestamp = now(localzone())
245+
#test some Timestamp helpers
246+
ts1 = DFG.Timestamp(Nanosecond(1760700359563000064), localzone())
247+
ts2 = DFG.Timestamp(1760700359.563000064, localzone())
248+
@test ts1 == ts2
249+
ts3 = DFG.Timestamp("2020-08-11T00:12:03.000-05:00")
250+
ts4 = DFG.Timestamp(Val(:rata), 63732787923.0, FixedTimeZone("UTC-05:00"))
251+
@test ts3 == ts4
246252
# Constructors
247253
v1 = VariableDFG(
248254
v1_lbl,
@@ -260,7 +266,7 @@ function DFGVariableSCA()
260266
v3 = VariableDFG(
261267
:c,
262268
State{TestVariableType2}(; label = :default);
263-
timestamp = ZonedDateTime("2020-08-11T00:12:03.000-05:00"),
269+
timestamp = DFG.Timestamp("2020-08-11T00:12:03.000-05:00"),
264270
)
265271

266272
vorphan = VariableDFG(

0 commit comments

Comments
 (0)