Skip to content

Commit e7b11fe

Browse files
jo-37mohawk2
authored andcommitted
Check overloaded functions behave like their CORE counterparts
1 parent 9bb6d2a commit e7b11fe

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

t/ufunc.t

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,4 +313,14 @@ subtest firstnonzeroover => sub {
313313
is_pdl $a->firstnonzeroover, pdl(3, 5), "firstnonzeroover";
314314
};
315315

316+
# Some (!) of these fail when exported:
317+
subtest core_functions => sub {
318+
ok approx(sin(1), &CORE::sin(1)), 'sin 1'; # !
319+
ok approx(cos(1), &CORE::cos(1)), 'cos 1'; # !
320+
ok approx(sqrt(2), &CORE::sqrt(2)), 'sqrt 2'; # !
321+
ok approx(exp(1), &CORE::exp(1)), 'exp 1';
322+
ok approx(log(2), &CORE::log(2)), 'log 2';
323+
ok approx(atan2(1, 1), &CORE::atan2(1, 1)), 'atan2 1, 1';
324+
};
325+
316326
done_testing;

0 commit comments

Comments
 (0)