Developer forums (C::B DEVELOPMENT STRICTLY!) > CodeCompletion redesign

Trying to get cctest to work

(1/1)

jat1:
Hi,

I created a patch (attached) to solve the first two test cases listed in this ticket: http://sourceforge.net/p/codeblocks/tickets/158/. I wrote some test cases (also attached), which work when I test manually, but don't work in cctest.

These are the steps I take:
1) apply the patch
2) compile CC and run update.bat
3) run cctest in \codeblocks\src\output\
4) open the test file and run a single test

Only the first test case passes (the AAA typedef). The rest fail.

Am I missing a step somewhere?

ollydbg:
Hi, thanks for the contribution.
Apply the patch, and rename your test file to "ccc_type_alias.cpp", then run cc_test, I get such result:


--- Code: ---********************************************************
  Testing in file: F:\cb_sf_git\trunk\src\plugins\codecompletion\testing\ccc_type_alias.cpp
********************************************************
-PASS: DDD.  m_bbb
-PASS: CCC::cs.  m_bbb
-PASS: BBB.  m_aaa
-PASS: AAA.  m_aaa
--------------------------------------------------------
Total 4 tests, 4 PASS, 0 FAIL
--------------------------------------------------------

--- End code ---

In the mean while, the content of the ccc_type_alias.cpp is loaded to the control (or you can open that file from Menu->file->open)
Run "Test single" just run the test code in the editor control, I get such result:

--- Code: ---********************************************************
  Testing file in edit control
********************************************************
-PASS: DDD.  m_bbb
-PASS: CCC::cs.  m_bbb
-PASS: BBB.  m_aaa
-PASS: AAA.  m_aaa
--------------------------------------------------------
Total 4 tests, 4 PASS, 0 FAIL
--------------------------------------------------------

--- End code ---

Note, ccc_*.cpp(only one ccc_*.cpp is parsed, so you only need one ccc_*.cpp in the folder) has much precedence than cc_*.cpp. The logic here is that this can used to test a single test file, because testing all the cc_*.cpp takes a lot of time, especially we have TRACE enabled when building cctest.

Hope the above helps. Thanks.

ollydbg:
Hi, jat1, the patch and the test case were in trunk now, thank you very much!

jat1:
Ok, thanks for the info. I wanted to make sure cctest wasn't failing because I was running it incorrectly. After reading your post, it looks as though I was doing it right. So I decided to just reinstall C::B and all the tests pass now. Thanks again.

Edit: I believe this error occurred because I originally copied wxmsw28u_gcc_custom.dll to codeblocks\src\output instead of \codeblocks\src\devel. Fixed it during the reinstall.

Navigation

[0] Message Index

Go to full version