Skip to content

Commit

Permalink
fix SingleCase case
Browse files Browse the repository at this point in the history
  • Loading branch information
kainino0x committed Aug 10, 2023
1 parent ae9356f commit e91ec9a
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/common/internal/tree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { assert, now } from '../util/util.js';

import { TestFileLoader } from './file_loader.js';
import { TestParamsRW } from './params_utils.js';
import { compareQueries, Ordering } from './query/compare.js';
import { comparePublicParamsPaths, compareQueries, Ordering } from './query/compare.js';
import {
TestQuery,
TestQueryMultiCase,
Expand Down Expand Up @@ -360,6 +360,14 @@ export async function loadTreeForQuery(
for (const c of t.iterate(paramsFilter)) {
// iterate() guarantees c's query is equal to or a subset of queryToLoad.

if (queryToLoad instanceof TestQuerySingleCase) {
// A subset is OK if it's TestQueryMultiCase, but for SingleCase it must match exactly.
const ordering = comparePublicParamsPaths(c.id.params, queryToLoad.params);
if (ordering !== Ordering.Equal) {
continue;
}
}

// Leaf for case is suite:a,b:c,d:x=1;y=2
addLeafForCase(subtreeL2, c, isCollapsible);
foundCase = true;
Expand Down

0 comments on commit e91ec9a

Please sign in to comment.