| 30 | } |
| 31 | |
| 32 | static 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 | |
| 48 | std::string pathToString( const std::vector<std::string>& path ) |
| 49 | { |
no test coverage detected