Ceedling
Ceedling copied to clipboard
ceedling+Unity records wrong line numers for test in some cases
Hello,
It seems that ceedling
, while generating a test runner, records wrong lines for tests in this partcular case:
// void test_MyTest(void)
// Description: This test does ....
// Expected result: ....
void test_MyTest(void)
{
...
}
Given above test, generate_test_runner.rb
puts as second argument of RUN_TEST macro the line number of the line where the comment is, not where the test definition is.
However if C-like comment /* */
is used instead if C++ like comment //
, generate_test_runner.rb
records the line number where is the definition of the test, not the comment (which is right):
/* void test_MyTest(void) */
// Description: This test does ....
// Expected result: ....
void test_MyTest(void)
{
...
}
I tested this ceedling 0.28.2
/ Unity 2.4.2
.
Do you have header preprocessing enabled?
Yes, I have
:use_test_preprocessor: TRUE
I cannot disable it, because I use it (1) to compile groups of tests and (2) to compile variations of same functions depending on application configuration.
:) I wasn't going to try to talk you out of disabling the preprocessing. I was just attempting to narrow down the situations where this problem happens.
Hi @jwalkerbg ,
I tried to reproduce your issue at latest version of Ceedling master without success.
Ceedling:: 0.31.1
Unity:: 2.5.4
CMock:: 2.5.4
CException:: 1.3.3
Do you think that we can close this ticket as no longer valid? As the issue cannot be reproduced on latest version of Ceedling?