|
wxMaxima
|
Round-trip tests for the .wxmx content.xml (the MathML-like math format). More...
#include <wx/app.h>#include <wx/bitmap.h>#include <wx/dcmemory.h>#include <wx/ffile.h>#include <wx/filename.h>#include <wx/frame.h>#include <wx/log.h>#include <wx/mstream.h>#include <wx/xml/xml.h>#include "Configuration.h"#include "MathParser.h"#include "worksheet/Worksheet.h"#include "cells/CellList.h"#include "cells/GroupCell.h"#include <cstdlib>#include <unistd.h>#include <catch2/catch.hpp>Data Structures | |
| class | TestApp |
Macros | |
| #define | WXM_CORPUS_DIR "." |
| #define | CATCH_CONFIG_RUNNER |
Functions | |
| SCENARIO ("Real content.xml corpus files round-trip to a stable serialization") | |
| SCENARIO ("A folded section's hidden children survive the content.xml round-trip") | |
| SCENARIO ("A folded code cell keeps its computed output across the content.xml round-trip") | |
| wxDECLARE_APP (TestApp) | |
| int | main (int argc, char **argv) |
Round-trip tests for the .wxmx content.xml (the MathML-like math format).
The math cell classes each have a ToXML() and a matching MathParser handler, with various parameters and special cases. This checks that parsing a content.xml into a cell tree and serialising it back is a fixed point: the serialisation of the reparsed tree must equal the first serialisation. If any cell class loses or changes information on parse or serialise, the two differ.
Inputs: the real content.xml corpus (in test/fuzz/corpus_mathparser, exported by actual wxMaxima) for realistic coverage, plus a crafted fragment that exercises the math constructs the corpus happens not to contain (sqrt, integral, sum, matrix, abs, conjugate, sub/superscript) so every ToXML class is covered.