From 7345f498ca8626ab8d074339af22e1a7a82b4563 Mon Sep 17 00:00:00 2001 From: 23_KorobovFD <23_KorobovFD@iux.local> Date: Sun, 17 May 2026 22:22:49 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D1=82?= =?UTF-8?q?=D1=8C=20stringutil/stringutil=5Ftest.go?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- stringutil/stringutil_test.go | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 stringutil/stringutil_test.go diff --git a/stringutil/stringutil_test.go b/stringutil/stringutil_test.go new file mode 100644 index 0000000..4777fe0 --- /dev/null +++ b/stringutil/stringutil_test.go @@ -0,0 +1,20 @@ +package stringutil + +import "testing" + +func TestReverse(t *testing.T) { + result := Reverse("hello") + expected := "olleh" + if result != expected { + t.Errorf("Reverse('hello') = %s; want %s", result, expected) + } +} + +func TestIsPalindrome(t *testing.T) { + if !IsPalindrome("aba") { + t.Error("IsPalindrome('aba') = false; want true") + } + if IsPalindrome("ab") { + t.Error("IsPalindrome('ab') = true; want false") + } +} \ No newline at end of file