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

Skip to content

Commit 7cf7725

Browse files
authored
Merge branch 'develop' into feature/md5_on_release
2 parents 60914a1 + aa134be commit 7cf7725

11 files changed

Lines changed: 66 additions & 11 deletions

source/expectations/matchers/ut_be_greater_or_equal.tps

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
create or replace type ut_be_greater_or_equal under ut_matcher(
1+
create or replace type ut_be_greater_or_equal under ut_comparison_matcher(
22
/*
33
utPLSQL - Version X.X.X.X
44
Copyright 2016 - 2017 utPLSQL Project
@@ -15,7 +15,6 @@ create or replace type ut_be_greater_or_equal under ut_matcher(
1515
See the License for the specific language governing permissions and
1616
limitations under the License.
1717
*/
18-
expected ut_data_value,
1918
member procedure init(self in out nocopy ut_be_greater_or_equal, a_expected ut_data_value),
2019
constructor function ut_be_greater_or_equal(self in out nocopy ut_be_greater_or_equal, a_expected date) return self as result,
2120
constructor function ut_be_greater_or_equal(self in out nocopy ut_be_greater_or_equal, a_expected number) return self as result,

source/expectations/matchers/ut_be_greater_than.tps

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
create or replace type ut_be_greater_than under ut_matcher(
1+
create or replace type ut_be_greater_than under ut_comparison_matcher(
22
/*
33
utPLSQL - Version X.X.X.X
44
Copyright 2016 - 2017 utPLSQL Project
@@ -15,7 +15,6 @@ create or replace type ut_be_greater_than under ut_matcher(
1515
See the License for the specific language governing permissions and
1616
limitations under the License.
1717
*/
18-
expected ut_data_value,
1918
member procedure init(self in out nocopy ut_be_greater_than, a_expected ut_data_value),
2019
constructor function ut_be_greater_than(self in out nocopy ut_be_greater_than, a_expected date) return self as result,
2120
constructor function ut_be_greater_than(self in out nocopy ut_be_greater_than, a_expected number) return self as result,

source/expectations/matchers/ut_be_less_or_equal.tps

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
create or replace type ut_be_less_or_equal under ut_matcher(
1+
create or replace type ut_be_less_or_equal under ut_comparison_matcher(
22
/*
33
utPLSQL - Version X.X.X.X
44
Copyright 2016 - 2017 utPLSQL Project
@@ -15,7 +15,6 @@ create or replace type ut_be_less_or_equal under ut_matcher(
1515
See the License for the specific language governing permissions and
1616
limitations under the License.
1717
*/
18-
expected ut_data_value,
1918
member procedure init(self in out nocopy ut_be_less_or_equal, a_expected ut_data_value),
2019
constructor function ut_be_less_or_equal(self in out nocopy ut_be_less_or_equal, a_expected date) return self as result,
2120
constructor function ut_be_less_or_equal(self in out nocopy ut_be_less_or_equal, a_expected number) return self as result,

source/expectations/matchers/ut_be_less_than.tps

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
create or replace type ut_be_less_than under ut_matcher(
1+
create or replace type ut_be_less_than under ut_comparison_matcher(
22
/*
33
utPLSQL - Version X.X.X.X
44
Copyright 2016 - 2017 utPLSQL Project
@@ -15,7 +15,6 @@ create or replace type ut_be_less_than under ut_matcher(
1515
See the License for the specific language governing permissions and
1616
limitations under the License.
1717
*/
18-
expected ut_data_value,
1918
member procedure init(self in out nocopy ut_be_less_than, a_expected ut_data_value),
2019
constructor function ut_be_less_than(self in out nocopy ut_be_less_than, a_expected date) return self as result,
2120
constructor function ut_be_less_than(self in out nocopy ut_be_less_than, a_expected number) return self as result,
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
create or replace type body ut_comparison_matcher as
2+
/*
3+
utPLSQL - Version X.X.X.X
4+
Copyright 2016 - 2017 utPLSQL Project
5+
6+
Licensed under the Apache License, Version 2.0 (the "License"):
7+
you may not use this file except in compliance with the License.
8+
You may obtain a copy of the License at
9+
10+
http://www.apache.org/licenses/LICENSE-2.0
11+
12+
Unless required by applicable law or agreed to in writing, software
13+
distributed under the License is distributed on an "AS IS" BASIS,
14+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
See the License for the specific language governing permissions and
16+
limitations under the License.
17+
*/
18+
19+
overriding member function error_message(a_actual ut_data_value) return varchar2 is
20+
l_result varchar2(32767);
21+
begin
22+
if ut_utils.int_to_boolean(self.is_errored) then
23+
l_result := 'Actual ('||a_actual.data_type||') cannot be compared to Expected ('||expected.data_type||') using matcher '''||self.name()||'''.';
24+
end if;
25+
return l_result;
26+
end;
27+
28+
end;
29+
/
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
create or replace type ut_comparison_matcher under ut_matcher(
2+
/*
3+
utPLSQL - Version X.X.X.X
4+
Copyright 2016 - 2017 utPLSQL Project
5+
6+
Licensed under the Apache License, Version 2.0 (the "License"):
7+
you may not use this file except in compliance with the License.
8+
You may obtain a copy of the License at
9+
10+
http://www.apache.org/licenses/LICENSE-2.0
11+
12+
Unless required by applicable law or agreed to in writing, software
13+
distributed under the License is distributed on an "AS IS" BASIS,
14+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
See the License for the specific language governing permissions and
16+
limitations under the License.
17+
*/
18+
19+
expected ut_data_value,
20+
overriding member function error_message(a_actual ut_data_value) return varchar2
21+
) not final not instantiable
22+
/

source/expectations/matchers/ut_equal.tps

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
create or replace type ut_equal under ut_matcher(
1+
create or replace type ut_equal under ut_comparison_matcher(
22
/*
33
utPLSQL - Version X.X.X.X
44
Copyright 2016 - 2017 utPLSQL Project
@@ -15,7 +15,6 @@ create or replace type ut_equal under ut_matcher(
1515
See the License for the specific language governing permissions and
1616
limitations under the License.
1717
*/
18-
expected ut_data_value,
1918
nulls_are_equal_flag number(1,0),
2019
member procedure init(self in out nocopy ut_equal, a_expected ut_data_value, a_nulls_are_equal boolean),
2120
member function equal_with_nulls( self in ut_equal, a_assert_result boolean, a_actual ut_data_value) return boolean,

source/install.sql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ whenever sqlerror exit failure rollback
139139
@@expectations/data_values/ut_data_value_varchar2.tps
140140
@@expectations/data_values/ut_data_value_yminterval.tps
141141
@@expectations/matchers/ut_matcher.tps
142+
@@expectations/matchers/ut_comparison_matcher.tps
142143
@@expectations/matchers/ut_be_false.tps
143144
@@expectations/matchers/ut_be_greater_or_equal.tps
144145
@@expectations/matchers/ut_be_greater_than.tps
@@ -183,6 +184,7 @@ whenever sqlerror exit failure rollback
183184
@@expectations/data_values/ut_data_value_varchar2.tpb
184185
@@expectations/data_values/ut_data_value_yminterval.tpb
185186
@@expectations/matchers/ut_matcher.tpb
187+
@@expectations/matchers/ut_comparison_matcher.tpb
186188
@@expectations/matchers/ut_be_false.tpb
187189
@@expectations/matchers/ut_be_greater_or_equal.tpb
188190
@@expectations/matchers/ut_be_greater_than.tpb

source/uninstall.sql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,8 @@ drop type ut_be_less_than;
133133

134134
drop type ut_be_false;
135135

136+
drop type ut_comparison_matcher;
137+
136138
drop type ut_matcher;
137139

138140
drop type ut_data_value_yminterval;

tests/RunAll.sql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -463,6 +463,8 @@ begin
463463
'source/expectations/matchers/ut_match.tps',
464464
'source/expectations/matchers/ut_matcher.tpb',
465465
'source/expectations/matchers/ut_matcher.tps',
466+
'source/expectations/matchers/ut_comparison_matcher.tpb',
467+
'source/expectations/matchers/ut_comparison_matcher.tps',
466468
'source/reporters/ut_ansiconsole_helper.pkb',
467469
'source/reporters/ut_ansiconsole_helper.pks',
468470
'source/reporters/ut_coverage_html_reporter.tpb',

0 commit comments

Comments
 (0)