@@ -66,6 +66,8 @@ using LIBC_NAMESPACE::fputil::testing::RoundingMode;
6666struct MPCRoundingMode {
6767 RoundingMode Rrnd;
6868 RoundingMode Irnd;
69+
70+ MPCRoundingMode (RoundingMode r, RoundingMode i) : Rrnd(r), Irnd(i) {}
6971};
7072
7173template <typename T> struct BinaryInput {
@@ -80,7 +82,13 @@ template <typename T> struct BinaryInput {
8082namespace internal {
8183
8284template <typename InputType, typename OutputType>
83- bool compare_unary_operation_single_output (Operation op, InputType input,
85+ bool compare_unary_operation_single_output_same_type (Operation op, InputType input,
86+ OutputType libc_output,
87+ double ulp_tolerance,
88+ MPCRoundingMode rounding);
89+
90+ template <typename InputType, typename OutputType>
91+ bool compare_unary_operation_single_output_different_type (Operation op, InputType input,
8492 OutputType libc_output,
8593 double ulp_tolerance,
8694 MPCRoundingMode rounding);
@@ -93,7 +101,13 @@ bool compare_binary_operation_one_output(Operation op,
93101 MPCRoundingMode rounding);
94102
95103template <typename InputType, typename OutputType>
96- void explain_unary_operation_single_output_error (Operation op, InputType input,
104+ void explain_unary_operation_single_output_same_type_error (Operation op, InputType input,
105+ OutputType match_value,
106+ double ulp_tolerance,
107+ MPCRoundingMode rounding);
108+
109+ template <typename InputType, typename OutputType>
110+ void explain_unary_operation_single_output_different_type_error (Operation op, InputType input,
97111 OutputType match_value,
98112 double ulp_tolerance,
99113 MPCRoundingMode rounding);
@@ -220,15 +234,15 @@ get_mpc_matcher(InputType input, [[maybe_unused]] OutputType output,
220234 match_value, \
221235 LIBC_NAMESPACE::testing::mpc::get_mpc_matcher<op>( \
222236 input, match_value, ulp_tolerance, \
223- MPCRoundingMode{ \
237+ LIBC_NAMESPACE::testing::mpc:: MPCRoundingMode{ \
224238 LIBC_NAMESPACE::fputil::testing::RoundingMode::Nearest, \
225239 LIBC_NAMESPACE::fputil::testing::RoundingMode::Nearest}))
226240
227241#define EXPECT_MPC_MATCH_ROUNDING (op, input, match_value, ulp_tolerance, \
228242 Rrounding, Irounding) \
229243 EXPECT_THAT (match_value, LIBC_NAMESPACE::testing::mpc::get_mpc_matcher<op>( \
230244 input, match_value, ulp_tolerance, \
231- MPCRoundingMode{Rrounding, Irounding}))
245+ LIBC_NAMESPACE::testing::mpc:: MPCRoundingMode{Rrounding, Irounding}))
232246
233247#define EXPECT_MPC_MATCH_ALL_ROUNDING_HELPER ( \
234248 i, j, op, input, match_value, ulp_tolerance, Rrounding, Irounding) \
@@ -260,23 +274,23 @@ get_mpc_matcher(InputType input, [[maybe_unused]] OutputType output,
260274 Rrounding, Irounding) \
261275 LIBC_NAMESPACE::testing::mpc::get_mpc_matcher<op>( \
262276 input, match_value, ulp_tolerance, \
263- MPCRoundingMode{Rrounding, Irounding}) \
277+ LIBC_NAMESPACE::testing::mpc:: MPCRoundingMode{Rrounding, Irounding}) \
264278 .match(match_value)
265279
266280#define ASSERT_MPC_MATCH_DEFAULT (op, input, match_value, ulp_tolerance ) \
267281 ASSERT_THAT ( \
268282 match_value, \
269283 LIBC_NAMESPACE::testing::mpc::get_mpc_matcher<op>( \
270284 input, match_value, ulp_tolerance, \
271- MPCRoundingMode{ \
285+ LIBC_NAMESPACE::testing::mpc:: MPCRoundingMode{ \
272286 LIBC_NAMESPACE::fputil::testing::RoundingMode::Nearest, \
273287 LIBC_NAMESPACE::fputil::testing::RoundingMode::Nearest}))
274288
275289#define ASSERT_MPC_MATCH_ROUNDING (op, input, match_value, ulp_tolerance, \
276290 Rrounding, Irounding) \
277291 ASSERT_THAT (match_value, LIBC_NAMESPACE::testing::mpc::get_mpc_matcher<op>( \
278292 input, match_value, ulp_tolerance, \
279- MPCRoundingMode{Rrounding, Irounding}))
293+ LIBC_NAMESPACE::testing::mpc:: MPCRoundingMode{Rrounding, Irounding}))
280294
281295#define ASSERT_MPC_MATCH_ALL_ROUNDING_HELPER ( \
282296 i, j, op, input, match_value, ulp_tolerance, Rrounding, Irounding) \
0 commit comments