opp_test error: 'namespace Decider80211p { }" redeclared as different kind of symbol

352 views
Skip to first unread message

Susana Rodriguez

unread,
Mar 19, 2015, 9:24:23 PM3/19/15
to omn...@googlegroups.com

Hello everyone, 
I created a simple test with opp_test. 
However, when I run my test script, I keep getting the error below. 

Here is my test. It is very simple for now, to minimize its relevance to the error. 
I tried  including Decider80211p.test with " " instead of <> and not including it at all,  but still get the same error.    
Any suggestions on how to fix it or the cause? 

Here is my runScript to run the test 


Here is the test.cc class that is generated by opp_test

My tech stack is below: 
Linux 12.04 
Veins 4 alpha 2 
Sumo 0.22
Veins 4a2 
Inet 2.5 
Omnet ++ 4.6  // I decided to use 4.6 instead 4.5 because of the supported testing feature

Susana Rodriguez

unread,
Mar 21, 2015, 12:49:47 PM3/21/15
to omn...@googlegroups.com
Hi , 
I finally figure out the problem. Opp_test generates a namespace in its test.cc class with the name of your test file. 
The test file cannot have the same name as the class that you are testing or any existing class.
The namespace generated by the test framework will clash with the actual class. 

In my case, my test file was Decider80211p.test and I was testing the Decider80211p class. 
With the generated code in the test.cc the namespace Decider80211p would re-declare
the Decider80211p class . 

Have a great day!
Susana
Reply all
Reply to author
Forward
0 new messages