summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/prometheus/procfs/bcache/get_test.go
diff options
context:
space:
mode:
authorHarrison Healey <harrisonmhealey@gmail.com>2018-01-16 12:03:31 -0500
committerGitHub <noreply@github.com>2018-01-16 12:03:31 -0500
commit2fa7c464f019f67c5c0494aaf5ac0f5ecc1ee7a7 (patch)
treee08ff912e1924c06939f314168c3362d6f1ec0de /vendor/github.com/prometheus/procfs/bcache/get_test.go
parentf5c8a71698d0a7a16c68be220e49fe64bfee7f5c (diff)
downloadchat-2fa7c464f019f67c5c0494aaf5ac0f5ecc1ee7a7.tar.gz
chat-2fa7c464f019f67c5c0494aaf5ac0f5ecc1ee7a7.tar.bz2
chat-2fa7c464f019f67c5c0494aaf5ac0f5ecc1ee7a7.zip
Updated dependencies and added avct/uasurfer (#8089)
* Updated dependencies and added avct/uasurfer * Added uasurfer to NOTICE.txt
Diffstat (limited to 'vendor/github.com/prometheus/procfs/bcache/get_test.go')
-rw-r--r--vendor/github.com/prometheus/procfs/bcache/get_test.go20
1 files changed, 10 insertions, 10 deletions
diff --git a/vendor/github.com/prometheus/procfs/bcache/get_test.go b/vendor/github.com/prometheus/procfs/bcache/get_test.go
index 38c3df573..1d41a5ad3 100644
--- a/vendor/github.com/prometheus/procfs/bcache/get_test.go
+++ b/vendor/github.com/prometheus/procfs/bcache/get_test.go
@@ -14,8 +14,8 @@
package bcache
import (
- "testing"
"math"
+ "testing"
)
func TestDehumanizeTests(t *testing.T) {
@@ -45,8 +45,8 @@ func TestDehumanizeTests(t *testing.T) {
out: 2024,
},
{
- in: []byte(""),
- out: 0,
+ in: []byte(""),
+ out: 0,
invalid: true,
},
}
@@ -59,7 +59,7 @@ func TestDehumanizeTests(t *testing.T) {
t.Errorf("unexpected error: %v", err)
}
if got != tst.out {
- t.Errorf("dehumanize: '%s', want %f, got %f", tst.in, tst.out, got)
+ t.Errorf("dehumanize: '%s', want %d, got %d", tst.in, tst.out, got)
}
}
}
@@ -84,7 +84,7 @@ func TestParsePseudoFloatTests(t *testing.T) {
}
for _, tst := range parsePseudoFloatTests {
got, err := parsePseudoFloat(tst.in)
- if err != nil || math.Abs(got - tst.out) > 0.0001 {
+ if err != nil || math.Abs(got-tst.out) > 0.0001 {
t.Errorf("parsePseudoFloat: %s, want %f, got %f", tst.in, tst.out, got)
}
}
@@ -92,23 +92,23 @@ func TestParsePseudoFloatTests(t *testing.T) {
func TestPriorityStats(t *testing.T) {
var want = PriorityStats{
- UnusedPercent: 99,
+ UnusedPercent: 99,
MetadataPercent: 5,
}
var (
- in string
+ in string
gotErr error
- got PriorityStats
+ got PriorityStats
)
in = "Metadata: 5%"
gotErr = parsePriorityStats(in, &got)
if gotErr != nil || got.MetadataPercent != want.MetadataPercent {
- t.Errorf("parsePriorityStats: '%s', want %f, got %f", in, want.MetadataPercent, got.MetadataPercent)
+ t.Errorf("parsePriorityStats: '%s', want %d, got %d", in, want.MetadataPercent, got.MetadataPercent)
}
in = "Unused: 99%"
gotErr = parsePriorityStats(in, &got)
if gotErr != nil || got.UnusedPercent != want.UnusedPercent {
- t.Errorf("parsePriorityStats: '%s', want %f, got %f", in, want.UnusedPercent, got.UnusedPercent)
+ t.Errorf("parsePriorityStats: '%s', want %d, got %d", in, want.UnusedPercent, got.UnusedPercent)
}
}