lowka commented on code in PR #3627:
URL: https://github.com/apache/ignite-3/pull/3627#discussion_r1571899954
##########
modules/core/src/test/java/org/apache/ignite/internal/util/io/IgniteUnsafeDataInputOutputByteOrderTest.java:
##########
@@ -237,4 +249,101 @@ public void testDoubleArray() throws Exception {
assertArrayEquals(arr, in.readDoubleArray(ARR_LEN), 0);
}
+
+ @Test
+ public void testLocalTime() throws IOException {
+ LocalTime val = LocalTime.of(RND.nextInt(24), RND.nextInt(60),
RND.nextInt(60), RND.nextInt(10000));
+
+ out.writeLocalTime(val);
+
+ assertEquals(val, in.readLocalTime());
+ }
+
+ @Test
+ public void testLocalDate() throws IOException {
+ LocalDate val = LocalDate.of(RND.nextInt(500) + 1900, RND.nextInt(12)
+ 1, 1 + RND.nextInt(27));
+
+ out.writeLocalDate(val);
+
+ assertEquals(val, in.readLocalDate());
+ }
+
+ @Test
+ public void testLocalDateTime() throws IOException {
+ LocalTime time = LocalTime.of(RND.nextInt(24), RND.nextInt(60),
RND.nextInt(60), RND.nextInt(10000));
+ LocalDate date = LocalDate.of(RND.nextInt(500) + 1900, RND.nextInt(12)
+ 1, 1 + RND.nextInt(27));
+ LocalDateTime val = LocalDateTime.of(date, time);
+
+ out.writeLocalDateTime(val);
+
+ assertEquals(val, in.readLocalDateTime());
+ }
+
+ @Test
+ public void testInstant() throws IOException {
+ Instant val = Instant.ofEpochMilli(Math.abs(RND.nextLong()));
Review Comment:
Thanks, done.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]