comipayan / googletest

Automatically exported from code.google.com/p/googletest
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Documentation "GoogleTestPrimer" improvement #218

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create the sample1 example in Netbeans 6.7
2. Create a main as described in the documentation

What is the expected output? What do you see instead?
The sentence "::testing::InitGoogleTest(&argc, argv);" will be highlighted
as wrong (for being precise, the "testing" word only) with the error
"unable to resolve identifier testing".

What version of the product are you using? On what operating system?
Linux Ubuntu 9.10 amd64 / gtest 1.4.0 / g++ 4.4.1

Please provide any additional information below, such as a code snippet.
Removing the :: at the beginning of the sentence will solve the problem.

Original issue reported on code.google.com by lorenzo....@gmail.com on 6 Nov 2009 at 10:09

GoogleCodeExporter commented 9 years ago
Resolving the testing namespace as top level is perfectly legal in C++. In 
fact, it is 
necessary to ensure that you access the right namespace in case your code has 
testing 
namespace in it. I think you should file this as a bug in NetBeans.

Original comment by vladlosev on 12 Nov 2009 at 5:45

GoogleCodeExporter commented 9 years ago
you are completly right, sorry...I have discovered some strange behaviours in
Netbeans related to the parsing and the highlighting of the source 
code...thanks a
lot for the answer and sorry for the mistake!

Original comment by lorenzo....@gmail.com on 12 Nov 2009 at 6:38