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

Skip to content

Commit 5ab8cb9

Browse files
committed
fix/ORA-00907: adding simple testcase
1 parent 3f97b9e commit 5ab8cb9

2 files changed

Lines changed: 25 additions & 0 deletions

File tree

test/ut3_user/expectations/test_expectations_cursor.pkb

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,28 @@ create or replace package body test_expectations_cursor is
8282
ut3.ut.reset_nls;
8383
end;
8484

85+
procedure success_on_same_data_with_float
86+
as
87+
l_expected sys_refcursor;
88+
l_actual sys_refcursor;
89+
begin
90+
-- Arrange
91+
ut3.ut.set_nls;
92+
open l_expected for
93+
select cast(3.14 as binary_double) as pi_double,
94+
cast(3.14 as binary_float) as pi_float
95+
from dual;
96+
open l_actual for
97+
select cast(3.14 as binary_double) as pi_double,
98+
cast(3.14 as binary_float) as pi_float
99+
from dual;
100+
--Act
101+
ut3.ut.expect( l_actual ).to_equal( l_expected );
102+
--Assert
103+
ut.expect(expectations.failed_expectations_data()).to_be_empty();
104+
ut3.ut.reset_nls;
105+
end;
106+
85107
procedure success_on_empty
86108
as
87109
l_expected sys_refcursor;

test/ut3_user/expectations/test_expectations_cursor.pks

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ create or replace package test_expectations_cursor is
1717
--%test(Gives success for identical data)
1818
procedure success_on_same_data;
1919

20+
--%test(Gives success for identical data with floats)
21+
procedure success_on_same_data_with_float;
22+
2023
--%test(Gives success when both cursors are empty)
2124
procedure success_on_empty;
2225

0 commit comments

Comments
 (0)