summaryrefslogtreecommitdiff
path: root/parser_test.go
diff options
context:
space:
mode:
authorAdam Scarr <adam@vektah.net>2017-08-08 20:34:21 +1000
committerAdam Scarr <adam@vektah.net>2017-08-08 20:34:21 +1000
commit035af4d873d3de0685ab281be952e346547e40fd (patch)
tree3b72976a4ecf229189ce1685aa232cad34fb6f86 /parser_test.go
parent73b55459ac724bc84c43159e820b90909dc63d51 (diff)
Add NumberLit parser and complete json spec
Diffstat (limited to 'parser_test.go')
-rw-r--r--parser_test.go23
1 files changed, 0 insertions, 23 deletions
diff --git a/parser_test.go b/parser_test.go
index 3a3b778..08a8f7b 100644
--- a/parser_test.go
+++ b/parser_test.go
@@ -151,29 +151,6 @@ func TestParseString(t *testing.T) {
})
}
-func TestUnhex(t *testing.T) {
- tests := map[int64]string{
- 0xF: "F",
- 0x5: "5",
- 0xFF: "FF",
- 0xFFF: "FFF",
- 0xA4B: "a4b",
- 0xFFFF: "FFFF",
- 0xBEEFCAFE: "beeFCAfe",
- }
- for expected, input := range tests {
- t.Run(input, func(t *testing.T) {
- r, ok := unhex(input)
- require.True(t, ok)
- require.EqualValues(t, expected, r)
- })
- }
-
- t.Run("Fails on non hex chars", func(t *testing.T) {
- _, ok := unhex("hello")
- require.False(t, ok)
- })
-}
func runParser(input string, parser Parser) (Node, *State) {
ps := InputString(input)