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

Skip to content

Commit e71571a

Browse files
authored
Merge pull request #1238 from utPLSQL/bugfix/long_type_name_support
Added support for long type names in tests.
2 parents 9f3ac15 + 1eb52e1 commit e71571a

3 files changed

Lines changed: 37 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: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1211,5 +1211,32 @@ 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 q'[create or replace type
1220+
very_long_type_name_valid_for_oracle_12_so_utPLSQL_should_allow_it_definitely_well_still_not_reached_128_but_wait_we_did_it
1221+
is object (
1222+
code number(18)
1223+
)]';
1224+
execute immediate q'[
1225+
begin
1226+
ut3_develop.ut.expect(anydata.convertObject(
1227+
very_long_type_name_valid_for_oracle_12_so_utPLSQL_should_allow_it_definitely_well_still_not_reached_128_but_wait_we_did_it(1)
1228+
)).to_equal(anydata.convertObject(
1229+
very_long_type_name_valid_for_oracle_12_so_utPLSQL_should_allow_it_definitely_well_still_not_reached_128_but_wait_we_did_it(1)
1230+
));
1231+
end;]';
1232+
ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0);
1233+
execute immediate 'drop type very_long_type_name_valid_for_oracle_12_so_utPLSQL_should_allow_it_definitely_well_still_not_reached_128_but_wait_we_did_it';
1234+
exception
1235+
when others then
1236+
execute immediate 'drop type very_long_type_name_valid_for_oracle_12_so_utPLSQL_should_allow_it_definitely_well_still_not_reached_128_but_wait_we_did_it';
1237+
raise;
1238+
end;
1239+
$end
1240+
12141241
end;
12151242
/

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)