From 88c42f4056a870e21903d564aa01c25890265802 Mon Sep 17 00:00:00 2001 From: Sean Chittenden Date: Tue, 29 Mar 2016 19:51:37 -0700 Subject: [PATCH] Move lib's tests to lib_test This suite of tests is only testing the exported functions --- lib/math_test.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/math_test.go b/lib/math_test.go index 8015e5297e..fdb963ecde 100644 --- a/lib/math_test.go +++ b/lib/math_test.go @@ -1,14 +1,16 @@ -package lib +package lib_test import ( "testing" + + "github.com/hashicorp/consul/lib" ) func TestMathMaxInt(t *testing.T) { tests := [][3]int{{1, 2, 2}, {-1, 1, 1}, {2, 0, 2}} for i, _ := range tests { expected := tests[i][2] - actual := MaxInt(tests[i][0], tests[i][1]) + actual := lib.MaxInt(tests[i][0], tests[i][1]) if expected != actual { t.Fatalf("in iteration %d expected %d, got %d", i, expected, actual) } @@ -19,7 +21,7 @@ func TestMathMinInt(t *testing.T) { tests := [][3]int{{1, 2, 1}, {-1, 1, -1}, {2, 0, 0}} for i, _ := range tests { expected := tests[i][2] - actual := MinInt(tests[i][0], tests[i][1]) + actual := lib.MinInt(tests[i][0], tests[i][1]) if expected != actual { t.Fatalf("in iteration %d expected %d, got %d", i, expected, actual) }