52 std::string deadline_exception_at_start_str;
53 BOOST_CHECK_EXCEPTION(deadline_exception_at_start_str = json::to_string( v,
fc::time_point::min(), json::output_formatting::stringify_large_ints_and_doubles, json::max_length_limit),
54 fc::timeout_exception,
56 BOOST_CHECK_EQUAL(deadline_exception_at_start_str.empty(),
true);
59 constexpr size_t max_len = 10;
61 std::string deadline_exception_at_start_str;
62 BOOST_CHECK_EQUAL(deadline_exception_at_start_str.empty(),
true);
63 BOOST_CHECK_EXCEPTION(deadline_exception_at_start_str = json::to_string( v,
fc::time_point::maximum(), json::output_formatting::stringify_large_ints_and_doubles, max_len),
66 BOOST_CHECK_EQUAL(deadline_exception_at_start_str.empty(),
true);
70 std::string length_exception_in_mid_str;
71 BOOST_CHECK_NO_THROW(length_exception_in_mid_str = json::to_string( v,
fc::time_point::maximum(), json::output_formatting::stringify_large_ints_and_doubles, json::max_length_limit));
79 std::string deadline_exception_at_start_str;
81 fc::timeout_exception,
83 BOOST_CHECK_EQUAL(deadline_exception_at_start_str.empty(),
true);
86 std::string deadline_exception_in_mid_str;
88 fc::timeout_exception,
90 BOOST_CHECK_EQUAL(deadline_exception_in_mid_str.empty(),
true);
93 std::string length_exception_in_mid_str;
97 BOOST_CHECK_EQUAL(length_exception_in_mid_str.empty(),
true);
100 std::string no_exception_str;
109 BOOST_CHECK_EQUAL(std::to_string(
id), id_ret_1);
112 std::string id_ret_2;
113 BOOST_REQUIRE_THROW(id_ret_2 = json::to_string(
id,
fc::time_point::maximum(), json::output_formatting::stringify_large_ints_and_doubles,
len), fc::assert_exception);
114 BOOST_CHECK_EQUAL(id_ret_2.empty(),
true);
117 std::string id_ret_3;
119 BOOST_CHECK_EQUAL(id_ret_3.empty(),
true);
128 std::string deadline_exception_at_start_str;
129 BOOST_CHECK_EXCEPTION(deadline_exception_at_start_str = json::to_pretty_string( v,
fc::time_point::min(), json::output_formatting::stringify_large_ints_and_doubles, json::max_length_limit),
130 fc::timeout_exception,
132 BOOST_CHECK_EQUAL(deadline_exception_at_start_str.empty(),
true);
135 constexpr size_t max_len = 10;
137 std::string deadline_exception_at_start_str;
138 BOOST_CHECK_EQUAL(deadline_exception_at_start_str.empty(),
true);
139 BOOST_CHECK_EXCEPTION(deadline_exception_at_start_str = json::to_pretty_string( v,
fc::time_point::maximum(), json::output_formatting::stringify_large_ints_and_doubles, max_len),
140 fc::assert_exception,
142 BOOST_CHECK_EQUAL(deadline_exception_at_start_str.empty(),
true);
146 std::string length_exception_in_mid_str;
147 BOOST_CHECK_NO_THROW(length_exception_in_mid_str = json::to_pretty_string( v,
fc::time_point::maximum(), json::output_formatting::stringify_large_ints_and_doubles, json::max_length_limit));
155 std::string deadline_exception_at_start_str;
157 fc::timeout_exception,
159 BOOST_CHECK_EQUAL(deadline_exception_at_start_str.empty(),
true);
162 std::string deadline_exception_in_mid_str;
164 fc::timeout_exception,
166 BOOST_CHECK_EQUAL(deadline_exception_in_mid_str.empty(),
true);
169 std::string length_exception_in_mid_str;
171 fc::assert_exception,
173 BOOST_CHECK_EQUAL(length_exception_in_mid_str.empty(),
true);
176 std::string no_exception_str;
185 BOOST_CHECK_EQUAL(std::to_string(
id), id_ret_1);
188 std::string id_ret_2;
189 BOOST_REQUIRE_THROW(id_ret_2 = json::to_pretty_string(
id,
fc::time_point::maximum(), json::output_formatting::stringify_large_ints_and_doubles,
len), fc::assert_exception);
190 BOOST_CHECK_EQUAL(id_ret_2.empty(),
true);
193 std::string id_ret_3;
195 BOOST_CHECK_EQUAL(id_ret_3.empty(),
true);
stores null, int64, uint64, double, bool, string, std::vector<variant>, and variant_object's.