From 2834c7e43cae369fdb6c8fdbe25b25e2b7c17f41 Mon Sep 17 00:00:00 2001 From: Ben Brooks Date: Mon, 11 Nov 2019 16:35:50 +0000 Subject: [PATCH] Remove large test values that fail on 32-bit architectures --- api_tests/config_test.go | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/api_tests/config_test.go b/api_tests/config_test.go index e5eb351..b6fcd7f 100644 --- a/api_tests/config_test.go +++ b/api_tests/config_test.go @@ -43,19 +43,12 @@ func Test_max_depth(t *testing.T) { {jsonDepth: 5, cfgMaxDepth: 6}, {jsonDepth: 5, cfgMaxDepth: 5}, {jsonDepth: 5, cfgMaxDepth: 4, expectedErr: "max depth"}, - // Now try some larger values to figure out the limit + // Try a large depth without a limit {jsonDepth: 128000, cfgMaxDepth: -1}, - {jsonDepth: 512000, cfgMaxDepth: -1}, - {jsonDepth: 768000, cfgMaxDepth: -1}, - {jsonDepth: 860367, cfgMaxDepth: -1}, // largest value for jsoniter without stack overflow } for _, test := range tests { t.Run(fmt.Sprintf("jsonDepth:%v_cfgMaxDepth:%v", test.jsonDepth, test.cfgMaxDepth), func(t *testing.T) { - if testing.Short() && test.jsonDepth >= 512000 { - t.Skip("skipping in -short due to large input data") - } - should := require.New(t) cfg := jsoniter.Config{MaxDepth: test.cfgMaxDepth}.Froze()