Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(2)

Delta Between Two Patch Sets: src/pkg/syscall/syscall_bsd_test.go

Issue 84830043: code review 84830043: syscall: fix Getfsstat() for BSD
Left Patch Set: diff -r 88b3b2fa4dde https://code.google.com/p/go Created 9 years, 11 months ago
Right Patch Set: diff -r 519230b4d06a https://code.google.com/p/go Created 9 years, 11 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Right: Side by side diff | Download
« no previous file with change/comment | « no previous file | src/pkg/syscall/syscall_darwin.go » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
(no file at all)
1 // Copyright 2014 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
4
5 // +build darwin dragonfly freebsd openbsd
6
7 package syscall_test
8
9 import (
10 "syscall"
11 "testing"
12 )
13
14 const MNT_WAIT = 1
15
16 func TestGetfsstat(t *testing.T) {
17 n, err := syscall.Getfsstat(nil, MNT_WAIT)
18 if err != nil {
19 t.Fatal(err)
20 }
21
22 data := make([]syscall.Statfs_t, n)
23 n, err = syscall.Getfsstat(data, MNT_WAIT)
24 if err != nil {
25 t.Fatal(err)
26 }
27
28 empty := syscall.Statfs_t{}
29 for _, stat := range data {
30 if stat == empty {
31 t.Fatal("an empty Statfs_t struct was returned")
32 }
33 }
34 }
LEFTRIGHT

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b