tests: better test initializing allowing for better printing (#5379)

Co-authored-by: Nerixyz <nerixdev@outlook.de>
This commit is contained in:
pajlada
2024-05-05 15:01:07 +02:00
committed by GitHub
parent a88a2ac65c
commit 401feac0aa
41 changed files with 198 additions and 178 deletions
+22
View File
@@ -0,0 +1,22 @@
#pragma once
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include <ostream>
class QString;
class QStringView;
class QByteArray;
// This file is included in all TUs in chatterino-test to avoid ODR violations.
std::ostream &operator<<(std::ostream &os, QStringView str);
std::ostream &operator<<(std::ostream &os, const QByteArray &bytes);
std::ostream &operator<<(std::ostream &os, const QString &str);
// NOLINTBEGIN(readability-identifier-naming)
// PrintTo is used for naming parameterized tests, and is part of gtest
void PrintTo(const QByteArray &bytes, std::ostream *os);
void PrintTo(QStringView str, std::ostream *os);
void PrintTo(const QString &str, std::ostream *os);
// NOLINTEND(readability-identifier-naming)