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

Skip to content

Commit 48505fb

Browse files
committed
Adding support for long type names in tests.
Resolves: #1235
1 parent 3516e08 commit 48505fb

3 files changed

Lines changed: 25 additions & 0 deletions

File tree

source/expectations/data_values/ut_cursor_details.tpb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,11 @@ create or replace type body ut_cursor_details as
9191
a_cursor_number in number
9292
) return self as result is
9393
l_columns_count pls_integer;
94+
$if dbms_db_version.version = 12 and dbms_db_version.release = 1 or dbms_db_version.version < 12 $then
9495
l_columns_desc dbms_sql.desc_tab3;
96+
$else
97+
l_columns_desc dbms_sql.desc_tab4;
98+
$end
9599
l_is_collection boolean;
96100
l_hierarchy_level integer := 1;
97101
begin

test/ut3_user/expectations/test_expectation_anydata.pkb

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1211,5 +1211,20 @@ Rows: [ 60 differences, showing first 20 ]
12111211
ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0);
12121212

12131213
end;
1214+
1215+
$if dbms_db_version.version = 12 and dbms_db_version.release >= 2 or dbms_db_version.version > 12 $then
1216+
procedure long_names_object_types is
1217+
pragma autonomous_transaction;
1218+
begin
1219+
execute immediate 'create or replace type tp_r_ug_sportsman_invitation_result is object ( code number(18) )';
1220+
execute immediate 'begin ut.expect(anydata.convertObject(tp_r_ug_sportsman_invitation_result(1))).to_equal(anydata.convertObject(tp_r_ug_sportsman_invitation_result(1))); end;';
1221+
execute immediate 'drop type tp_r_ug_sportsman_invitation_result';
1222+
exception
1223+
when others then
1224+
execute immediate 'drop type tp_r_ug_sportsman_invitation_result';
1225+
raise;
1226+
end;
1227+
$end
1228+
12141229
end;
12151230
/

test/ut3_user/expectations/test_expectation_anydata.pks

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,5 +233,11 @@ create or replace package test_expectation_anydata is
233233

234234
--%test ( Reports success when comparing complex nested objects )
235235
procedure complex_nested_object_success;
236+
237+
$if dbms_db_version.version = 12 and dbms_db_version.release >= 2 or dbms_db_version.version > 12 $then
238+
--%test ( Compares object types with long names - Issue #1235 )
239+
procedure long_names_object_types;
240+
$end
241+
236242
end;
237243
/

0 commit comments

Comments
 (0)