diff --git a/src/iindexer.cc b/src/iindexer.cc index 6ba382a8..7b8673d1 100644 --- a/src/iindexer.cc +++ b/src/iindexer.cc @@ -52,8 +52,12 @@ struct TestIndexer : IIndexer { const std::vector& file_contents, PerformanceImportFile* perf) { auto it = indexes.find(file); - if (it == indexes.end()) + if (it == indexes.end()) { + // Don't return any indexes for unexpected data. + assert(false && "no indexes"); return {}; + } + // FIXME: allow user to control how many times we return the index for a // specific file (atm it is always 1) auto result = std::move(it->second);