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:
Tomas Babej 2020-12-05 21:19:27 -05:00
parent 0ae2f2a5fd
commit a8c215774b
No known key found for this signature in database
GPG key ID: B0747C6578F7D2F5
2 changed files with 62 additions and 30 deletions

View file

@ -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&);