@@ -114,31 +114,31 @@ create or replace package body test_to_be_within_pct is
114114
115115 procedure success_tests is
116116 begin
117- ut3_develop.ut.expect( 2.987654321 ).to_be_within_pct( 1 ).of_(3 );
117+ ut3_develop.ut.expect( 1 ).to_be_within_pct( 0.01 ).of_(1.0001 );
118118 expect_success;
119119
120- ut3_develop.ut.expect( 2.987654321 ).to_( ut3_develop.be_within_pct( 1 ).of_(3 ) );
120+ ut3_develop.ut.expect( 1.0001 ).to_( ut3_develop.be_within_pct( 0.01 ).of_(1 ) );
121121 expect_success;
122122
123- ut3_develop.ut.expect( 2.987654321 ).not_to_be_within_pct( 0.1 ).of_(3 );
123+ ut3_develop.ut.expect( 1.0002 ).not_to_be_within_pct( 0.01 ).of_(1 );
124124 expect_success;
125125
126- ut3_develop.ut.expect( 2.987654321 ).not_to( ut3_develop.be_within_pct( 0.1 ).of_(3 ) );
126+ ut3_develop.ut.expect( 1 ).not_to( ut3_develop.be_within_pct( 0.01 ).of_(1.0002 ) );
127127 expect_success;
128128
129- ut3_develop.ut.expect( 3.012345679 ).to_be_within_pct( 1 ).of_(3 );
129+ ut3_develop.ut.expect( 1.0001 ).to_be_within_pct( -0.01 ).of_(1 );
130130 expect_success;
131131
132- ut3_develop.ut.expect( 3.012345679 ).to_( ut3_develop.be_within_pct( 1 ).of_(3 ) );
132+ ut3_develop.ut.expect( 1 ).to_( ut3_develop.be_within_pct( -0.01 ).of_(1.0001 ) );
133133 expect_success;
134134
135- ut3_develop.ut.expect( 3.012345679 ).not_to_be_within_pct( 0.1 ).of_(3 );
135+ ut3_develop.ut.expect( 1.00000001 ).not_to_be_within_pct( 0 ).of_(1 );
136136 expect_success;
137137
138- ut3_develop.ut.expect( 3.012345679 ).not_to( ut3_develop.be_within_pct( 0.1 ).of_(3 ) );
138+ ut3_develop.ut.expect( 0 ).not_to( ut3_develop.be_within_pct( 0.01 ).of_(0.000001 ) );
139139 expect_success;
140140
141- ut3_develop.ut.expect( 0 ).to_be_within_pct( 10 ).of_( 0 );
141+ ut3_develop.ut.expect( 0 ).to_be_within_pct( 0 ).of_( 0 );
142142 expect_success;
143143
144144 ut3_develop.ut.expect( 0 ).to_be_within_pct( 100 ).of_( 1 );
@@ -150,31 +150,37 @@ create or replace package body test_to_be_within_pct is
150150
151151 procedure failed_tests is
152152 begin
153- ut3_develop.ut.expect( 2.987654321 ).to_be_within_pct ( 0.1 ).of_(3 );
153+ ut3_develop.ut.expect( 1 ).not_to_be_within_pct ( 0.01 ).of_(1.0001 );
154154 expect_failure;
155155
156- ut3_develop.ut.expect( 2.987654321 ).to_ ( ut3_develop.be_within_pct( 0.1 ).of_(3 ) );
156+ ut3_develop.ut.expect( 1.0001 ).not_to ( ut3_develop.be_within_pct( 0.01 ).of_(1 ) );
157157 expect_failure;
158158
159- ut3_develop.ut.expect( 2.987654321 ).not_to_be_within_pct( 1 ).of_(3 );
159+ ut3_develop.ut.expect( 1.0002 ).to_be_within_pct( 0.01 ).of_(1 );
160160 expect_failure;
161161
162- ut3_develop.ut.expect( 2.987654321 ).not_to ( ut3_develop.be_within_pct( 1 ).of_(3 ) );
162+ ut3_develop.ut.expect( 1 ).to_ ( ut3_develop.be_within_pct( 0.01 ).of_(1.0002 ) );
163163 expect_failure;
164164
165- ut3_develop.ut.expect( 3.012345679 ).to_be_within_pct( 0.1 ).of_(3 );
165+ ut3_develop.ut.expect( 1.0001 ).not_to_be_within_pct( -0.01 ).of_(1 );
166166 expect_failure;
167167
168- ut3_develop.ut.expect( 3.012345679 ).to_ ( ut3_develop.be_within_pct( 0.1 ).of_(3 ) );
168+ ut3_develop.ut.expect( 1 ).not_to ( ut3_develop.be_within_pct( -0.01 ).of_(1.0001 ) );
169169 expect_failure;
170170
171- ut3_develop.ut.expect( 3.012345679 ).not_to_be_within_pct( 1 ).of_(3 );
171+ ut3_develop.ut.expect( 1.00000001 ).to_be_within_pct( 0 ).of_(1 );
172172 expect_failure;
173173
174- ut3_develop.ut.expect( 3.012345679 ).not_to ( ut3_develop.be_within_pct( 1 ).of_(3 ) );
174+ ut3_develop.ut.expect( 0 ).to_ ( ut3_develop.be_within_pct( 0.01 ).of_(0.000001 ) );
175175 expect_failure;
176176
177- ut3_develop.ut.expect( 0.1 ).to_be_within_pct( 10 ).of_( 0 );
177+ ut3_develop.ut.expect( 0 ).not_to_be_within_pct( 0 ).of_( 0 );
178+ expect_failure;
179+
180+ ut3_develop.ut.expect( 0 ).not_to_be_within_pct( 100 ).of_( 1 );
181+ expect_failure;
182+
183+ ut3_develop.ut.expect( -1 ).not_to_be_within_pct( 200 ).of_( 1 );
178184 expect_failure;
179185 end;
180186
0 commit comments