File: stat_test.go

package info (click to toggle)
golang-procfs 0%2Bgit20150616.c91d8ee-1~bpo8%2B1
  • links: PTS, VCS
  • area: main
  • in suites: jessie-backports
  • size: 208 kB
  • sloc: makefile: 18
file content (19 lines) | stat: -rw-r--r-- 308 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package procfs

import "testing"

func TestStat(t *testing.T) {
	fs, err := NewFS("fixtures")
	if err != nil {
		t.Fatal(err)
	}

	s, err := fs.NewStat()
	if err != nil {
		t.Fatal(err)
	}

	if want, got := int64(1418183276), s.BootTime; want != got {
		t.Errorf("want boot time %d, got %d", want, got)
	}
}