wxMaxima
Loading...
Searching...
No Matches
Data Structures | Macros | Functions
test_Troubleshooting.cpp File Reference

Tests the troubleshooting checks (GH #2559). More...

#include "TroubleshootingChecks.h"
#include "TroubleshootingRunner.h"
#include "wxMathml.h"
#include <wx/app.h>
#include <wx/evtloop.h>
#include <wx/filename.h>
#include <wx/init.h>
#include <wx/log.h>
#include <wx/socket.h>
#include <wx/stdpaths.h>
#include <wx/time.h>
#include <wx/utils.h>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <map>
#include <set>
#include <string>
#include <vector>
#include <catch2/catch.hpp>
Include dependency graph for test_Troubleshooting.cpp:

Data Structures

class  TestApp
 

Functions

 SCENARIO ("Every check has a title, and the report names them all")
 
 SCENARIO ("The checks are grouped into sections, each summed up by its worst result")
 
 SCENARIO ("A probe answer is only read from a complete line of its own")
 
 SCENARIO ("The small checks on paths, files and gnuplot's messages")
 
 SCENARIO ("A Maxima program that doesn't exist")
 
 SCENARIO ("A Maxima that ends at once")
 
 SCENARIO ("A Maxima that never connects")
 
 SCENARIO ("A Maxima that connects but never prompts")
 
 SCENARIO ("Something that connects with a wrong secret")
 
 SCENARIO ("A Maxima with no auth= line whose wxMathML.lisp doesn't load")
 
 SCENARIO ("A Maxima that answers every question")
 
 SCENARIO ("The checks pass with a working Maxima", "[.maxima]")
 
int main (int argc, char **argv)
 

Detailed Description

Tests the troubleshooting checks (GH #2559).

The helpers that interpret what a check found are tested directly. The runner, which starts a Maxima and talks to it, is tested against this very executable playing Maxima's part: started with –fake-maxima=<how> it misbehaves the way a broken Maxima installation can (exits at once, never connects, never prompts, sends a wrong secret), or answers the runner's questions the way a working Maxima would. No Maxima needs to be installed for that, so these tests run everywhere unit tests do.

The scenarios tagged [.maxima] run the checks against a real Maxima instead, named by the environment variable WXM_MAXIMA; test/CMakeLists.txt runs them as a test of their own wherever Maxima is installed. They are what notices if wxMathML.lisp or Maxima itself changes in a way the checks don't understand any more.