diff --git a/cpp-client/deephaven/tests/src/table_test.cc b/cpp-client/deephaven/tests/src/table_test.cc index f2396697eef..9f7dbdc71c8 100644 --- a/cpp-client/deephaven/tests/src/table_test.cc +++ b/cpp-client/deephaven/tests/src/table_test.cc @@ -41,8 +41,8 @@ TEST_CASE("Fetch the entire table (small)", "[client_table]") { "Bools = ii == 5 ? null : ((ii % 2) == 0)", "Strings = ii == 5 ? null : `hello ` + i", "DateTimes = ii == 5 ? null : '2001-03-01T12:34:56Z' + ii", - "LocalDates = ii == 5 ? null : parseLocalDate(`2001-3-` + (ii + 1))", - "LocalTimes = ii == 5 ? null : parseLocalTime(`12:34:` + (46 + ii))" + "LocalDates = ii == 5 ? null : '2001-03-01' + ((int)ii * 'P1D')", + "LocalTimes = ii == 5 ? null : '12:34:46'.plus((int)ii * 'PT1S')" }); std::cout << th.Stream(true) << '\n'; diff --git a/cpp-client/deephaven/tests/src/ticking_test.cc b/cpp-client/deephaven/tests/src/ticking_test.cc index 5d8ae0d6ae1..e722b06a8f1 100644 --- a/cpp-client/deephaven/tests/src/ticking_test.cc +++ b/cpp-client/deephaven/tests/src/ticking_test.cc @@ -14,6 +14,8 @@ using deephaven::client::Client; using deephaven::client::TableHandle; using deephaven::client::utility::TableMaker; using deephaven::dhcore::DateTime; +using deephaven::dhcore::LocalDate; +using deephaven::dhcore::LocalTime; using deephaven::dhcore::chunk::ChunkMaker; using deephaven::dhcore::chunk::BooleanChunk; using deephaven::dhcore::chunk::DateTimeChunk; @@ -188,6 +190,8 @@ class WaitForPopulatedTableCallback final : public CommonBase { auto bools = MakeReservedVector>(target_); auto strings = MakeReservedVector>(target_); auto date_times = MakeReservedVector>(target_); + auto local_dates = MakeReservedVector>(target_); + auto local_times = MakeReservedVector>(target_); auto date_time_start = DateTime::Parse("2001-03-01T12:34:56Z"); @@ -202,6 +206,8 @@ class WaitForPopulatedTableCallback final : public CommonBase { bools.emplace_back((i % 2) == 0); strings.emplace_back(fmt::format("hello {}", i)); date_times.emplace_back(DateTime::FromNanos(date_time_start.Nanos() + i)); + local_dates.emplace_back(LocalDate::Of(2001, 3, i + 1)); + local_times.emplace_back(LocalTime::Of(12, 34, 46 + i)); } if (target_ == 0) { @@ -220,6 +226,8 @@ class WaitForPopulatedTableCallback final : public CommonBase { bools[t2] = {}; strings[t2] = {}; date_times[t2] = {}; + local_dates[t2] = {}; + local_times[t2] = {}; CompareColumn(*current, "Chars", chars); CompareColumn(*current, "Bytes", int8s); @@ -231,6 +239,8 @@ class WaitForPopulatedTableCallback final : public CommonBase { CompareColumn(*current, "Bools", bools); CompareColumn(*current, "Strings", strings); CompareColumn(*current, "DateTimes", date_times); + CompareColumn(*current, "LocalDates", local_dates); + CompareColumn(*current, "LocalTimes", local_times); NotifyDone(); } @@ -255,7 +265,9 @@ TEST_CASE("Ticking Table: all the data is eventually present", "[ticking]") { "Doubles = II == 5 ? null : (double)II", "Bools = II == 5 ? null : ((II % 2) == 0)", "Strings = II == 5 ? null : (`hello ` + II)", - "DateTimes = II == 5 ? null : ('2001-03-01T12:34:56Z' + II)" + "DateTimes = II == 5 ? null : ('2001-03-01T12:34:56Z' + II)", + "LocalDates = ii == 5 ? null : '2001-03-01' + ((int)II * 'P1D')", + "LocalTimes = ii == 5 ? null : '12:34:46'.plus((int)II * 'PT1S')" }) .LastBy("II") .Sort(SortPair::Ascending("II"));