mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-10-17 02:49:19 +02:00
refactor(editor): the self-test runner dispatches its commands to seven groups (scene, bends and lineside, tracks and routes, switches, joining and gizmo, signals, terrain) instead of one function with 95 branches; deletetrack without a name deletes the selected path, which its second, unreachable branch meant to do
This commit is contained in:
@@ -36,6 +36,7 @@ http://mozilla.org/MPL/2.0/.
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
#include <sstream>
|
||||
#include <set>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
@@ -1804,6 +1805,20 @@ class editor_mode : public application_mode, private editor_track::observer
|
||||
bool quitting{false};
|
||||
};
|
||||
selftest m_selftest;
|
||||
enum class selftest_result
|
||||
{
|
||||
unhandled,
|
||||
handled,
|
||||
pause
|
||||
};
|
||||
selftest_result selftest_scene(std::string const &command, std::istringstream &words);
|
||||
selftest_result selftest_sweep(std::string const &command, std::istringstream &words);
|
||||
selftest_result selftest_track(std::string const &command, std::istringstream &words);
|
||||
selftest_result selftest_switch(std::string const &command, std::istringstream &words);
|
||||
selftest_result selftest_join(std::string const &command, std::istringstream &words);
|
||||
selftest_result selftest_signal(std::string const &command, std::istringstream &words);
|
||||
selftest_result selftest_terrain(std::string const &command, std::istringstream &words);
|
||||
selftest_result selftest_dispatch(std::string const &command, std::istringstream &words);
|
||||
void selftest_step();
|
||||
// a value typed during a gesture, taken instead of the one the cursor gives
|
||||
std::string m_typed;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user