Guest User

tests/testLatexPlugin.cpp

a guest
May 27th, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.47 KB | None | 0 0
  1. /*
  2.     Connection Test
  3.  
  4.     Copyright (c) 2006 by Matt Rogers <[email protected]>
  5.  
  6.     Kopete    (c) 2002-2006 by the Kopete developers  <[email protected]>
  7.  
  8.     *************************************************************************
  9.     *                                                                       *
  10.     * This library is free software; you can redistribute it and/or         *
  11.     * modify it under the terms of the GNU Lesser General Public            *
  12.     * License as published by the Free Software Foundation; either          *
  13.     * version 2 of the License, or (at your option) any later version.      *
  14.     *                                                                       *
  15.     *************************************************************************
  16. */
  17.  
  18. #include <QtTest/QtTest>
  19. #include "latexplugin.h"
  20.  
  21. class TestLatexPlugin: public QObject
  22. {
  23.     Q_OBJECT
  24.     LatexPlugin * dummyPlugin = new LatexPlugin(NULL,QVariantList());
  25. private slots:
  26.     void testLatexSecurityFunction();
  27. };
  28.  
  29. void TestLatexPlugin::testLatexSecurityFunction()
  30. {
  31.     QVERIFY(dummyPlugin->securityCheck(QString(""))==false);
  32.     QVERIFY(dummyPlugin->securityCheck(QString("define"))==false);
  33.     QVERIFY(dummyPlugin->securityCheck(QString("read"))==true);
  34.     QVERIFY(dummyPlugin->securityCheck(QString("lineitem"))==false);
  35.     QVERIFY(dummyPlugin->securityCheck(QString("output_stream"))==false);
  36. }
  37.  
  38.  
  39.  
  40. QTEST_MAIN(TestLatexPlugin)
  41. #include "testLatexPlugin.moc"
Add Comment
Please, Sign In to add comment