From f162e15eac630e616c6b0fc123f1e541664e5c12 Mon Sep 17 00:00:00 2001 From: lufia Date: Thu, 22 Feb 2024 10:39:04 +0900 Subject: [PATCH] fix wrong function name and expected values --- lib/mysql_test.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/mysql_test.go b/lib/mysql_test.go index b4b48af..e96781f 100644 --- a/lib/mysql_test.go +++ b/lib/mysql_test.go @@ -12,8 +12,8 @@ func TestGraphDefinition_DisableInnoDB(t *testing.T) { mysql.DisableInnoDB = true graphdef := mysql.GraphDefinition() - if len(graphdef) != 8 { - t.Errorf("GetTempfilename: %d should be 7", len(graphdef)) + if n := 8; len(graphdef) != n { + t.Errorf("GraphDefinition: %d should be %d", len(graphdef), n) } } @@ -21,8 +21,8 @@ func TestGraphDefinition(t *testing.T) { var mysql MySQLPlugin graphdef := mysql.GraphDefinition() - if len(graphdef) != 29 { - t.Errorf("GetTempfilename: %d should be 28", len(graphdef)) + if n := 29; len(graphdef) != n { + t.Errorf("GraphDefinition: %d should be %d", len(graphdef), n) } } @@ -32,8 +32,8 @@ func TestGraphDefinition_DisableInnoDB_EnableExtended(t *testing.T) { mysql.DisableInnoDB = true mysql.EnableExtended = true graphdef := mysql.GraphDefinition() - if len(graphdef) != 18 { - t.Errorf("GetTempfilename: %d should be 18", len(graphdef)) + if n := 18; len(graphdef) != n { + t.Errorf("GraphDefinition: %d should be %d", len(graphdef), n) } } @@ -42,8 +42,8 @@ func TestGraphDefinition_EnableExtended(t *testing.T) { mysql.EnableExtended = true graphdef := mysql.GraphDefinition() - if len(graphdef) != 39 { - t.Errorf("GetTempfilename: %d should be 39", len(graphdef)) + if n := 39; len(graphdef) != n { + t.Errorf("GraphDefinition: %d should be %d", len(graphdef), n) } }