Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 187370 - On Windows "New C++ Simple Test" and "New CppUnit Test" wizards generates wrong code
On Windows "New C++ Simple Test" and "New CppUnit Test" wizards generates wro...
Status: VERIFIED FIXED
Product: cnd
Classification: Unclassified
Component: -- Other --
6.x
PC Windows XP
: P2 (vote)
: 7.0
Assigned To: nnnnnk
issues@cnd
69patch1-verified
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-06-09 08:30 UTC by soldatov
Modified: 2010-07-07 14:12 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
:


Attachments
exception when i am creating CUnit test (trunk only) (6.49 KB, text/plain)
2010-06-18 12:00 UTC, soldatov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description soldatov 2010-06-09 08:30:47 UTC
On Windows "New C++ Simple Test" and "New CppUnit Test" wizards generates strange code.

Scenario:
- Create Quote
- Open cpu.cc file
- Call context menu and select "Create Test|New C++ Simple Test menu item
- Select all items. Press Next. Press Finish.
- Run tests
==>
g++    -c -g -Wall -I. -MMD -MP -MF build/Debug/Cygwin_4.x-Windows/tests/tests/newsimpletest.o.d -o build/Debug/Cygwin_4.x-Windows/tests/tests/newsimpletest.o tests/newsimpletest.cpp
tests/newsimpletest.cpp:15: error: 'Cpu' has not been declared
tests/newsimpletest.cpp:15: error: expected constructor, destructor, or type conversion before ';' token
tests/newsimpletest.cpp: In function 'void testCpu()':
tests/newsimpletest.cpp:21: error: 'Cpu' was not declared in this scope
tests/newsimpletest.cpp:21: error: expected `;' before 'cpu'
tests/newsimpletest.cpp:18: warning: unused variable 'type'
tests/newsimpletest.cpp:19: warning: unused variable 'architecture'
tests/newsimpletest.cpp:20: warning: unused variable 'units'
tests/newsimpletest.cpp: At global scope:
....
Comment 1 soldatov 2010-06-09 08:35:33 UTC
On Windows instead of #include "cpu.h" IDE adds forward declarations (but it works If file contains functions).

Compiler fails on:
 Cpu::Cpu(int type, int architecture, int units);

const char* Cpu::GetCategory();

const char* Cpu::GetType();
Comment 3 soldatov 2010-06-18 12:00:56 UTC
Created attachment 100202 [details]
exception when i am creating CUnit test (trunk only)
Comment 4 soldatov 2010-06-21 08:19:45 UTC
verified UnitTests on different machines and this problem is fixed
Comment 5 nnnnnk 2010-06-21 10:14:44 UTC
fixed
Comment 6 soldatov 2010-06-21 10:27:15 UTC
verified in trunk.
Comment 7 rbalada 2010-06-21 15:22:52 UTC
(In reply to comment #5)
> fixed

Nick,

please confirm the changeset info missing from your comment #5 should be

http://hg.netbeans.org/cnd-main?cmd=changeset;node=27d1f6fed08e

Thanks,
-R
Comment 9 rbalada 2010-06-22 13:20:31 UTC
main #65c33d1d85c9 transplanted to release691 #cb4a56f90650
main #27d1f6fed08e transplanted to release691 #65613ed4c8ac
Comment 10 soldatov 2010-07-07 14:12:54 UTC
verified in 6.9.1


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo