mirror of
https://github.com/catchorg/Catch2.git
synced 2025-06-01 17:37:57 +00:00
Use StringRef for className in TestCaseInfo
This commit is contained in:
parent
21b99d6f58
commit
f02c2678a1
14 changed files with 47 additions and 219 deletions
|
@ -57,7 +57,7 @@ namespace Catch {
|
|||
*/
|
||||
struct TestCaseInfo : Detail::NonCopyable {
|
||||
|
||||
TestCaseInfo(std::string const& _className,
|
||||
TestCaseInfo(StringRef _className,
|
||||
NameAndTags const& _tags,
|
||||
SourceLineInfo const& _lineInfo);
|
||||
|
||||
|
@ -77,7 +77,7 @@ namespace Catch {
|
|||
std::string tagsAsString() const;
|
||||
|
||||
std::string name;
|
||||
std::string className;
|
||||
StringRef className;
|
||||
private:
|
||||
std::string backingTags, backingLCaseTags;
|
||||
// Internally we copy tags to the backing storage and then add
|
||||
|
@ -109,9 +109,10 @@ namespace Catch {
|
|||
TestCaseInfo const& getTestCaseInfo() const;
|
||||
};
|
||||
|
||||
Detail::unique_ptr<TestCaseInfo> makeTestCaseInfo( std::string const& className,
|
||||
NameAndTags const& nameAndTags,
|
||||
SourceLineInfo const& lineInfo );
|
||||
Detail::unique_ptr<TestCaseInfo>
|
||||
makeTestCaseInfo( StringRef className,
|
||||
NameAndTags const& nameAndTags,
|
||||
SourceLineInfo const& lineInfo );
|
||||
}
|
||||
|
||||
#ifdef __clang__
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue