Opened 4 years ago

Last modified 2 years ago

#811 new defect

PCUT should not prefix test case identifiers with "test_"

Reported by: Jiri Svoboda Owned by:
Priority: major Milestone:
Component: helenos/lib/other Version: mainline
Keywords: Cc:
Blocker for: Depends on:
See also:

Description

Declaring something like

int test_foo;

PCUT_TEST(foo)
{
...
}

fails to compile because foo is mangled to test_foo. Perhaps test case identifiers should be mangled to something that the programmer is less likely to use accidentally, such as _test_ or _pcut_, for example.

Change History (3)

comment:1 by Jiří Zárevúcky, 4 years ago

I don't see why that matters. Test case names are decorative only and in the unlikely case there is a conflict, you can just rename the testcase. Also, since PCUT is maintained in its own repo, this issue should be taken there.

comment:2 by Jiri Svoboda, 4 years ago

It happened to me several times so it's not unlikely. The fact that you can work around it does not mean it should not be fixed.

I created issue on Github https://github.com/vhotspur/pcut/issues/4

comment:3 by Jiri Svoboda, 2 years ago

This was fixed in PCUT upstream, but PCUT in HelenOS needs updating.

Note: See TracTickets for help on using tickets.