@@ -78,19 +78,19 @@ create or replace type body equal as
7878 init(ut_data_value_varchar2(a_expected), a_nulls_are_equal);
7979 return;
8080 end;
81-
81+
8282 constructor function equal(self in out nocopy equal, a_expected yminterval_unconstrained, a_nulls_are_equal boolean := null) return self as result is
8383 begin
8484 init(ut_data_value_yminterval(a_expected), a_nulls_are_equal);
85- return;
85+ return;
8686 end;
87-
87+
8888 constructor function equal(self in out nocopy equal, a_expected dsinterval_unconstrained, a_nulls_are_equal boolean := null) return self as result is
8989 begin
9090 init(ut_data_value_dsinterval(a_expected), a_nulls_are_equal);
91- return;
91+ return;
9292 end;
93-
93+
9494 overriding member function run_matcher(self in out nocopy equal, a_actual ut_data_value) return boolean is
9595 l_result boolean;
9696 begin
@@ -100,7 +100,15 @@ create or replace type body equal as
100100 l_actual ut_data_value_anydata := treat(a_actual as ut_data_value_anydata);
101101 begin
102102 ut_assert_processor.set_xml_nls_params();
103- l_result := equal_with_nulls((xmltype(l_expected.datavalue).getclobval() = xmltype(l_actual.datavalue).getclobval()), a_actual);
103+ --XMLTYPE doesn't like the null being passed from anydata or object types, so we need to check if anydata holds null Object/collection
104+ --This is why equal_with_nulls cannot be used here
105+ if ut_utils.int_to_boolean( nulls_are_equal_flag ) and self.expected.is_null() and a_actual.is_null() then
106+ l_result := true;
107+ elsif self.expected.is_null() or a_actual.is_null() then
108+ l_result := false;
109+ else
110+ l_result := xmltype(l_expected.datavalue).getclobval() = xmltype(l_actual.datavalue).getclobval();
111+ end if;
104112 ut_assert_processor.reset_nls_params();
105113 end;
106114 elsif self.expected is of (ut_data_value_blob) and a_actual is of (ut_data_value_blob) then
0 commit comments