mirror of
https://github.com/clementine-player/Clementine
synced 2025-01-18 20:40:43 +01:00
Move qRegisterMetaType back to SetUpTestCase(). Add comment
regarding ownership of the optional argument to MusicBrainzClient().
This commit is contained in:
parent
9a06e7822c
commit
ac162c3477
@ -39,7 +39,8 @@ class MusicBrainzClient : public QObject {
|
||||
|
||||
public:
|
||||
// The second argument allows for specifying a custom network access
|
||||
// manager. It is used in tests.
|
||||
// manager. It is used in tests. The ownership of network
|
||||
// is not transferred.
|
||||
MusicBrainzClient(QObject* parent = nullptr,
|
||||
QNetworkAccessManager* network = nullptr);
|
||||
|
||||
|
@ -38,11 +38,13 @@ Q_DECLARE_METATYPE(ResultList);
|
||||
|
||||
class MusicBrainzClientTest : public ::testing::Test {
|
||||
protected:
|
||||
void SetUp() {
|
||||
mock_network_.reset(new MockNetworkAccessManager);
|
||||
static void SetUpTestCase() {
|
||||
qRegisterMetaType<ResultList>("MusicBrainzClient::ResultList");
|
||||
}
|
||||
|
||||
void SetUp() {
|
||||
mock_network_.reset(new MockNetworkAccessManager);
|
||||
}
|
||||
|
||||
// Reads the data from a file into a QByteArray and returns it.
|
||||
QByteArray ReadDataFromFile(const QString& filename) {
|
||||
|
Loading…
Reference in New Issue
Block a user