You can sendmight be better off sending the values as an array to the macro, so:then you will only need one parameter.
{# Change the macro to check for the value in an array #}
{% macro is_active(segments) %}
{% if craft.app.request.getSegment(2) in segments %}active{% endif %}
{% endmacro %}
{# Send an array to the macro #}
<a href="/the-url" class="{{ macros.is_active(['test1', 'test2', 'test3']) }}">Link Title</a>