Turned laySnap unit tests into a pure test for laybasic.

This commit is contained in:
Matthias Koefferlein 2017-08-27 00:59:08 +02:00
parent c8f4272ebb
commit 34089ca96b
2 changed files with 18 additions and 3 deletions

View File

@ -22,15 +22,13 @@
#include "laySnap.h"
#include "layLayoutView.h"
#include "layApplication.h"
#include "layMainWindow.h"
#include "utHead.h"
TEST(1)
{
db::Manager mgr;
lay::LayoutView view (&mgr, lay::Application::instance ()->is_editable (), lay::MainWindow::instance ());
lay::LayoutView view (&mgr, is_editable (), 0);
int cv1 = view.create_layout ("", true, false);
db::Layout &ly1 = view.cellview (cv1)->layout ();

View File

@ -446,6 +446,23 @@ struct UT_PUBLIC TestBase
}
}
protected:
/**
* @brief Returns a value indicating whether the test runs in editable mode
*/
bool is_editable () const
{
return m_editable;
}
/**
* @brief Returns a value indicating whether the test runs in slow mode
*/
bool is_slow () const
{
return m_slow;
}
private:
virtual void execute (ut::TestBase *_this) throw (tl::Exception) = 0;