aboutsummaryrefslogtreecommitdiffhomepage
path: root/conformance/conformance_test.h
diff options
context:
space:
mode:
authorGravatar Josh Haberman <jhaberman@gmail.com>2016-05-16 12:45:02 -0700
committerGravatar Josh Haberman <jhaberman@gmail.com>2016-06-03 09:39:38 -0700
commitef7894e2dc6d287419e42a4fdc52cdfedd386d16 (patch)
treee47fa4540f4c278ac2032549fdf311e3442c8c7f /conformance/conformance_test.h
parent20b532544fde1dff34429b52db95c3a96409b73c (diff)
Make conformance tests more strict about the failure list.
The failure lists were falling out of date because the tests would pass even if people forgot to remove failures from the list.
Diffstat (limited to 'conformance/conformance_test.h')
-rw-r--r--conformance/conformance_test.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/conformance/conformance_test.h b/conformance/conformance_test.h
index 75fc97bc..c9c5213c 100644
--- a/conformance/conformance_test.h
+++ b/conformance/conformance_test.h
@@ -98,7 +98,11 @@ class ConformanceTestSuite {
// Sets the list of tests that are expected to fail when RunSuite() is called.
// RunSuite() will fail unless the set of failing tests is exactly the same
// as this list.
- void SetFailureList(const std::vector<std::string>& failure_list);
+ //
+ // The filename here is *only* used to create/format useful error messages for
+ // how to update the failure list. We do NOT read this file at all.
+ void SetFailureList(const std::string& filename,
+ const std::vector<std::string>& failure_list);
// Run all the conformance tests against the given test runner.
// Test output will be stored in "output".
@@ -143,12 +147,14 @@ class ConformanceTestSuite {
void ExpectHardParseFailureForProto(const std::string& proto,
const std::string& test_name);
void TestPrematureEOFForType(google::protobuf::FieldDescriptor::Type type);
- bool CheckSetEmpty(const set<string>& set_to_check, const char* msg);
+ bool CheckSetEmpty(const set<string>& set_to_check,
+ const std::string& write_to_file, const std::string& msg);
ConformanceTestRunner* runner_;
int successes_;
int expected_failures_;
bool verbose_;
std::string output_;
+ std::string failure_list_filename_;
// The set of test names that are expected to fail in this run, but haven't
// failed yet.