Hello, I understand why you think it is rather hard to do unit testing for lyx. There are class files with up to 6403 lines of code. src/Buffer.cpp has 4803 lines and many files depend on that.
After all setting up a wall of unit test is the prerequest for refactoring to more maintainable code and architecture. 23 src/support/tests/check_filetools.cpp 23 src/support/tests/dummy_functions.cpp 26 src/Dimension.cpp 29 src/version.cpp 32 src/support/tests/check_lstrings.cpp 33 src/ErrorList.cpp 36 src/frontends/tests/boost.cpp 36 src/support/tests/boost.cpp 42 src/InsetIterator.cpp 42 src/client/boost.cpp 42 src/tex2lyx/boost.cpp 43 src/main.cpp 46 src/support/AppleScriptProxy.cpp 48 src/Box.cpp 49 src/frontends/qt4/GuiFontExample.cpp 50 src/boost.cpp 53 src/support/kill.cpp 55 src/mathed/MathAtom.cpp 58 src/frontends/qt4/InGuiThread.cpp 58 src/output.cpp 59 src/OutputParams.cpp 60 src/mathed/InsetMathLefteqn.cpp 61 src/PrinterParams.cpp 61 src/frontends/WorkAreaManager.cpp 62 src/mathed/InsetMathPar.cpp 64 src/frontends/qt4/GuiERT.cpp 64 src/frontends/qt4/InsetParamsWidget.cpp 65 src/support/lyxtime.cpp 66 src/CoordCache.cpp 66 src/frontends/qt4/GuiBibitem.cpp 66 src/insets/InsetFootlike.cpp 67 src/insets/InsetMarginal.cpp 67 src/support/PathChanger.cpp 68 src/mathed/InsetMathEnv.cpp 70 src/frontends/qt4/GuiBranch.cpp 70 src/support/qstring_helpers.cpp 72 src/frontends/qt4/GuiShowFile.cpp 72 src/support/mutex.cpp 73 src/frontends/qt4/Action.cpp 75 src/LaTeXPackages.cpp 75 src/insets/RenderButton.cpp 75 src/support/gettext.cpp 75 src/support/userinfo.cpp 76 src/mathed/InsetMathKern.cpp 78 src/support/TempFile.cpp 80 src/mathed/InsetMathLim.cpp 80 src/mathed/TextPainter.cpp 81 src/frontends/qt4/GuiCommandEdit.cpp 81 src/frontends/qt4/GuiLabel.cpp 81 src/mathed/CommandInset.cpp 82 src/mathed/MathMacroArgument.cpp 84 src/Floating.cpp 84 src/frontends/qt4/GuiNomenclature.cpp 85 src/FloatList.cpp 88 src/FuncStatus.cpp 88 src/frontends/qt4/LyXFileDialog.cpp 88 src/mathed/InsetMathNumber.cpp 89 src/support/tests/check_convert.cpp 90 src/graphics/epstools.cpp 93 src/frontends/tests/biblio.cpp 95 src/mathed/InsetMathDiagram.cpp 96 src/TexRow.cpp 96 src/frontends/qt4/GuiInfo.cpp 98 src/Chktex.cpp 98 src/Intl.cpp 99 src/mathed/InsetMathComment.cpp 100 src/frontends/qt4/GuiHyperlink.cpp 100 src/frontends/qt4/GuiPhantom.cpp 100 src/frontends/qt4/GuiTabularCreate.cpp 101 src/frontends/qt4/GuiNote.cpp 102 src/mathed/InsetMathColor.cpp 103 src/mathed/InsetMathFontOld.cpp 103 src/support/os.cpp 104 src/mathed/InsetMathDiff.cpp 106 src/Mover.cpp 107 src/frontends/qt4/GuiIndex.cpp 107 src/mathed/InsetMathUnknown.cpp 108 src/graphics/GraphicsParams.cpp 111 src/mathed/InsetMathEnsureMath.cpp 113 src/mathed/InsetMathXArrow.cpp 114 src/mathed/InsetMathTabular.cpp 115 src/frontends/qt4/GuiToc.cpp 116 src/frontends/qt4/GuiSelection.cpp 117 src/frontends/qt4/GuiPrintNomencl.cpp 118 src/mathed/InsetMathOverset.cpp 118 src/mathed/InsetMathSize.cpp 119 src/frontends/qt4/LaTeXHighlighter.cpp 120 src/frontends/qt4/GuiLine.cpp 121 src/TexStream.cpp 122 src/frontends/qt4/EmptyTable.cpp 123 src/frontends/qt4/GuiDialog.cpp 124 src/mathed/InsetMathBrace.cpp 126 src/mathed/InsetMathCancelto.cpp 127 src/insets/InsetFlex.cpp 128 src/frontends/qt4/ColorCache.cpp 129 src/WordList.cpp 129 src/mathed/InsetMathUnderset.cpp 130 src/insets/InsetFoot.cpp 131 src/frontends/qt4/LengthCombo.cpp 131 src/mathed/InsetMathDots.cpp 132 src/frontends/qt4/GuiChanges.cpp 132 src/mathed/InsetMathMBox.cpp 133 src/support/lassert.cpp 134 src/mathed/InsetMathSqrt.cpp 135 src/Row.cpp 135 src/frontends/qt4/GuiPrintindex.cpp 136 src/PersonalWordList.cpp 137 src/mathed/InsetMathBoldSymbol.cpp 142 src/frontends/qt4/GuiIdListModel.cpp 142 src/mathed/InsetMathRoot.cpp 143 src/support/environment.cpp 144 src/frontends/qt4/GuiSearch.cpp 144 src/mathed/InsetMathExFunc.cpp 146 src/Spacing.cpp 147 src/frontends/qt4/GuiCompareHistory.cpp 147 src/frontends/qt4/GuiVSpace.cpp 149 src/Exporter.cpp 151 src/FuncRequest.cpp 152 src/graphics/GraphicsCache.cpp 152 src/mathed/InsetMathMatrix.cpp 154 src/mathed/InsetMathArray.cpp 155 src/graphics/PreviewImage.cpp 155 src/mathed/InsetMathXYMatrix.cpp 156 src/mathed/InsetMathSplit.cpp 158 src/frontends/qt4/GuiMathMatrix.cpp 158 src/frontends/qt4/InsertTableWidget.cpp 159 src/HSpace.cpp 161 src/frontends/qt4/CustomizedWidgets.cpp 161 src/mathed/InsetMathSpecialChar.cpp 162 src/Author.cpp 164 src/mathed/InsetMathStackrel.cpp 167 src/support/socktools.cpp 168 src/insets/InsetPreview.cpp 169 src/mathed/InsetMathSubstack.cpp 169 src/support/convert.cpp 170 src/mathed/InsetMathAMSArray.cpp 171 src/mathed/InsetMathCancel.cpp 172 src/mathed/InsetMathXYArrow.cpp 172 src/support/gzstream.cpp 173 src/mathed/InsetMath.cpp 176 src/ParIterator.cpp 177 src/CmdDef.cpp 179 src/mathed/InsetFormulaMacro.cpp 181 src/frontends/qt4/GuiSendto.cpp 181 src/insets/InsetERT.cpp 181 src/support/FileMonitor.cpp 184 src/frontends/qt4/GuiAbout.cpp 186 src/mathed/MathAutoCorrect.cpp 187 src/frontends/qt4/GuiImage.cpp 192 src/mathed/InsetMathExInt.cpp 193 src/InsetList.cpp 193 src/mathed/InsetMathCases.cpp 195 src/frontends/qt4/GuiTexinfo.cpp 195 src/mathed/InsetMathString.cpp 199 src/frontends/qt4/BulletsModule.cpp 201 src/frontends/qt4/GuiProgress.cpp 202 src/buffer_funcs.cpp 204 src/AppleSpellChecker.cpp 206 src/EnchantChecker.cpp 207 src/mathed/InsetMathFont.cpp 210 src/frontends/qt4/FileDialog.cpp 210 src/insets/InsetLine.cpp 211 src/frontends/qt4/GuiErrorList.cpp 212 src/BranchList.cpp 212 src/KeySequence.cpp 213 src/mathed/InsetMathDelim.cpp 218 src/frontends/qt4/GuiWrap.cpp 223 src/insets/RenderGraphic.cpp 224 src/FontList.cpp 228 src/support/Timeout.cpp 232 src/frontends/qt4/Validator.cpp 233 src/CursorSlice.cpp 235 src/mathed/InsetMathRef.cpp 239 src/Graph.cpp 240 src/DepTable.cpp 241 src/VSpace.cpp 242 src/frontends/qt4/GuiSetBorder.cpp 242 src/mathed/InsetMathBig.cpp 243 src/Bidi.cpp 245 src/mathed/InsetMathChar.cpp 246 src/IndicesList.cpp 249 src/output_plaintext.cpp 251 src/sgml.cpp 252 src/TocBackend.cpp 252 src/insets/InsetIPA.cpp 253 src/insets/InsetArgument.cpp 254 src/frontends/qt4/GuiProgressView.cpp 255 src/frontends/qt4/GuiPrint.cpp 255 src/tex2lyx/Context.cpp 256 src/mathed/MacroTable.cpp 257 src/frontends/qt4/FloatPlacement.cpp 261 src/tex2lyx/math.cpp 264 src/insets/InsetVSpace.cpp 265 src/support/debug.cpp 268 src/frontends/qt4/IconPalette.cpp 270 src/insets/RenderPreview.cpp 273 src/PDFOptions.cpp 276 src/insets/InsetTOC.cpp 277 src/frontends/qt4/GuiFontMetrics.cpp 278 src/ParagraphMetrics.cpp 281 src/ModuleList.cpp 281 src/frontends/qt4/Dialog.cpp 282 src/insets/InsetFloatList.cpp 285 src/mathed/InsetMathSymbol.cpp 287 src/Thesaurus.cpp 288 src/LayoutModuleList.cpp 288 src/insets/InsetWrap.cpp 289 src/ServerSocket.cpp 290 src/insets/InsetLabel.cpp 292 src/insets/InsetNewline.cpp 293 src/support/Messages.cpp 295 src/frontends/qt4/GuiThesaurus.cpp 296 src/frontends/qt4/GuiIndices.cpp 296 src/frontends/qt4/InsetParamsDialog.cpp 296 src/insets/InsetHyperlink.cpp 296 src/insets/InsetNewpage.cpp 296 src/mathed/InsetMathDecoration.cpp 306 src/frontends/qt4/FancyLineEdit.cpp 308 src/frontends/qt4/GuiHSpace.cpp 315 src/insets/InsetGraphicsParams.cpp 316 src/frontends/qt4/ButtonController.cpp 317 src/frontends/qt4/GuiAlert.cpp 322 src/frontends/qt4/GuiViewSource.cpp 324 src/frontends/qt4/GuiLog.cpp 333 src/MetricsInfo.cpp 336 src/support/os_unix.cpp 339 src/ParagraphParameters.cpp 341 src/frontends/qt4/PanelStack.cpp 347 src/frontends/qt4/GuiCompare.cpp 351 src/mathed/InsetMathPhantom.cpp 353 src/insets/InsetBibitem.cpp 358 src/frontends/qt4/GuiDelimiter.cpp 358 src/frontends/qt4/GuiInclude.cpp 358 src/mathed/InsetMathSpace.cpp 363 src/LayoutFile.cpp 366 src/lengthcommon.cpp 367 src/frontends/qt4/GuiCommandBuffer.cpp 372 src/insets/InsetCommand.cpp 374 src/insets/InsetQuotes.cpp 375 src/Bullet.cpp 375 src/output_docbook.cpp 378 src/insets/InsetBranch.cpp 380 src/insets/InsetSpecialChar.cpp 381 src/insets/InsetRef.cpp 384 src/frontends/qt4/GuiBranches.cpp 385 src/Language.cpp 387 src/frontends/qt4/GuiFontLoader.cpp 388 src/insets/InsetNote.cpp 390 src/frontends/qt4/GuiParagraph.cpp 392 src/graphics/GraphicsConverter.cpp 393 src/insets/InsetPhantom.cpp 397 src/BufferList.cpp 399 src/frontends/qt4/GuiToolbar.cpp 400 src/support/unicode.cpp 402 src/frontends/qt4/TocModel.cpp 410 src/frontends/qt4/Toolbars.cpp 414 src/insets/InsetScript.cpp 423 src/mathed/InsetMathBox.cpp 426 src/Color.cpp 429 src/frontends/qt4/GuiSelectionManager.cpp 430 src/insets/InsetCaption.cpp 430 src/insets/InsetNomencl.cpp 432 src/insets/ExternalTransforms.cpp 436 src/Session.cpp 437 src/graphics/GraphicsCacheItem.cpp 439 src/frontends/qt4/GuiCharacter.cpp 446 src/insets/InsetListings.cpp 448 src/LyXVC.cpp 451 src/HunspellChecker.cpp 454 src/insets/InsetCitation.cpp 456 src/frontends/qt4/GuiBox.cpp 459 src/Length.cpp 461 src/graphics/GraphicsLoader.cpp 464 src/ConverterCache.cpp 468 src/support/os_cygwin.cpp 479 src/insets/InsetInfo.cpp 480 src/frontends/qt4/GuiSymbols.cpp 495 src/insets/InsetCommandParams.cpp 510 src/Changes.cpp 512 src/mathed/InsetMathSideset.cpp 526 src/frontends/qt4/TocWidget.cpp 528 src/frontends/qt4/GuiRef.cpp 528 src/insets/InsetFloat.cpp 539 src/LaTeXFonts.cpp 542 src/insets/ExternalSupport.cpp 548 src/AspellChecker.cpp 554 src/frontends/qt4/GuiBibtex.cpp 570 src/KeyMap.cpp 573 src/insets/ExternalTemplate.cpp 581 src/frontends/qt4/GuiClipboard.cpp 587 src/Undo.cpp 592 src/frontends/qt4/CategorizedCombo.cpp 599 src/frontends/qt4/FindAndReplace.cpp 606 src/frontends/qt4/qt_helpers.cpp 606 src/mathed/MathFactory.cpp 609 src/frontends/qt4/GuiPainter.cpp 620 src/insets/InsetLayout.cpp 627 src/frontends/qt4/GuiSpellchecker.cpp 629 src/support/Systemcall.cpp 633 src/support/docstream.cpp 634 src/insets/InsetIPAMacro.cpp 646 src/Counters.cpp 650 src/frontends/qt4/GuiListings.cpp 650 src/insets/Inset.cpp 654 src/insets/InsetCollapsable.cpp 656 src/DocIterator.cpp 658 src/frontends/qt4/GuiExternal.cpp 662 src/support/os_win32.cpp 674 src/factory.cpp 674 src/insets/InsetBox.cpp 677 src/Trans.cpp 689 src/client/client.cpp 690 src/mathed/MathStream.cpp 691 src/support/ForkedCalls.cpp 695 src/FontInfo.cpp 720 src/frontends/qt4/LayoutBox.cpp 727 src/mathed/InsetMathFrac.cpp 753 src/Font.cpp 763 src/frontends/qt4/GuiKeySymbol.cpp 766 src/support/Package.cpp 769 src/frontends/qt4/ButtonPolicy.cpp 769 src/graphics/PreviewLoader.cpp 778 src/frontends/qt4/GuiCitation.cpp 790 src/mathed/InsetMathScript.cpp 796 src/mathed/MathSupport.cpp 817 src/Converter.cpp 829 src/tex2lyx/Parser.cpp 834 src/support/docstring.cpp 841 src/Format.cpp 845 src/frontends/qt4/GuiGraphics.cpp 861 src/insets/InsetExternal.cpp 866 src/Compare.cpp 869 src/insets/InsetIndex.cpp 888 src/insets/InsetSpace.cpp 897 src/insets/InsetListingsParams.cpp 907 src/frontends/qt4/GuiCompleter.cpp 910 src/mathed/MathMacro.cpp 966 src/Lexer.cpp 974 src/Text2.cpp 975 src/mathed/MathData.cpp 1008 src/support/FileName.cpp 1025 src/frontends/qt4/GuiTabular.cpp 1026 src/insets/InsetBibtex.cpp 1046 src/insets/InsetText.cpp 1047 src/output_xhtml.cpp 1069 src/support/filetools.cpp 1092 src/BiblioInfo.cpp 1096 src/rowpainter.cpp 1127 src/tex2lyx/tex2lyx.cpp 1189 src/insets/InsetGraphics.cpp 1191 src/insets/InsetInclude.cpp 1194 src/Encoding.cpp 1216 src/Server.cpp 1262 src/LaTeX.cpp 1282 src/output_latex.cpp 1344 src/CutAndPaste.cpp 1374 src/mathed/MathMacroTemplate.cpp 1416 src/tex2lyx/table.cpp 1445 src/support/lstrings.cpp 1474 src/LyX.cpp 1523 src/Layout.cpp 1526 src/mathed/MathExtern.cpp 1530 src/lyxfind.cpp 1590 src/mathed/InsetMathGrid.cpp 1637 src/TextClass.cpp 1682 src/LaTeXFeatures.cpp 1929 src/tex2lyx/Preamble.cpp 2105 src/frontends/qt4/GuiWorkArea.cpp 2110 src/mathed/MathParser.cpp 2132 src/Text.cpp 2205 src/mathed/InsetMathNest.cpp 2252 src/VCBackend.cpp 2253 src/TextMetrics.cpp 2271 src/mathed/InsetMathHull.cpp 2305 src/frontends/qt4/Menus.cpp 2555 src/Cursor.cpp 2867 src/frontends/qt4/GuiApplication.cpp 3006 src/BufferParams.cpp 3071 src/Text3.cpp 3123 src/BufferView.cpp 3462 src/frontends/qt4/GuiPrefs.cpp 3517 src/LyXRC.cpp 3759 src/LyXAction.cpp 3898 src/frontends/qt4/GuiDocument.cpp 3965 src/Paragraph.cpp 4219 src/frontends/qt4/GuiView.cpp 4763 src/tex2lyx/text.cpp 4803 src/Buffer.cpp 6403 src/insets/InsetTabular.cpp -- Elmar Hinz Freiherr-vom-Stein-Str. 1 33014 Bad Driburg TYPO3 community contact: t.3.e.l.m.a...@.g.m.a.i.l.dot.c.o.m personal contact: e.l.m.a.r.dot.h.i.n...@.g.m.a.i.l.dot.c.o.m