Added a unit test to check the integrity of all XML doc pages

This commit is contained in:
Matthias Koefferlein 2022-12-20 20:43:04 +01:00
parent 9440985aed
commit 7a76202411
5 changed files with 47 additions and 2 deletions

View File

@ -70,7 +70,7 @@ std::string escape_xml (const std::string &s);
/**
* @brief A specialization of BrowserSource for delivering the generated documentation
*/
class HelpSource
class LAY_PUBLIC HelpSource
: public BrowserSource
{
public:

View File

@ -0,0 +1,33 @@
/*
KLayout Layout Viewer
Copyright (C) 2006-2022 Matthias Koefferlein
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "layHelpSource.h"
#include "tlUnitTest.h"
TEST (1)
{
// tests whether the index can be built - i.e. all XML files
// are valid.
lay::HelpSource help_source (false /*don't load index file*/);
help_source.scan ();
}

View File

@ -8,7 +8,8 @@ include($$PWD/../../lib_ut.pri)
SOURCES = \
laySalt.cc \
laySessionTests.cc
layHelpIndexTest.cc \
laySessionTests.cc
INCLUDEPATH += $$LAY_INC $$TL_INC $$LAYBASIC_INC $$LAYUI_INC $$LAYVIEW_INC $$DB_INC $$GSI_INC $$ANT_INC $$IMG_INC $$RDB_INC
DEPENDPATH += $$LAY_INC $$TL_INC $$LAYBASIC_INC $$LAYUI_INC $$LAYVIEW_INC $$DB_INC $$GSI_INC $$ANT_INC $$IMG_INC $$RDB_INC

View File

@ -41,6 +41,10 @@
// This hard-links the GSI test classes
#include "../gsi_test/gsiTestForceLink.h"
// For testing the document structure
#include "docForceLink.h"
#include "iconsForceLink.h"
#include "version.h"
#if defined(HAVE_QT)

View File

@ -4,6 +4,13 @@ DESTDIR = $$OUT_PWD/..
include($$PWD/../klayout.pri)
include($$PWD/../with_all_libs.pri)
# NOTE: doc is needed for testing help sources
INCLUDEPATH += $$DOC_INC $$ICONS_INC
DEPENDPATH += $$DOC_INC $$ICONS_INC
LIBS += -lklayout_doc -lklayout_icons
TEMPLATE = app
# Don't build the ut_runner app as ordinary command line tool on MacOS