RSS/Atom feed Twitter
Site is read-only, email is disabled

test_start() uses G_STRFUNC to determine function name

This discussion is connected to the gegl-developer-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

2 of 2 messages available
Toggle history

Please log in to manage your subscriptions.

test_start() uses G_STRFUNC to determine function name Albert Chin 29 Nov 17:17
  test_start() uses G_STRFUNC to determine function name Martin Nordholts 01 Dec 20:01
Albert Chin
2009-11-29 17:17:55 UTC (almost 15 years ago)

test_start() uses G_STRFUNC to determine function name

tests/buffer/buffer-test.c uses G_STRFUNC to print the name of the test function. However, this assumes the compiler supports __PRETTY_FUNCTION__ or __func__. If it doesn't, then test output is prepended with:
Test: ???

This basically causes the diff comparison to fail for most non-GCC compilers. Patch attached to fix this by manually adding the function name. Yeah, ugly, but I can't see an easier way to fix this.

Martin Nordholts
2009-12-01 20:01:43 UTC (almost 15 years ago)

test_start() uses G_STRFUNC to determine function name

Albert Chin wrote:

tests/buffer/buffer-test.c uses G_STRFUNC to print the name of the test function. However, this assumes the compiler supports __PRETTY_FUNCTION__ or __func__. If it doesn't, then test output is prepended with:
Test: ???

This basically causes the diff comparison to fail for most non-GCC compilers. Patch attached to fix this by manually adding the function name. Yeah, ugly, but I can't see an easier way to fix this.

It seems like a reasonable workaround to an ugly problem to me. Could you provide your patches (the other two as well) in git format-patch format?

BR, Martin