Fix issues with comparing serialized floating-point numbers

This commit fixes long-standing issues with comparing floating-point numbers bound into PHP with
their original numbers in Go, where issues with imprecise storage may cause errors to occur.
This commit is contained in:
Alex Palaistras 2018-10-07 16:20:53 +01:00
parent b197613274
commit f59ad77455
1 changed files with 2 additions and 0 deletions

View File

@ -261,6 +261,8 @@ func TestContextBind(t *testing.T) {
c, _ := e.NewContext()
c.Output = &w
c.Eval("ini_set('serialize_precision', 6);")
for i, tt := range bindTests {
if err := c.Bind(fmt.Sprintf("t%d", i), tt.value); err != nil {
t.Errorf("Context.Bind('%v'): %s", tt.value, err)