From 2885ea61c9621717dc3a82b4ec5577b2ececb7fa Mon Sep 17 00:00:00 2001 From: Qianqian Fang Date: Fri, 17 Jun 2022 11:35:26 -0400 Subject: [PATCH] handle error messages on 32bit machine --- tests/src/unit-bjdata.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/src/unit-bjdata.cpp b/tests/src/unit-bjdata.cpp index d03117781..409445402 100644 --- a/tests/src/unit-bjdata.cpp +++ b/tests/src/unit-bjdata.cpp @@ -2652,10 +2652,16 @@ TEST_CASE("BJData") #if SIZE_MAX != 0xffffffff CHECK_THROWS_WITH_AS(_ = json::from_bjdata(vM), "[json.exception.out_of_range.408] syntax error while parsing BJData size: excessive ndarray size caused overflow", json::out_of_range&); +#else + CHECK_THROWS_WITH_AS(_ = json::from_bjdata(vM), "[json.exception.out_of_range.408] syntax error while parsing BJData size: integer value overflow", json::out_of_range&); #endif CHECK(json::from_bjdata(vM, true, false).is_discarded()); +#if SIZE_MAX != 0xffffffff CHECK_THROWS_WITH_AS(_ = json::from_bjdata(vMX), "[json.exception.out_of_range.408] syntax error while parsing BJData size: excessive ndarray size caused overflow", json::out_of_range&); +#else + CHECK_THROWS_WITH_AS(_ = json::from_bjdata(vMX), "[json.exception.out_of_range.408] syntax error while parsing BJData size: integer value overflow", json::out_of_range&); +#endif CHECK(json::from_bjdata(vMX, true, false).is_discarded()); }