From 519725bb3c075ee2462c929f5997cb068e18466a Mon Sep 17 00:00:00 2001 From: Ondřej Surý Date: Mon, 26 Mar 2012 16:50:58 +0200 Subject: Imported Upstream version 2012.03.22 --- src/pkg/fmt/fmt_test.go | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/pkg/fmt/fmt_test.go') diff --git a/src/pkg/fmt/fmt_test.go b/src/pkg/fmt/fmt_test.go index 86db9bc67..758fc50d0 100644 --- a/src/pkg/fmt/fmt_test.go +++ b/src/pkg/fmt/fmt_test.go @@ -13,6 +13,7 @@ import ( "strings" "testing" "time" + "unicode" ) type ( @@ -828,3 +829,13 @@ func TestBadVerbRecursion(t *testing.T) { t.Error("fail with value") } } + +func TestIsSpace(t *testing.T) { + // This tests the internal isSpace function. + // IsSpace = isSpace is defined in export_test.go. + for i := rune(0); i <= unicode.MaxRune; i++ { + if IsSpace(i) != unicode.IsSpace(i) { + t.Errorf("isSpace(%U) = %v, want %v", i, IsSpace(i), unicode.IsSpace(i)) + } + } +} -- cgit v1.2.3