MCPcopy Create free account
hub / github.com/MeshInspector/MeshLib / findGroup

Function findGroup

source/MRViewer/MRUITestEngineControl.cpp:32–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30}
31
32static const Expected<const TestEngine::GroupEntry *> findGroup( std::span<const std::string> path )
33{
34 const TestEngine::GroupEntry* cur = &TestEngine::getRootEntry();
35 for ( const auto& segment : path )
36 {
37 auto iter = cur->elems.find( segment );
38 if ( iter == cur->elems.end() )
39 return unexpected( fmt::format( "No such entry: `{}`. Known entries are: {}.", segment, listKeys( *cur ) ) );
40 auto ex = iter->second.getAs<TestEngine::GroupEntry>( segment );
41 if (!ex)
42 return unexpected( ex.error() );
43 cur = *ex;
44 }
45 return cur;
46}
47
48std::string pathToString( const std::vector<std::string>& path )
49{

Callers 5

listEntriesFunction · 0.85
listAllEntriesFunction · 0.85
pressButtonFunction · 0.85
readValueFunction · 0.85
writeValueFunction · 0.85

Calls 5

listKeysFunction · 0.85
errorMethod · 0.80
unexpectedFunction · 0.50
findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected