Unit testing non standard string literal macros

What’s the recommended way to write unit tests for non-standard string literal macros, say foo_str? Best I could come up with is

str = "what goes in"
x = @eval @foo_str($str)
@test something(x) == supposed_to_be(str)

Is there a way to use the foo"..." form directly?