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

Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
address #160
  • Loading branch information
Pazus committed Jan 16, 2017
commit cb190e17e0f6ccfc778bf460ba75cf57ce9a8d67
6 changes: 3 additions & 3 deletions source/core/types/ut_assert_result.tpb
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@ create or replace type body ut_assert_result is

if self.result != ut_utils.tr_success then
if self.actual_value_string is not null or self.actual_type is not null then
l_actual_val_msg := ' expected (actual value): ';
l_actual_val_msg := ' expected this: ';
l_actual_val := self.actual_value_string || '(' || self.actual_type || ')';
end if;

l_expected_msg := ' '||self.matcher_name || self.additional_info;
l_expected_msg := ' ' || self.matcher_name || self.additional_info;
if self.expected_value_string is not null or self.expected_type is not null then
l_expected_msg := l_expected_msg || ' (expected value): ';
l_expected_msg := l_expected_msg || ' this: ';
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd remove ' this: ' from l_expected_msg, because we get report in format:

	expected this: '<DEMO_DEPARTMENT>
			 <DEPT_NAME>HR</DEPT_NAME>
		       </DEMO_DEPARTMENT>
		       '(ut3.demo_department)
	to equal this: '<DEMO_DEPARTMENT>
			 <DEPT_NAME>Sales</DEPT_NAME>
		       </DEMO_DEPARTMENT>
		       '(ut3.demo_department)

I think it would be better to have something like:

	expected this: '<DEMO_DEPARTMENT>
			 <DEPT_NAME>HR</DEPT_NAME>
		       </DEMO_DEPARTMENT>
		       '(ut3.demo_department)
	to equal :     '<DEMO_DEPARTMENT>
			 <DEPT_NAME>Sales</DEPT_NAME>
		       </DEMO_DEPARTMENT>
		       '(ut3.demo_department)

l_expected_val := self.expected_value_string||'('||self.expected_type||')';
if length(l_expected_msg) > length(l_actual_val_msg) then
l_actual_val_msg := rpad(l_actual_val_msg , length(l_expected_msg));
Expand Down
2 changes: 1 addition & 1 deletion source/expectations/matchers/ut_be_between.tpb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ create or replace type body ut_be_between is

member procedure init(self in out nocopy ut_be_between, a_lower_bound ut_data_value, a_upper_bound ut_data_value) is
begin
self.name := lower($$plsql_unit);
self.name := 'be between';
self.lower_bound := a_lower_bound;
self.upper_bound := a_upper_bound;
self.additional_info := 'between ' || a_lower_bound.to_string || ' and ' || a_upper_bound.to_string;
Expand Down
2 changes: 1 addition & 1 deletion source/expectations/matchers/ut_be_false.tpb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ create or replace type body ut_be_false as

constructor function ut_be_false(self in out nocopy ut_be_false) return self as result is
begin
self.name := lower($$plsql_unit);
self.name := 'be false';
return;
end;

Expand Down
2 changes: 1 addition & 1 deletion source/expectations/matchers/ut_be_greater_or_equal.tpb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ create or replace type body ut_be_greater_or_equal AS

member procedure init(self in out nocopy ut_be_greater_or_equal, a_expected ut_data_value) is
begin
self.name := lower($$plsql_unit);
self.name := 'be greater or equal';
self.expected := a_expected;
end;

Expand Down
2 changes: 1 addition & 1 deletion source/expectations/matchers/ut_be_greater_than.tpb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ create or replace type body ut_be_greater_than AS

member procedure init(self in out nocopy ut_be_greater_than, a_expected ut_data_value) is
begin
self.name := lower($$plsql_unit);
self.name := 'be greater than';
self.expected := a_expected;
end;

Expand Down
2 changes: 1 addition & 1 deletion source/expectations/matchers/ut_be_less_or_equal.tpb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ create or replace type body ut_be_less_or_equal AS

member procedure init(self in out nocopy ut_be_less_or_equal, a_expected ut_data_value) is
begin
self.name := lower($$plsql_unit);
self.name := 'be less or equal';
self.expected := a_expected;
end;

Expand Down
2 changes: 1 addition & 1 deletion source/expectations/matchers/ut_be_less_than.tpb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ create or replace type body ut_be_less_than as

member procedure init(self in out nocopy ut_be_less_than, a_expected ut_data_value) is
begin
self.name := lower($$plsql_unit);
self.name := 'be less than';
self.expected := a_expected;
end;

Expand Down
2 changes: 1 addition & 1 deletion source/expectations/matchers/ut_be_like.tpb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ create or replace type body ut_be_like as
self.additional_info := self.additional_info ||' escape '''||a_escape_char||'''';
end if;
end if;
self.name := lower($$plsql_unit);
self.name := 'be like';
self.mask := a_mask;
self.escape_char := a_escape_char;
return;
Expand Down
2 changes: 1 addition & 1 deletion source/expectations/matchers/ut_be_not_null.tpb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ create or replace type body ut_be_not_null as

constructor function ut_be_not_null(self in out nocopy ut_be_not_null) return self as result is
begin
self.name := lower($$plsql_unit);
self.name := 'be not null';
return;
end;

Expand Down
2 changes: 1 addition & 1 deletion source/expectations/matchers/ut_be_null.tpb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ create or replace type body ut_be_null as

constructor function ut_be_null(self in out nocopy ut_be_null) return self as result is
begin
self.name := lower($$plsql_unit);
self.name := 'be null';
return;
end;

Expand Down
2 changes: 1 addition & 1 deletion source/expectations/matchers/ut_be_true.tpb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ create or replace type body ut_be_true as

constructor function ut_be_true(self in out nocopy ut_be_true) return self as result is
begin
self.name := lower($$plsql_unit);
self.name := 'be true';
return;
end;

Expand Down
2 changes: 1 addition & 1 deletion source/expectations/matchers/ut_equal.tpb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ create or replace type body ut_equal as
member procedure init(self in out nocopy ut_equal, a_expected ut_data_value, a_nulls_are_equal boolean) is
begin
self.nulls_are_equal_flag := ut_utils.boolean_to_int( coalesce(a_nulls_are_equal, ut_assert_processor.nulls_are_equal()) );
self.name := lower($$plsql_unit);
self.name := 'equal';
self.expected := a_expected;
end;

Expand Down
2 changes: 1 addition & 1 deletion source/expectations/matchers/ut_match.tpb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ create or replace type body ut_match as
self.additional_info := self.additional_info ||', modifiers '''||a_modifiers||'''';
end if;
end if;
self.name := lower($$plsql_unit);
self.name := 'match';
self.pattern := a_pattern;
self.modifiers := a_modifiers;
return;
Expand Down