diff options
| author | Rose Hogenson <rosehogenson@posteo.net> | 2025-12-03 17:49:18 -0800 |
|---|---|---|
| committer | Rose Hogenson <rosehogenson@posteo.net> | 2025-12-03 17:49:18 -0800 |
| commit | 61f0922ceb366d06c160529b8b378661d568488b (patch) | |
| tree | c37ab6c9b1e7bb4d67b726c6f6f5f18b1116863f /ccl_test.go | |
| parent | 59fe55b149fd31fe013578e4521ded0ee449134e (diff) | |
| download | ccl-61f0922ceb366d06c160529b8b378661d568488b.tar.zst | |
Diffstat (limited to 'ccl_test.go')
| -rw-r--r-- | ccl_test.go | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/ccl_test.go b/ccl_test.go index ac64d58..7ec9da2 100644 --- a/ccl_test.go +++ b/ccl_test.go @@ -412,10 +412,6 @@ func TestUnmarshal_Invalid(t *testing.T) { msg: `int: .`, want: &syntaxError{line: 1, col: 6}, }, { - desc: "WeirdNum", - msg: `float:1e+`, - want: &syntaxError{line: 1, col: 7}, - }, { desc: "BadHex", msg: `int:0xgg`, want: &syntaxError{line: 1, col: 5}, @@ -540,6 +536,10 @@ func TestUnmarshal_Invalid(t *testing.T) { msg: `float:1e`, want: &syntaxError{line: 1, col: 7}, }, { + desc: "FloatPositiveMissingExponent", + msg: `float:1e+`, + want: &syntaxError{line: 1, col: 7}, + }, { desc: "UnterminatedComment", msg: `/*`, want: &syntaxError{line: 1, col: 1}, @@ -551,6 +551,18 @@ func TestUnmarshal_Invalid(t *testing.T) { int:12345; # oops typo `, want: &syntaxError{line: 4, col: 10}, + }, { + desc: "OutOfRange", + msg: `int:20000000000000000000`, + want: &syntaxError{line: 1, col: 5}, + }, { + desc: "FloatRange", + msg: `float:1e309`, + want: &syntaxError{line: 1, col: 7}, + }, { + desc: "IntLetter", + msg: `int: 1A`, + want: &syntaxError{line: 1, col: 6}, }} { t.Run(tc.desc, func(t *testing.T) { t.Parallel() @@ -926,6 +938,9 @@ from string'`, `nested_repeated: [[1]]`, `float:1e`, `/*`, + `bytes:100000000000000000000`, + `float:1e700`, + `float:1A000`, } { f.Add([]byte(tc)) } |
