Skip to content
Snippets Groups Projects
Commit eb047ec6 authored by Jan Trávníček's avatar Jan Trávníček
Browse files

gui: fix string related C++20 changes

parent 8608bf20
No related branches found
No related tags found
1 merge request!157C++20 base
......@@ -60,7 +60,8 @@ bool Algorithm::canAddOverload(const Algorithm::Overload& overload) {
}
 
std::string Algorithm::getPrettyName() const {
std::string eps = u8"\u03B5";
std::u8string str = u8"\u03B5";
std::string eps ( str.begin ( ), str.end ( ) );
static std::map<std::string, std::string> prettyNames = {
{"automaton::simplify::SingleInitialState", "Single Initial"},
{"automaton::simplify::EpsilonRemoverIncoming", eps + "-Remove In"},
......
......@@ -41,6 +41,9 @@ TEST_CASE ( "Registry", "[unit][gui][registry]" ) {
auto* algo = Registry::getAlgorithm("automaton::transform::AutomataConcatenationEpsilonTransition");
 
REQUIRE(algo != nullptr);
CHECK(algo->getPrettyName() == u8"\u03B5-Concatenate");
std::u8string name = u8"\u03B5-Concatenate";
std::string expected ( name.begin ( ), name.end ( ) );
CHECK(algo->getPrettyName() == expected );
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment