Skip to content

Commit

Permalink
StringMaker specialization for talk_response
Browse files Browse the repository at this point in the history
  • Loading branch information
jbytheway committed Apr 12, 2020
1 parent 217f423 commit af87561
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/stringmaker.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

#include "catch/catch.hpp"
#include "cata_variant.h"
#include "dialogue.h"
#include "item.h"

// StringMaker specializations for Cata types for reporting via Catch2 macros
Expand Down Expand Up @@ -47,6 +48,13 @@ struct StringMaker<time_duration> {
}
};

template<>
struct StringMaker<talk_response> {
static std::string convert( const talk_response &r ) {
return string_format( "talk_response( text=\"%s\" )", r.text );
}
};

} // namespace Catch

#endif // CATA_TESTS_STRINGMAKER_H

0 comments on commit af87561

Please sign in to comment.