if(true)
RTF_TEST_REPORT(Asserter::format("Starting with SystemClock"));
else
RTF_TEST_REPORT(Asserter::format("Starting with Network Clock from port %s", clockPort_EnvName.c_str()));
Give this compilation error:
In member function ‘virtual void ClockTest::run()’:
/usr/local/src/robot/icub-src/icub-tests/src/clock/ClockTest.cpp:84:5: error: ‘else’ without a previous ‘if’
else
^
While using brackets it works fine
if(true)
{ RTF_TEST_REPORT(Asserter::format("Starting with SystemClock")); }
else
{ RTF_TEST_REPORT(Asserter::format("Starting with Network Clock from port %s", clockPort_EnvName.c_str())); }
This code
Give this compilation error:
While using brackets it works fine