mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-10-21 00:32:39 +02:00
editormodeselftest.cpp keeps the dispatch, the list of the commands and the step; the groups go to
editormodeselftest{scene,sleepers,sweep,track,switch,join,signal,terrain,rails}.cpp, the sleeper commands (beams,
sharedzones, sleepersbg, beamsnear, sleepercheck) in a group of their own; the frame count and one_line shared through
editormodeselftest.h. The output of geomhash, sleepercheck, wings, space, guards, crossings and switches is the same on the
seven sceneries of the regression.
34 lines
679 B
C++
34 lines
679 B
C++
/*
|
|
This Source Code Form is subject to the
|
|
terms of the Mozilla Public License, v.
|
|
2.0. If a copy of the MPL was not
|
|
distributed with this file, You can
|
|
obtain one at
|
|
http://mozilla.org/MPL/2.0/.
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <algorithm>
|
|
#include <cstddef>
|
|
#include <string>
|
|
|
|
// what the groups of the self-test commands share, each group in a file of its own
|
|
namespace editor_selftest
|
|
{
|
|
|
|
// frames gone through the selftest, for the measurements of perf
|
|
inline std::size_t &frames()
|
|
{
|
|
static std::size_t count{0};
|
|
return count;
|
|
}
|
|
|
|
inline std::string one_line(std::string Text)
|
|
{
|
|
std::replace(Text.begin(), Text.end(), '\n', ';');
|
|
return Text;
|
|
}
|
|
|
|
} // namespace editor_selftest
|