Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1c3ee89

Browse files
committed
Added timestamp with time zone and timestamp with local time zone to ut_assert.
1 parent c4a0ad0 commit 1c3ee89

4 files changed

Lines changed: 32 additions & 0 deletions

source/ut_assert.pkb

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,26 @@ create or replace package body ut_assert is
4141
ut.expect(a_actual,a_msg).to_equal(a_expected);
4242
end;
4343

44+
procedure are_equal(a_expected in timestamp_ltz_unconstrained, a_actual in timestamp_ltz_unconstrained) is
45+
begin
46+
are_equal(null, a_expected, a_actual);
47+
end;
48+
49+
procedure are_equal(a_msg in varchar2, a_expected in timestamp_ltz_unconstrained, a_actual in timestamp_ltz_unconstrained) is
50+
begin
51+
ut.expect(a_actual,a_msg).to_equal(a_expected);
52+
end;
53+
54+
procedure are_equal(a_expected in timestamp_tz_unconstrained, a_actual in timestamp_tz_unconstrained) is
55+
begin
56+
are_equal(null, a_expected, a_actual);
57+
end;
58+
59+
procedure are_equal(a_msg in varchar2, a_expected in timestamp_tz_unconstrained, a_actual in timestamp_tz_unconstrained) is
60+
begin
61+
ut.expect(a_actual,a_msg).to_equal(a_expected);
62+
end;
63+
4464
procedure are_equal(a_expected in anydata, a_actual in anydata) is
4565
begin
4666
are_equal(null, a_expected, a_actual);

source/ut_assert.pks

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ create or replace package ut_assert authid current_user as
1717
procedure are_equal(a_msg in varchar2, a_expected in timestamp_unconstrained, a_actual in timestamp_unconstrained);
1818
procedure are_equal(a_expected in timestamp_unconstrained, a_actual in timestamp_unconstrained);
1919

20+
procedure are_equal(a_msg in varchar2, a_expected in timestamp_tz_unconstrained, a_actual in timestamp_tz_unconstrained);
21+
procedure are_equal(a_expected in timestamp_tz_unconstrained, a_actual in timestamp_tz_unconstrained);
22+
23+
procedure are_equal(a_msg in varchar2, a_expected in timestamp_ltz_unconstrained, a_actual in timestamp_ltz_unconstrained);
24+
procedure are_equal(a_expected in timestamp_ltz_unconstrained, a_actual in timestamp_ltz_unconstrained);
25+
2026
procedure are_equal(a_msg in varchar2, a_expected in anydata, a_actual in anydata);
2127
procedure are_equal(a_expected in anydata, a_actual in anydata);
2228

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
PROMPT Gives a success when comparing equal timestamp datatypes
2+
3+
@@ut_assert/common/ut_assert.are_equal.scalar.common.sql 'timestamp(9) with local time zone' 'to_Timestamp(''2016-09-06 22:36:11.123456789'',''yyyy-mm-dd hh24:mi:ss.ff'')' 'to_Timestamp(''2016-09-06 22:36:11.123456789'',''yyyy-mm-dd hh24:mi:ss.ff'')' 'ut_utils.tr_success'
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
PROMPT Gives a success when comparing equal timestamp datatypes
2+
3+
@@ut_assert/common/ut_assert.are_equal.scalar.common.sql 'timestamp(9) with time zone' 'to_Timestamp(''2016-09-06 22:36:11.123456789'',''yyyy-mm-dd hh24:mi:ss.ff'')' 'to_Timestamp(''2016-09-06 22:36:11.123456789'',''yyyy-mm-dd hh24:mi:ss.ff'')' 'ut_utils.tr_success'

0 commit comments

Comments
 (0)