Skip to content

Commit a7e2b61

Browse files
committed
use strcmp to do basic test instead of fmax
Since fmax may be in the math library. Specifically this test didn't work on Straberry Perl because fmax could not be found. strcmp should be safer.
1 parent 7701be2 commit a7e2b61

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

t/basic.t

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
use strict;
22
use warnings;
3-
use Test::More tests => 1;
3+
use Test::More tests => 2;
44

55
use parent qw(NativeCall);
66

7-
sub fmax :Args(double, double) :Native :Returns(double) {}
8-
is fmax(2.0, 3.0), 3.0;
7+
sub strcmp :Args(string,string) :Native :Returns(int) {}
8+
is strcmp("abc","abc"), 0;
9+
isnt strcmp("abc","def"), 0;

0 commit comments

Comments
 (0)