romshark / jscan

High performance JSON iterator & validator for Go
BSD 3-Clause "New" or "Revised" License
89 stars 7 forks source link

Valid: another validation errors #5

Closed ernado closed 2 years ago

ernado commented 2 years ago
package jscan

import (
    "encoding/json"
    "testing"
)

func TestValid(t *testing.T) {
    for _, v := range []string{
        " ",
        "0 0",
    } {
        if json.Valid([]byte(v)) != Valid(v) {
            t.Errorf("%#v", v)
        }
    }
}
=== RUN   TestValid
    valid_test.go:14: " "
    valid_test.go:14: "0 0"
--- FAIL: TestValid (0.00s)
=== RUN   TestValid
--- PASS: TestValid (0.00s)

FAIL
ernado commented 2 years ago

The "0 0" is still failing