summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMartin Habovštiak <martin.habovstiak@gmail.com>2017-06-24 10:05:03 +0200
committerMartin Habovštiak <martin.habovstiak@gmail.com>2017-07-02 08:09:25 +0200
commitb62ab099c8aa3ae59a9298fee342cd316f14a8b1 (patch)
tree42f0b59426ef6c368b8c1a9f19dce51e0353ea0a /test
parent274b09eee1cdac51ceea9238d2e584babae48720 (diff)
downloadnix-b62ab099c8aa3ae59a9298fee342cd316f14a8b1.zip
Newtypes for uid_t, gid_t and pid_t.
Diffstat (limited to 'test')
-rw-r--r--test/test_unistd.rs9
1 files changed, 5 insertions, 4 deletions
diff --git a/test/test_unistd.rs b/test/test_unistd.rs
index 76ab442a..6012de97 100644
--- a/test/test_unistd.rs
+++ b/test/test_unistd.rs
@@ -21,7 +21,8 @@ fn test_fork_and_waitpid() {
Ok(Child) => {} // ignore child here
Ok(Parent { child }) => {
// assert that child was created and pid > 0
- assert!(child > 0);
+ let child_raw: ::libc::pid_t = child.into();
+ assert!(child_raw > 0);
let wait_status = waitpid(child, None);
match wait_status {
// assert that waitpid returned correct status and the pid is the one of the child
@@ -78,8 +79,8 @@ fn test_mkstemp() {
#[test]
fn test_getpid() {
- let pid = getpid();
- let ppid = getppid();
+ let pid: ::libc::pid_t = getpid().into();
+ let ppid: ::libc::pid_t = getppid().into();
assert!(pid > 0);
assert!(ppid > 0);
}
@@ -90,7 +91,7 @@ mod linux_android {
#[test]
fn test_gettid() {
- let tid = gettid();
+ let tid: ::libc::pid_t = gettid().into();
assert!(tid > 0);
}
}