forked from BehaviorTree/Groot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreplay_test.cpp
48 lines (37 loc) · 1013 Bytes
/
replay_test.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#include "groot_test_base.h"
#include "bt_editor/sidepanel_replay.h"
#include <QAction>
class ReplyTest : public GrootTestBase
{
Q_OBJECT
public:
ReplyTest() {}
~ReplyTest() {}
private slots:
void initTestCase();
void cleanupTestCase();
void basicLoad();
};
void ReplyTest::initTestCase()
{
main_win = new MainWindow(GraphicMode::REPLAY, nullptr);
main_win->resize(1200, 800);
main_win->show();
}
void ReplyTest::cleanupTestCase()
{
QApplication::processEvents();
sleepAndRefresh( 1000 );
main_win->on_actionClear_triggered();
main_win->close();
}
void ReplyTest::basicLoad()
{
auto sidepanel_replay = main_win->findChild<SidepanelReplay*>("SidepanelReplay");
QVERIFY2( sidepanel_replay, "Can't get pointer to SidepanelReplay" );
QByteArray log = readFile("://crossdoor_trace.fbl");
sidepanel_replay->loadLog( log );
QCOMPARE( sidepanel_replay->transitionsCount(), size_t(27) );
}
QTEST_MAIN(ReplyTest)
#include "replay_test.moc"