From 035af4d873d3de0685ab281be952e346547e40fd Mon Sep 17 00:00:00 2001 From: Adam Scarr Date: Tue, 8 Aug 2017 20:34:21 +1000 Subject: Add NumberLit parser and complete json spec --- parser_test.go | 23 ----------------------- 1 file changed, 23 deletions(-) (limited to 'parser_test.go') 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) -- cgit v1.2.3