summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAlan Somers <asomers@gmail.com>2017-07-04 10:36:24 -0600
committerGitHub <noreply@github.com>2017-07-04 10:36:24 -0600
commit9e51647095af4612870c0e4582b739c8147784dc (patch)
tree15ea8a126502b4a70ef08a28638d3fed1ec91b47 /test
parente12ff7725e6911ad3ed2112bbc21a21643ee40da (diff)
parentb62ab099c8aa3ae59a9298fee342cd316f14a8b1 (diff)
downloadnix-9e51647095af4612870c0e4582b739c8147784dc.zip
Merge pull request #629 from Kixunil/newtypes
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);
}
}