Comments (8)
Not sure, but perhaps that macro was supposed to just be a backward compatibility layer and meant to be deprecated: #34 .
from robot-testing-framework.
If I'm not mistaken, its use is quite spread at least in vvv-school. Unable to check right now.
from robot-testing-framework.
Apparently, I was wrong saying the macro is used in vvv-school
. I've just checked and it's never used, instead.
However, icub-tests
make use of it quite extensively. To this end, try out this search.
from robot-testing-framework.
@aerydna : Please pay attention that "RTF_TEST_FAIL_IF" fails if the condition is not hold! This standard has been chosen according to CppUnit testing framework!
According to its documentation:
/** Conditional failure report. RTF_TEST_FAIL_IF does not throw any
* exception. It reports a failure message to the TestResult indiecating
* that the check on the corresponding condition evaluates to \c false.
* \ingroup Test Assertions
* \param message Message to be reported as the detail of TestMessage
* \param condition If this condition evaluates to \c false then the
* test failed.
*
* \note RTF_TEST_FAIL_IF throws error exception if it is not called
* within a TestCase class.
*/
from robot-testing-framework.
@apaikan is there a CppUnit equivalent of RTF_TEST_FAIL_IF
? is the signature similar? because as it is (with a IF
) i tend to give the macro the following meaning:
RTF_TEST_FAIL_IF(condition)
==
if (condition)
{
fail();
}
from robot-testing-framework.
@aerydna: Agree with you! I guess my confusion came from the implementation of CPPUNIT_ASSERT
macro:
#define CPPUNIT_ASSERT ( condition )
( CPPUNIT_NS::Asserter::failIf( !(condition), \
CPPUNIT_NS::Message( "assertion failed", \
"Expression: " #condition), \
CPPUNIT_SOURCELINE() ) )
Please go ahead to change the the condition inside. If you are eager to do that, please remember to
- Update the documentation (doxygen)
- Check if there is any example regarding that which need to be updated
- and more importantly, where it has been used in the bindings (Lua, Python, Ruby, Ada,..)
from robot-testing-framework.
@aerydna please remember to notify me when such changes happen, 'cause #84 is not only related to RTF_TEST_FAIL_IF
as discussed here but also to e.g. RTF_ASSERT_ERROR_IF
for which, instead, we'll have an impact on vvv-school
code I'm maintaining.
Honestly, I don't like to discover this by myself: I could easily miss reading PR for example 😉
from robot-testing-framework.
More on this: icub-tests
needs to be updated now.
@aerydna is this action already planned?
from robot-testing-framework.
Related Issues (20)
- Rename RTF HOT 14
- Handle RPATH HOT 1
- Broken documentation website HOT 2
- The doxygen documentation should be regenerated HOT 1
- Compilation fails when using TinyXML installed from vcpkg
- Permit to specify directory where to load plugins from without using LD_LIBRARY_PATH/PATH HOT 1
- Adding timeout parameter to testrunner HOT 1
- Doxygen generated documentation is outdated HOT 8
- How to manage the addition of [[noreturn]] in RTF_ASSERT HOT 3
- order and dependencies in TestSuit HOT 3
- Test that fails to load in a test suite do not count as failed tests HOT 3
- Add changelog for each release in `doc/release` HOT 1
- FixturePluginLoader test get stuck on Win32 if compiled in Debug HOT 2
- Support compiling as a shared library in Windows HOT 1
- Broken links in Readme HOT 4
- Provide a way to set an enviroment variable for just a test HOT 1
- Plugins do not work when -fvisibility=hidden is set HOT 2
- Improvements to the progress canvas in web-reporter HOT 1
- RTF should have a 1.5.0 release HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from robot-testing-framework.