Skip to content

Commit

Permalink
[mem][darwin] Fix shirou#622 include Inactive memory in total calcula…
Browse files Browse the repository at this point in the history
…tion in TestVirtual_memory
  • Loading branch information
Lomanic committed Dec 25, 2018
1 parent 4104adf commit ccc1c10
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions mem/mem_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,14 @@ func TestVirtual_memory(t *testing.T) {

total := v.Used + v.Free + v.Buffers + v.Cached
totalStr := "used + free + buffers + cached"
if runtime.GOOS == "windows" {
switch runtime.GOOS {
case "windows":
total = v.Used + v.Available
totalStr = "used + available"
}
if runtime.GOOS == "freebsd" {
case "darwin":
total = v.Used + v.Free + v.Cached + v.Inactive
totalStr = "used + free + cached + inactive"
case "freebsd":
total = v.Used + v.Free + v.Cached + v.Inactive + v.Laundry
totalStr = "used + free + cached + inactive + laundry"
}
Expand Down

0 comments on commit ccc1c10

Please sign in to comment.