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

Skip to content

Added support for long type names in tests. #1238

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions source/expectations/data_values/ut_cursor_details.tpb
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,11 @@ create or replace type body ut_cursor_details as
a_cursor_number in number
) return self as result is
l_columns_count pls_integer;
$if dbms_db_version.version = 12 and dbms_db_version.release = 1 or dbms_db_version.version < 12 $then
l_columns_desc dbms_sql.desc_tab3;
$else
l_columns_desc dbms_sql.desc_tab4;
$end
l_is_collection boolean;
l_hierarchy_level integer := 1;
begin
Expand Down
27 changes: 27 additions & 0 deletions test/ut3_user/expectations/test_expectation_anydata.pkb
Original file line number Diff line number Diff line change
Expand Up @@ -1211,5 +1211,32 @@ Rows: [ 60 differences, showing first 20 ]
ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0);

end;

$if dbms_db_version.version = 12 and dbms_db_version.release >= 2 or dbms_db_version.version > 12 $then
procedure long_names_object_types is
pragma autonomous_transaction;
begin
execute immediate q'[create or replace 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
is object (
code number(18)
)]';
execute immediate q'[
begin
ut3_develop.ut.expect(anydata.convertObject(
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)
)).to_equal(anydata.convertObject(
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)
));
end;]';
ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0);
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';
exception
when others then
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';
raise;
end;
$end

end;
/
6 changes: 6 additions & 0 deletions test/ut3_user/expectations/test_expectation_anydata.pks
Original file line number Diff line number Diff line change
Expand Up @@ -233,5 +233,11 @@ create or replace package test_expectation_anydata is

--%test ( Reports success when comparing complex nested objects )
procedure complex_nested_object_success;

$if dbms_db_version.version = 12 and dbms_db_version.release >= 2 or dbms_db_version.version > 12 $then
--%test ( Compares object types with long names - Issue #1235 )
procedure long_names_object_types;
$end

end;
/