diff options
author | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-01-21 18:19:03 +0000 |
---|---|---|
committer | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-01-21 18:19:03 +0000 |
commit | 48080209fa53b6ea88c86e9f445c431b4cd1e47b (patch) | |
tree | 27d8768fb1d25696d3c40b42535eb5e073c278da /libgo/go/exp/datafmt/datafmt_test.go | |
parent | bff898fbbe4358a4b7e337852df4d6043e0bd3f5 (diff) | |
download | ppe42-gcc-48080209fa53b6ea88c86e9f445c431b4cd1e47b.tar.gz ppe42-gcc-48080209fa53b6ea88c86e9f445c431b4cd1e47b.zip |
Remove the types float and complex.
Update to current version of Go library.
Update testsuite for removed types.
* go-lang.c (go_langhook_init): Omit float_type_size when calling
go_create_gogo.
* go-c.h: Update declaration of go_create_gogo.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@169098 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgo/go/exp/datafmt/datafmt_test.go')
-rw-r--r-- | libgo/go/exp/datafmt/datafmt_test.go | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/libgo/go/exp/datafmt/datafmt_test.go b/libgo/go/exp/datafmt/datafmt_test.go index 66794cfde5d..d7c70b21dec 100644 --- a/libgo/go/exp/datafmt/datafmt_test.go +++ b/libgo/go/exp/datafmt/datafmt_test.go @@ -7,11 +7,15 @@ package datafmt import ( "fmt" "testing" + "go/token" ) +var fset = token.NewFileSet() + + func parse(t *testing.T, form string, fmap FormatterMap) Format { - f, err := Parse("", []byte(form), fmap) + f, err := Parse(fset, "", []byte(form), fmap) if err != nil { t.Errorf("Parse(%s): %v", form, err) return nil @@ -76,10 +80,10 @@ func TestCustomFormatters(t *testing.T) { f = parse(t, ``, fmap1) verify(t, f, `even odd even odd `, 0, 1, 2, 3) - f = parse(t, `/ =@:blank; float="#"`, fmap1) + f = parse(t, `/ =@:blank; float64="#"`, fmap1) verify(t, f, `# # #`, 0.0, 1.0, 2.0) - f = parse(t, `float=@:nil`, fmap1) + f = parse(t, `float64=@:nil`, fmap1) verify(t, f, ``, 0.0, 1.0, 2.0) f = parse(t, `testing "testing"; ptr=*`, fmap2) @@ -135,7 +139,7 @@ func TestBasicTypes(t *testing.T) { const f = 3.141592 const fs = `3.141592` - check(t, `float ="%g"`, fs, f) + check(t, `float64="%g"`, fs, f) check(t, `float32="%g"`, fs, float32(f)) check(t, `float64="%g"`, fs, float64(f)) } |