mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
tests: Implement mechanism for expected failures in C++ tests
Implements detection of unexpected successes and expected failures. Both classes are represented in the TAP output as 'not ok', unexpected successes with '# FIXED' metadata and expected failures as '# TODO'. This brings C++ tests to feature parity with Python-based ones when it comes to expected failures and unexpected successes.
This commit is contained in:
parent
0ae2f2a5fd
commit
a8c215774b
2 changed files with 62 additions and 30 deletions
20
test/test.h
20
test/test.h
|
@ -38,16 +38,16 @@ public:
|
|||
|
||||
void plan (int);
|
||||
void planMore (int);
|
||||
void ok (bool, const std::string&);
|
||||
void notok (bool, const std::string&);
|
||||
void is (bool, bool, const std::string&);
|
||||
void is (size_t, size_t, const std::string&);
|
||||
void is (int, int, const std::string&);
|
||||
void is (double, double, const std::string&);
|
||||
void is (double, double, double, const std::string&);
|
||||
void is (unsigned char, unsigned char, const std::string&);
|
||||
void is (const std::string&, const std::string&, const std::string&);
|
||||
void is (const char*, const char*, const std::string&);
|
||||
void ok (bool, const std::string&, bool expfail = false);
|
||||
void notok (bool, const std::string&, bool expfail = false);
|
||||
void is (bool, bool, const std::string&, bool expfail = false);
|
||||
void is (size_t, size_t, const std::string&, bool expfail = false);
|
||||
void is (int, int, const std::string&, bool expfail = false);
|
||||
void is (double, double, const std::string&, bool expfail = false);
|
||||
void is (double, double, double, const std::string&, bool expfail = false);
|
||||
void is (unsigned char, unsigned char, const std::string&, bool expfail = false);
|
||||
void is (const std::string&, const std::string&, const std::string&, bool expfail = false);
|
||||
void is (const char*, const char*, const std::string&, bool expfail = false);
|
||||
void diag (const std::string&);
|
||||
void pass (const std::string&);
|
||||
void fail (const std::string&);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue