diff options
| author | Ondřej Surý <ondrej@sury.org> | 2011-05-23 09:45:29 +0200 |
|---|---|---|
| committer | Ondřej Surý <ondrej@sury.org> | 2011-05-23 09:45:29 +0200 |
| commit | 63d29fefab5290dc96e0a03ff70603aefa995887 (patch) | |
| tree | 95da0105686f9aba568a72e7a8ebd580a4fda20e /src/pkg/strconv | |
| parent | ad811fbb8897a9a3063274e927133915941f1dca (diff) | |
| download | golang-63d29fefab5290dc96e0a03ff70603aefa995887.tar.gz | |
Imported Upstream version 2011.05.22upstream-weekly/2011.05.22
Diffstat (limited to 'src/pkg/strconv')
| -rw-r--r-- | src/pkg/strconv/atob.go | 4 | ||||
| -rw-r--r-- | src/pkg/strconv/atob_test.go | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/pkg/strconv/atob.go b/src/pkg/strconv/atob.go index 69fa2292a..98ce75079 100644 --- a/src/pkg/strconv/atob.go +++ b/src/pkg/strconv/atob.go @@ -7,8 +7,8 @@ package strconv import "os" // Atob returns the boolean value represented by the string. -// It accepts 1, t, T, TRUE, true, 0, f, F, FALSE, false. Any other value returns -// an error. +// It accepts 1, t, T, TRUE, true, True, 0, f, F, FALSE, false, False. +// Any other value returns an error. func Atob(str string) (value bool, err os.Error) { switch str { case "1", "t", "T", "true", "TRUE", "True": diff --git a/src/pkg/strconv/atob_test.go b/src/pkg/strconv/atob_test.go index 497df5b18..541e60d1e 100644 --- a/src/pkg/strconv/atob_test.go +++ b/src/pkg/strconv/atob_test.go @@ -24,11 +24,13 @@ var atobtests = []atobTest{ {"F", false, nil}, {"FALSE", false, nil}, {"false", false, nil}, + {"False", false, nil}, {"1", true, nil}, {"t", true, nil}, {"T", true, nil}, {"TRUE", true, nil}, {"true", true, nil}, + {"True", true, nil}, } func TestAtob(t *testing.T) { |
