MCPcopy Create free account
hub / github.com/OpenPTrack/open_ptrack_v2 / TestCaseNameIs

Class TestCaseNameIs

rtpose_wrapper/src/gtest/gtest-all.cpp:5372–5385  ·  view source on GitHub ↗

A predicate that checks the name of a TestCase against a known value. This is used for implementation of the UnitTest class only. We put it in the anonymous namespace to prevent polluting the outer namespace. TestCaseNameIs is copyable.

Source from the content-addressed store, hash-verified

5370//
5371// TestCaseNameIs is copyable.
5372class TestCaseNameIs {
5373 public:
5374 // Constructor.
5375 explicit TestCaseNameIs(const String& name)
5376 : name_(name) {}
5377
5378 // Returns true iff the name of test_case matches name_.
5379 bool operator()(const TestCase* test_case) const {
5380 return test_case != NULL && strcmp(test_case->name(), name_.c_str()) == 0;
5381 }
5382
5383 private:
5384 String name_;
5385};
5386
5387// Finds and returns a TestCase with the given name. If one doesn't
5388// exist, creates one and returns it. It's the CALLER'S

Callers 1

GetTestCaseMethod · 0.85

Calls

no outgoing calls

Tested by 1

GetTestCaseMethod · 0.68