File tree Expand file tree Collapse file tree 1 file changed +21
-5
lines changed
dist/ExtUtils-ParseXS/lib Expand file tree Collapse file tree 1 file changed +21
-5
lines changed Original file line number Diff line number Diff line change @@ -395,11 +395,27 @@ Edit the Makefile.PL file so that the corresponding line looks like this:
395
395
Generate the Makefile and run make. Change the test number in Mytest.t to
396
396
"9" and add the following tests:
397
397
398
- $i = -1.5; &Mytest::round($i); is( $i, -2.0 );
399
- $i = -1.1; &Mytest::round($i); is( $i, -1.0 );
400
- $i = 0.0; &Mytest::round($i); is( $i, 0.0 );
401
- $i = 0.5; &Mytest::round($i); is( $i, 1.0 );
402
- $i = 1.2; &Mytest::round($i); is( $i, 1.0 );
398
+ my $i;
399
+
400
+ $i = -1.5
401
+ &Mytest::round($i)
402
+ is( $i, -2.0, 'Rounding -1.5 to -2.0' );
403
+
404
+ $i = -1.1
405
+ &Mytest::round($i)
406
+ is( $i, -1.0, 'Rounding -1.1 to -1.0' );
407
+
408
+ $i = 0.0
409
+ &Mytest::round($i)
410
+ is( $i, 0.0, 'Rounding 0.0 to 0.0' );
411
+
412
+ $i = 0.5
413
+ &Mytest::round($i)
414
+ is( $i, 1.0, 'Rounding 0.5 to 1.0' );
415
+
416
+ $i = 1.2
417
+ &Mytest::round($i)
418
+ is( $i, 1.0, 'Rounding 1.2 to 1.0' );
403
419
404
420
Running "C<make test>" should now print out that all nine tests are okay.
405
421
You can’t perform that action at this time.
0 commit comments