Skip to content

Commit

Permalink
ensmarten data/index discovery
Browse files Browse the repository at this point in the history
  • Loading branch information
evanchooly committed Jun 23, 2024
1 parent 7feb477 commit 23db876
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ class OperatorExample(

init {
val blocks = findBlocks(input)
dataBlock += blocks.removeWhile { !it.isAction() }
indexBlock = blocks.removeWhile { it.isIndex() }.firstOrNull()
dataBlock += blocks.removeWhile { !it.isAction() && !it.isIndex() }
dataBlock.forEachIndexed { index, block ->
block.type = DATA
if (index != 0) {
block.supplemental = index
}
}
actionBlock = blocks.firstOrNull { it.isAction() }
indexBlock = blocks.firstOrNull { it.isIndex() }
expectedBlock = blocks.firstOrNull { it.isExpected() }

if (dataBlock.isEmpty()) {
Expand Down
4 changes: 2 additions & 2 deletions audits/src/test/kotlin/dev/morphia/audits/QueryAuditTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ class QueryAuditTest : BaseAuditTest() {

@Test
fun testOperator() {
val name = "ne"
val name = "text"
val operator = Operator(FILTER, name)
operator.examples.forEach { it.output(File("target/testOperator-${name}/${it.name}")) }
operator.examples.forEach { it.output(File("target/testOperator/${name}/${it.name}")) }
}
}

0 comments on commit 23db876

Please sign in to comment.