Gittyup/test/main_window.cpp
Martin Marmsoler 9bd742233e format code
2022-05-01 09:51:34 +02:00

41 lines
823 B
C++

//
// Copyright (c) 2016, Scientific Toolworks, Inc.
//
// This software is licensed under the MIT License. The LICENSE.md file
// describes the conditions under which this software may be distributed.
//
// Author: Jason Haslam
//
#include "Test.h"
#include "ui/MainWindow.h"
using namespace Test;
using namespace QTest;
class TestMainWindow : public QObject {
Q_OBJECT
private slots:
void initTestCase();
void show();
void cleanupTestCase();
private:
ScratchRepository mRepo;
MainWindow *mWindow = nullptr;
};
void TestMainWindow::initTestCase() { mWindow = new MainWindow(mRepo); }
void TestMainWindow::show() {
mWindow->show();
QVERIFY(qWaitForWindowActive(mWindow));
}
void TestMainWindow::cleanupTestCase() { mWindow->close(); }
TEST_MAIN(TestMainWindow)
#include "main_window.moc"