Skip to content

Commit

Permalink
fixed compile errors and tests
Browse files Browse the repository at this point in the history
slisson committed Dec 17, 2023
1 parent 620a731 commit c680d81
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -106,7 +106,7 @@ class CodeCompletionTest {
fun noDuplicates() {
val parameters = CodeCompletionParameters(editor, "")
val actions = getSubstituteActions(getNumberLiteralCell())
val knownDuplicates = setOf("none", "", "empty", "[", "it", "|", "ParamRef")
val knownDuplicates = setOf("none", "[", "it", "|", "ParamRef")
val actualDuplicates = actions.groupBy { it.getMatchingText() }.filter { it.value.size > 1 }.map { it.key }
val unexpectedDuplicates = actualDuplicates - knownDuplicates
val missingDuplicates = knownDuplicates - actualDuplicates
2 changes: 1 addition & 1 deletion kernelf-editor/src/jsMain/kotlin/KernelfApiJS.kt
Original file line number Diff line number Diff line change
@@ -58,7 +58,7 @@ object KernelfApiJS {
}

fun renderAndUpdateNodeAsDom(rootNode: INode): HTMLElement {
val editor = JsEditorComponent(KernelfAPI.editorEngine) { state ->
val editor = JsEditorComponent(KernelfAPI.editorEngine, rootNode.getArea()) { state ->
KernelfAPI.editorEngine.createCell(state, rootNode)
}
val branch = ModelFacade.getBranch(rootNode)?.deepUnwrap()
Original file line number Diff line number Diff line change
@@ -37,7 +37,7 @@ open class IncrementalLayoutAfterInsertJS {
val engine = EditorEngine(IncrementalEngine())
KernelfEditor.register(engine)
testSuite = branch.computeRead { branch.getArea().getRoot().allChildren.ofType<N_Module>().models.rootNodes.ofType<N_TestSuite>().first() }
editor = JsEditorComponent(engine, { editorState -> branch.computeRead { engine.createCell(editorState, testSuite.untyped()) } })
editor = JsEditorComponent(engine, branch.getArea(), { editorState -> branch.computeRead { engine.createCell(editorState, testSuite.untyped()) } })
assertTestItem = branch.computeRead { testSuite.descendants<N_AssertTestItem>().drop(1).first() }
editor.selectAfterUpdate {
val cell = editor.resolveNodeCell(assertTestItem)!!.firstLeaf().nextLeafs(true).first { it.isVisible() }

0 comments on commit c680d81

Please sign in to comment.