From 3d74fcfa6a4288a1a35f0d62afda0e2ed31042b5 Mon Sep 17 00:00:00 2001 From: Tobias Guggenmos Date: Tue, 25 Feb 2020 13:57:30 +0100 Subject: [PATCH] Bartek's suggestions Signed-off-by: Tobias Guggenmos --- promql/functions_test.go | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/promql/functions_test.go b/promql/functions_test.go index 3ce30bfd6..fd2750263 100644 --- a/promql/functions_test.go +++ b/promql/functions_test.go @@ -60,18 +60,14 @@ func TestDeriv(t *testing.T) { } func TestFunctionList(t *testing.T) { - // Test that Functions and parser.Functions list the same functions + // Test that Functions and parser.Functions list the same functions. for i := range FunctionCalls { _, ok := parser.Functions[i] - if !ok { - panic(fmt.Sprintf("function %s exists in promql package, but not in parser package", i)) - } + testutil.Assert(t, ok, fmt.Sprintf("function %s exists in promql package, but not in parser package", i)) } for i := range parser.Functions { _, ok := FunctionCalls[i] - if !ok { - panic(fmt.Sprintf("function %s exists in parser package, but not in promql package", i)) - } + testutil.Assert(t, ok, (fmt.Sprintf("function %s exists in parser package, but not in promql package", i))) } }