fix test pid to use os.Getpid()

This commit is contained in:
Shirou WAKAYAMA 2014-04-25 16:34:32 +09:00
parent 400054f2f0
commit 887f7514a4
1 changed files with 2 additions and 1 deletions

View File

@ -5,6 +5,7 @@ import (
"fmt" "fmt"
"runtime" "runtime"
"testing" "testing"
"os"
) )
func Test_Pids(t *testing.T) { func Test_Pids(t *testing.T) {
@ -49,7 +50,7 @@ func Test_NewProcess(t *testing.T) {
} }
func Test_Process_memory_maps(t *testing.T) { func Test_Process_memory_maps(t *testing.T) {
check_pid := 19472 check_pid := os.Getpid()
if runtime.GOOS == "windows" { if runtime.GOOS == "windows" {
check_pid = 0 check_pid = 0
} }