File: fpexc.t

package info (click to toggle)
liblinux-prctl-perl 1.5.0-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 368 kB
  • ctags: 768
  • sloc: perl: 166; ansic: 19; makefile: 2
file content (17 lines) | stat: -rw-r--r-- 528 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use strict;
no strict 'subs';
use warnings;

use Test::More tests => 20;
use POSIX qw(uname SIGHUP);
use Linux::Prctl qw(:constants :functions);

my $arch = uname;

SKIP: {
    skip "get_fpexc/set_fpexc are powerpc specific", 20 unless $arch eq 'powerpc';
    for(FP_EXC_SW_ENABLE, FP_EXC_DIV, FP_EXC_OVF, FP_EXC_UND, FP_EXC_RES, FP_EXC_INV, FP_EXC_DISABLED, FP_EXC_NONRECOV, FP_EXC_ASYNC, FP_EXC_PRECISE) {
        is(set_fpexc($_), 0, "Setting fpexc to $_");
        is(get_fpexc, $_, "Checking whether fpexc is $_");
    }
}