Browse Source

+ simple test for Dateutils.DateOf

florian 1 năm trước cách đây
mục cha
commit
f671db3fa6
1 tập tin đã thay đổi với 12 bổ sung0 xóa
  1. 12 0
      packages/rtl-objpas/tests/tdateof.pp

+ 12 - 0
packages/rtl-objpas/tests/tdateof.pp

@@ -0,0 +1,12 @@
+uses
+  Sysutils,DateUtils;
+var
+  d1,d2 : TDateTime;
+begin
+  d1:=EncodeDateDay(2023,1);
+  d2:=EncodeDate(2023,1,1);
+  d1:=d1+0.6;
+  d2:=d2+0.3;
+  if DateOf(d1)<>DateOf(d2) then
+    halt(1);
+end.