diff --git a/source/expectations/data_values/ut_compound_data_helper.pkb b/source/expectations/data_values/ut_compound_data_helper.pkb index 5ac8a4546..d8367e8c4 100644 --- a/source/expectations/data_values/ut_compound_data_helper.pkb +++ b/source/expectations/data_values/ut_compound_data_helper.pkb @@ -231,7 +231,8 @@ create or replace package body ut_compound_data_helper is elsif a_data_info.is_sql_diffable = 1 and a_data_info.column_type in ('DATE','TIMESTAMP','TIMESTAMP WITH TIME ZONE', 'TIMESTAMP WITH LOCAL TIME ZONE') then l_col_type := 'VARCHAR2(50)'; - elsif a_data_info.is_sql_diffable = 1 and a_data_info.column_type in ('INTERVAL DAY TO SECOND','INTERVAL YEAR TO MONTH') then + elsif a_data_info.is_sql_diffable = 1 and a_data_info.column_type in ('INTERVAL DAY TO SECOND', + 'INTERVAL YEAR TO MONTH', 'BINARY_FLOAT', 'BINARY_DOUBLE') then l_col_type := a_data_info.column_type; else l_col_type := a_data_info.column_type diff --git a/test/ut3_user/expectations/test_expectations_cursor.pkb b/test/ut3_user/expectations/test_expectations_cursor.pkb index a83fb0ae9..f8bb92878 100644 --- a/test/ut3_user/expectations/test_expectations_cursor.pkb +++ b/test/ut3_user/expectations/test_expectations_cursor.pkb @@ -82,6 +82,28 @@ create or replace package body test_expectations_cursor is ut3.ut.reset_nls; end; + procedure success_on_same_data_float + as + l_expected sys_refcursor; + l_actual sys_refcursor; + begin + -- Arrange + ut3.ut.set_nls; + open l_expected for + select cast(3.14 as binary_double) as pi_double, + cast(3.14 as binary_float) as pi_float + from dual; + open l_actual for + select cast(3.14 as binary_double) as pi_double, + cast(3.14 as binary_float) as pi_float + from dual; + --Act + ut3.ut.expect( l_actual ).to_equal( l_expected ); + --Assert + ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); + ut3.ut.reset_nls; + end; + procedure success_on_empty as l_expected sys_refcursor; diff --git a/test/ut3_user/expectations/test_expectations_cursor.pks b/test/ut3_user/expectations/test_expectations_cursor.pks index ae37b37d3..d0b9a6e54 100644 --- a/test/ut3_user/expectations/test_expectations_cursor.pks +++ b/test/ut3_user/expectations/test_expectations_cursor.pks @@ -17,6 +17,9 @@ create or replace package test_expectations_cursor is --%test(Gives success for identical data) procedure success_on_same_data; + --%test(Gives success for identical data with floats) + procedure success_on_same_data_float; + --%test(Gives success when both cursors are empty) procedure success_on_empty;