mirror of
https://github.com/Murmele/Gittyup.git
synced 2024-09-11 02:35:41 +03:00
41 lines
823 B
C++
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"
|