From f3597d0db6034822d65b89f57b5bdb57c48130fa Mon Sep 17 00:00:00 2001 From: Alexander Sheiko Date: Thu, 22 Apr 2021 20:35:33 +0300 Subject: [PATCH] Fix error msg --- trends_test.go | 2 +- tweets_test.go | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/trends_test.go b/trends_test.go index ddab009..1c3564b 100644 --- a/trends_test.go +++ b/trends_test.go @@ -16,7 +16,7 @@ func TestGetTrends(t *testing.T) { for _, trend := range trends { if trend == "" { - t.Error("Expected trend is not empty") + t.Error("Expected trend is empty") } } } diff --git a/tweets_test.go b/tweets_test.go index a6d687b..4bd1e8a 100644 --- a/tweets_test.go +++ b/tweets_test.go @@ -19,7 +19,7 @@ func TestGetTweets(t *testing.T) { } else { count++ if tweet.ID == "" { - t.Error("Expected tweet ID is not empty") + t.Error("Expected tweet ID is empty") } else { if dupcheck[tweet.ID] { t.Errorf("Detect duplicated tweet ID: %s", tweet.ID) @@ -28,32 +28,32 @@ func TestGetTweets(t *testing.T) { } } if tweet.UserID == "" { - t.Error("Expected tweet UserID is not empty") + t.Error("Expected tweet UserID is empty") } if tweet.Username == "" { - t.Error("Expected tweet Username is not empty") + t.Error("Expected tweet Username is empty") } if tweet.PermanentURL == "" { - t.Error("Expected tweet PermanentURL is not empty") + t.Error("Expected tweet PermanentURL is empty") } if tweet.Text == "" { - t.Error("Expected tweet Text is not empty") + t.Error("Expected tweet Text is empty") } if tweet.TimeParsed.IsZero() { - t.Error("Expected tweet TimeParsed is not zero") + t.Error("Expected tweet TimeParsed is zero") } if tweet.Timestamp == 0 { t.Error("Expected tweet Timestamp is greater than zero") } for _, video := range tweet.Videos { if video.ID == "" { - t.Error("Expected tweet video ID is not empty") + t.Error("Expected tweet video ID is empty") } if video.Preview == "" { - t.Error("Expected tweet video Preview is not empty") + t.Error("Expected tweet video Preview is empty") } if video.URL == "" { - t.Error("Expected tweet video URL is not empty") + t.Error("Expected tweet video URL is empty") } } }