diff --git a/src/test/java/org/jetbrains/plugins/ideavim/NeovimTesting.kt b/src/test/java/org/jetbrains/plugins/ideavim/NeovimTesting.kt index 7c899c41d..bc0600232 100644 --- a/src/test/java/org/jetbrains/plugins/ideavim/NeovimTesting.kt +++ b/src/test/java/org/jetbrains/plugins/ideavim/NeovimTesting.kt @@ -14,7 +14,6 @@ import com.ensarsarajcic.neovim.java.api.types.api.VimCoords import com.ensarsarajcic.neovim.java.corerpc.client.ProcessRpcConnection import com.intellij.openapi.editor.Editor import com.intellij.openapi.editor.LogicalPosition -import com.intellij.util.containers.toArray import com.maddyhome.idea.vim.VimPlugin import com.maddyhome.idea.vim.command.SelectionType import com.maddyhome.idea.vim.common.CharacterPosition @@ -31,7 +30,6 @@ import com.maddyhome.idea.vim.register.RegisterConstants.LAST_SEARCH_REGISTER import com.maddyhome.idea.vim.register.RegisterConstants.VALID_REGISTERS import org.junit.Assert.assertEquals import org.junit.jupiter.api.TestInfo -import org.junit.jupiter.params.provider.Arguments internal object NeovimTesting { private lateinit var neovimApi: NeovimApi diff --git a/src/test/java/org/jetbrains/plugins/ideavim/action/ChangeNumberActionTest.kt b/src/test/java/org/jetbrains/plugins/ideavim/action/ChangeNumberActionTest.kt index 6f261e57a..106286478 100644 --- a/src/test/java/org/jetbrains/plugins/ideavim/action/ChangeNumberActionTest.kt +++ b/src/test/java/org/jetbrains/plugins/ideavim/action/ChangeNumberActionTest.kt @@ -10,9 +10,9 @@ package org.jetbrains.plugins.ideavim.action import com.google.common.collect.Lists import com.maddyhome.idea.vim.command.VimStateMachine import com.maddyhome.idea.vim.options.OptionConstants -import org.jetbrains.plugins.ideavim.impl.VimOption -import org.jetbrains.plugins.ideavim.impl.OptionTest import org.jetbrains.plugins.ideavim.VimTestCase +import org.jetbrains.plugins.ideavim.impl.OptionTest +import org.jetbrains.plugins.ideavim.impl.VimOption import org.junit.jupiter.api.Test class ChangeNumberActionTest : VimTestCase() { diff --git a/src/test/java/org/jetbrains/plugins/ideavim/action/SpecialRegistersTest.kt b/src/test/java/org/jetbrains/plugins/ideavim/action/SpecialRegistersTest.kt index 2800ccefb..044b1e4ca 100644 --- a/src/test/java/org/jetbrains/plugins/ideavim/action/SpecialRegistersTest.kt +++ b/src/test/java/org/jetbrains/plugins/ideavim/action/SpecialRegistersTest.kt @@ -13,7 +13,6 @@ import com.maddyhome.idea.vim.register.RegisterConstants.LAST_INSERTED_TEXT_REGI import com.maddyhome.idea.vim.register.RegisterConstants.LAST_SEARCH_REGISTER import com.maddyhome.idea.vim.register.RegisterConstants.SMALL_DELETION_REGISTER import org.jetbrains.plugins.ideavim.VimTestCase -import org.junit.Assert import org.junit.jupiter.api.BeforeEach import org.junit.jupiter.api.Test import org.junit.jupiter.api.TestInfo @@ -200,7 +199,7 @@ class SpecialRegistersTest : VimTestCase() { private fun assertRegisterChanged(registerName: Char) { val registerText = getRegisterText(registerName) - Assert.assertNotEquals(DUMMY_TEXT, registerText) + assertNotEquals(DUMMY_TEXT, registerText) } private fun assertRegisterNotChanged(registerName: Char) { diff --git a/src/test/java/org/jetbrains/plugins/ideavim/action/change/delete/DeleteJoinLinesSpacesActionTest.kt b/src/test/java/org/jetbrains/plugins/ideavim/action/change/delete/DeleteJoinLinesSpacesActionTest.kt index 350186bcd..89ba7a3d4 100644 --- a/src/test/java/org/jetbrains/plugins/ideavim/action/change/delete/DeleteJoinLinesSpacesActionTest.kt +++ b/src/test/java/org/jetbrains/plugins/ideavim/action/change/delete/DeleteJoinLinesSpacesActionTest.kt @@ -10,12 +10,12 @@ package org.jetbrains.plugins.ideavim.action.change.delete import com.maddyhome.idea.vim.command.VimStateMachine import com.maddyhome.idea.vim.group.IjOptionConstants -import org.jetbrains.plugins.ideavim.impl.VimOption -import org.jetbrains.plugins.ideavim.impl.OptionTest import org.jetbrains.plugins.ideavim.SkipNeovimReason import org.jetbrains.plugins.ideavim.TestWithoutNeovim -import org.jetbrains.plugins.ideavim.impl.TraceOptions import org.jetbrains.plugins.ideavim.VimTestCase +import org.jetbrains.plugins.ideavim.impl.OptionTest +import org.jetbrains.plugins.ideavim.impl.TraceOptions +import org.jetbrains.plugins.ideavim.impl.VimOption @TraceOptions class DeleteJoinLinesSpacesActionTest : VimTestCase() { diff --git a/src/test/java/org/jetbrains/plugins/ideavim/action/change/delete/DeleteJoinVisualLinesSpacesActionTest.kt b/src/test/java/org/jetbrains/plugins/ideavim/action/change/delete/DeleteJoinVisualLinesSpacesActionTest.kt index 4b09bde5b..7be8fd41a 100644 --- a/src/test/java/org/jetbrains/plugins/ideavim/action/change/delete/DeleteJoinVisualLinesSpacesActionTest.kt +++ b/src/test/java/org/jetbrains/plugins/ideavim/action/change/delete/DeleteJoinVisualLinesSpacesActionTest.kt @@ -10,12 +10,12 @@ package org.jetbrains.plugins.ideavim.action.change.delete import com.maddyhome.idea.vim.command.VimStateMachine import com.maddyhome.idea.vim.group.IjOptionConstants -import org.jetbrains.plugins.ideavim.impl.VimOption -import org.jetbrains.plugins.ideavim.impl.OptionTest import org.jetbrains.plugins.ideavim.SkipNeovimReason import org.jetbrains.plugins.ideavim.TestWithoutNeovim -import org.jetbrains.plugins.ideavim.impl.TraceOptions import org.jetbrains.plugins.ideavim.VimTestCase +import org.jetbrains.plugins.ideavim.impl.OptionTest +import org.jetbrains.plugins.ideavim.impl.TraceOptions +import org.jetbrains.plugins.ideavim.impl.VimOption @TraceOptions class DeleteJoinVisualLinesSpacesActionTest : VimTestCase() { diff --git a/src/test/java/org/jetbrains/plugins/ideavim/action/change/delete/DeleteVisualLinesEndActionTest.kt b/src/test/java/org/jetbrains/plugins/ideavim/action/change/delete/DeleteVisualLinesEndActionTest.kt index 2c4a0150e..acccce25a 100644 --- a/src/test/java/org/jetbrains/plugins/ideavim/action/change/delete/DeleteVisualLinesEndActionTest.kt +++ b/src/test/java/org/jetbrains/plugins/ideavim/action/change/delete/DeleteVisualLinesEndActionTest.kt @@ -12,12 +12,12 @@ package org.jetbrains.plugins.ideavim.action.change.delete import com.maddyhome.idea.vim.command.VimStateMachine import com.maddyhome.idea.vim.options.OptionConstants -import org.jetbrains.plugins.ideavim.impl.VimOption -import org.jetbrains.plugins.ideavim.impl.OptionTest import org.jetbrains.plugins.ideavim.SkipNeovimReason import org.jetbrains.plugins.ideavim.TestWithoutNeovim -import org.jetbrains.plugins.ideavim.impl.TraceOptions import org.jetbrains.plugins.ideavim.VimTestCase +import org.jetbrains.plugins.ideavim.impl.OptionTest +import org.jetbrains.plugins.ideavim.impl.TraceOptions +import org.jetbrains.plugins.ideavim.impl.VimOption @TraceOptions(OptionConstants.virtualedit) class DeleteVisualLinesEndActionTest : VimTestCase() { @@ -659,7 +659,8 @@ class DeleteVisualLinesEndActionTest : VimTestCase() { } @TestWithoutNeovim(SkipNeovimReason.OPTION) - @OptionTest(VimOption(OptionConstants.virtualedit, limitedValues = [OptionConstants.virtualedit_onemore])) fun `test change dollar`() { + @OptionTest(VimOption(OptionConstants.virtualedit, limitedValues = [OptionConstants.virtualedit_onemore])) + fun `test change dollar`() { doTest( "c$", """ diff --git a/src/test/java/org/jetbrains/plugins/ideavim/action/change/delete/JoinNotificationTest.kt b/src/test/java/org/jetbrains/plugins/ideavim/action/change/delete/JoinNotificationTest.kt index 7318a773e..ac853c595 100644 --- a/src/test/java/org/jetbrains/plugins/ideavim/action/change/delete/JoinNotificationTest.kt +++ b/src/test/java/org/jetbrains/plugins/ideavim/action/change/delete/JoinNotificationTest.kt @@ -16,10 +16,10 @@ import com.maddyhome.idea.vim.VimPlugin import com.maddyhome.idea.vim.api.injector import com.maddyhome.idea.vim.group.IjOptionConstants import com.maddyhome.idea.vim.group.NotificationService -import org.jetbrains.plugins.ideavim.impl.VimOption +import org.jetbrains.plugins.ideavim.VimTestCase import org.jetbrains.plugins.ideavim.impl.OptionTest import org.jetbrains.plugins.ideavim.impl.TraceOptions -import org.jetbrains.plugins.ideavim.VimTestCase +import org.jetbrains.plugins.ideavim.impl.VimOption /** * @author Alex Plate diff --git a/src/test/java/org/jetbrains/plugins/ideavim/action/copy/IdeaPutNotificationsTest.kt b/src/test/java/org/jetbrains/plugins/ideavim/action/copy/IdeaPutNotificationsTest.kt index 45a8c1d36..86c90a2e8 100644 --- a/src/test/java/org/jetbrains/plugins/ideavim/action/copy/IdeaPutNotificationsTest.kt +++ b/src/test/java/org/jetbrains/plugins/ideavim/action/copy/IdeaPutNotificationsTest.kt @@ -16,10 +16,10 @@ import com.maddyhome.idea.vim.command.SelectionType import com.maddyhome.idea.vim.group.NotificationService import com.maddyhome.idea.vim.newapi.vim import com.maddyhome.idea.vim.options.OptionConstants -import org.jetbrains.plugins.ideavim.impl.VimOption +import org.jetbrains.plugins.ideavim.VimTestCase import org.jetbrains.plugins.ideavim.impl.OptionTest import org.jetbrains.plugins.ideavim.impl.TraceOptions -import org.jetbrains.plugins.ideavim.VimTestCase +import org.jetbrains.plugins.ideavim.impl.VimOption import org.jetbrains.plugins.ideavim.rangeOf @TraceOptions(OptionConstants.clipboard) diff --git a/src/test/java/org/jetbrains/plugins/ideavim/action/copy/YankAndPutTest.kt b/src/test/java/org/jetbrains/plugins/ideavim/action/copy/YankAndPutTest.kt index cd24814d9..b1beea01a 100644 --- a/src/test/java/org/jetbrains/plugins/ideavim/action/copy/YankAndPutTest.kt +++ b/src/test/java/org/jetbrains/plugins/ideavim/action/copy/YankAndPutTest.kt @@ -10,10 +10,10 @@ package org.jetbrains.plugins.ideavim.action.copy import com.maddyhome.idea.vim.api.injector import com.maddyhome.idea.vim.options.OptionConstants -import org.jetbrains.plugins.ideavim.impl.VimOption +import org.jetbrains.plugins.ideavim.VimTestCase import org.jetbrains.plugins.ideavim.impl.OptionTest import org.jetbrains.plugins.ideavim.impl.TraceOptions -import org.jetbrains.plugins.ideavim.VimTestCase +import org.jetbrains.plugins.ideavim.impl.VimOption @TraceOptions(OptionConstants.clipboard) class YankAndPutTest : VimTestCase() { diff --git a/src/test/java/org/jetbrains/plugins/ideavim/action/motion/leftright/MotionArrowLeftActionTest.kt b/src/test/java/org/jetbrains/plugins/ideavim/action/motion/leftright/MotionArrowLeftActionTest.kt index 3d93121b2..70571bbd3 100644 --- a/src/test/java/org/jetbrains/plugins/ideavim/action/motion/leftright/MotionArrowLeftActionTest.kt +++ b/src/test/java/org/jetbrains/plugins/ideavim/action/motion/leftright/MotionArrowLeftActionTest.kt @@ -13,12 +13,12 @@ package org.jetbrains.plugins.ideavim.action.motion.leftright import com.maddyhome.idea.vim.api.injector import com.maddyhome.idea.vim.command.VimStateMachine import com.maddyhome.idea.vim.options.OptionConstants -import org.jetbrains.plugins.ideavim.impl.VimOption -import org.jetbrains.plugins.ideavim.impl.OptionTest import org.jetbrains.plugins.ideavim.SkipNeovimReason import org.jetbrains.plugins.ideavim.TestWithoutNeovim -import org.jetbrains.plugins.ideavim.impl.TraceOptions import org.jetbrains.plugins.ideavim.VimTestCase +import org.jetbrains.plugins.ideavim.impl.OptionTest +import org.jetbrains.plugins.ideavim.impl.TraceOptions +import org.jetbrains.plugins.ideavim.impl.VimOption @TraceOptions(OptionConstants.keymodel) class MotionArrowLeftActionTest : VimTestCase() { diff --git a/src/test/java/org/jetbrains/plugins/ideavim/action/motion/leftright/MotionArrowRightActionTest.kt b/src/test/java/org/jetbrains/plugins/ideavim/action/motion/leftright/MotionArrowRightActionTest.kt index 8c70dbfc9..ab068ed47 100644 --- a/src/test/java/org/jetbrains/plugins/ideavim/action/motion/leftright/MotionArrowRightActionTest.kt +++ b/src/test/java/org/jetbrains/plugins/ideavim/action/motion/leftright/MotionArrowRightActionTest.kt @@ -13,12 +13,12 @@ package org.jetbrains.plugins.ideavim.action.motion.leftright import com.maddyhome.idea.vim.api.injector import com.maddyhome.idea.vim.command.VimStateMachine import com.maddyhome.idea.vim.options.OptionConstants -import org.jetbrains.plugins.ideavim.impl.VimOption -import org.jetbrains.plugins.ideavim.impl.OptionTest import org.jetbrains.plugins.ideavim.SkipNeovimReason import org.jetbrains.plugins.ideavim.TestWithoutNeovim -import org.jetbrains.plugins.ideavim.impl.TraceOptions import org.jetbrains.plugins.ideavim.VimTestCase +import org.jetbrains.plugins.ideavim.impl.OptionTest +import org.jetbrains.plugins.ideavim.impl.TraceOptions +import org.jetbrains.plugins.ideavim.impl.VimOption @TraceOptions(OptionConstants.keymodel) class MotionArrowRightActionTest : VimTestCase() { @@ -236,8 +236,8 @@ class MotionArrowRightActionTest : VimTestCase() { } @TestWithoutNeovim(SkipNeovimReason.OPTION) -@OptionTest(VimOption(OptionConstants.keymodel, limitedValues = [OptionConstants.keymodel_stopselect])) - fun `test visual stopselect`() { + @OptionTest(VimOption(OptionConstants.keymodel, limitedValues = [OptionConstants.keymodel_stopselect])) + fun `test visual stopselect`() { doTest( listOf("v", "<Right>"), """ diff --git a/src/test/java/org/jetbrains/plugins/ideavim/action/motion/leftright/MotionEndActionTest.kt b/src/test/java/org/jetbrains/plugins/ideavim/action/motion/leftright/MotionEndActionTest.kt index 0d6d44d67..07747715d 100644 --- a/src/test/java/org/jetbrains/plugins/ideavim/action/motion/leftright/MotionEndActionTest.kt +++ b/src/test/java/org/jetbrains/plugins/ideavim/action/motion/leftright/MotionEndActionTest.kt @@ -12,12 +12,12 @@ package org.jetbrains.plugins.ideavim.action.motion.leftright import com.maddyhome.idea.vim.command.VimStateMachine import com.maddyhome.idea.vim.options.OptionConstants -import org.jetbrains.plugins.ideavim.impl.VimOption -import org.jetbrains.plugins.ideavim.impl.OptionTest import org.jetbrains.plugins.ideavim.SkipNeovimReason import org.jetbrains.plugins.ideavim.TestWithoutNeovim -import org.jetbrains.plugins.ideavim.impl.TraceOptions import org.jetbrains.plugins.ideavim.VimTestCase +import org.jetbrains.plugins.ideavim.impl.OptionTest +import org.jetbrains.plugins.ideavim.impl.TraceOptions +import org.jetbrains.plugins.ideavim.impl.VimOption @TraceOptions(OptionConstants.keymodel) class MotionEndActionTest : VimTestCase() { @@ -45,7 +45,7 @@ class MotionEndActionTest : VimTestCase() { } @TestWithoutNeovim(SkipNeovimReason.OPTION) -@OptionTest(VimOption(OptionConstants.keymodel, limitedValues = [""])) + @OptionTest(VimOption(OptionConstants.keymodel, limitedValues = [""])) fun `test continue visual`() { val keys = listOf("v", "<End>") val before = """ @@ -68,7 +68,7 @@ class MotionEndActionTest : VimTestCase() { } @TestWithoutNeovim(SkipNeovimReason.OPTION) -@OptionTest(VimOption(OptionConstants.keymodel, limitedValues = [""])) + @OptionTest(VimOption(OptionConstants.keymodel, limitedValues = [""])) fun `test continue select`() { val keys = listOf("gh", "<End>") val before = """ @@ -91,7 +91,8 @@ class MotionEndActionTest : VimTestCase() { } @TestWithoutNeovim(SkipNeovimReason.OPTION) - @OptionTest(VimOption(OptionConstants.keymodel, limitedValues = [OptionConstants.keymodel_stopvisual])) fun `test exit visual`() { + @OptionTest(VimOption(OptionConstants.keymodel, limitedValues = [OptionConstants.keymodel_stopvisual])) + fun `test exit visual`() { val keys = listOf("v", "<End>") val before = """ A Discovery @@ -113,7 +114,7 @@ class MotionEndActionTest : VimTestCase() { } @TestWithoutNeovim(SkipNeovimReason.OPTION) -@OptionTest(VimOption(OptionConstants.keymodel, limitedValues = [OptionConstants.keymodel_stopselect])) + @OptionTest(VimOption(OptionConstants.keymodel, limitedValues = [OptionConstants.keymodel_stopselect])) fun `test exit select`() { val keys = listOf("gh", "<End>") val before = """ diff --git a/src/test/java/org/jetbrains/plugins/ideavim/action/motion/leftright/MotionHomeActionTest.kt b/src/test/java/org/jetbrains/plugins/ideavim/action/motion/leftright/MotionHomeActionTest.kt index e46c2c9e0..2f4bd2460 100644 --- a/src/test/java/org/jetbrains/plugins/ideavim/action/motion/leftright/MotionHomeActionTest.kt +++ b/src/test/java/org/jetbrains/plugins/ideavim/action/motion/leftright/MotionHomeActionTest.kt @@ -12,12 +12,12 @@ package org.jetbrains.plugins.ideavim.action.motion.leftright import com.maddyhome.idea.vim.command.VimStateMachine import com.maddyhome.idea.vim.options.OptionConstants -import org.jetbrains.plugins.ideavim.impl.VimOption -import org.jetbrains.plugins.ideavim.impl.OptionTest import org.jetbrains.plugins.ideavim.SkipNeovimReason import org.jetbrains.plugins.ideavim.TestWithoutNeovim -import org.jetbrains.plugins.ideavim.impl.TraceOptions import org.jetbrains.plugins.ideavim.VimTestCase +import org.jetbrains.plugins.ideavim.impl.OptionTest +import org.jetbrains.plugins.ideavim.impl.TraceOptions +import org.jetbrains.plugins.ideavim.impl.VimOption @TraceOptions(OptionConstants.keymodel) class MotionHomeActionTest : VimTestCase() { @@ -51,7 +51,7 @@ class MotionHomeActionTest : VimTestCase() { } @TestWithoutNeovim(SkipNeovimReason.OPTION) -@OptionTest(VimOption(OptionConstants.keymodel, limitedValues = [""])) + @OptionTest(VimOption(OptionConstants.keymodel, limitedValues = [""])) fun `test continue visual`() { val keys = listOf("v", "<Home>") val before = """ @@ -74,7 +74,7 @@ class MotionHomeActionTest : VimTestCase() { } @TestWithoutNeovim(SkipNeovimReason.OPTION) -@OptionTest(VimOption(OptionConstants.keymodel, limitedValues = [""])) + @OptionTest(VimOption(OptionConstants.keymodel, limitedValues = [""])) fun `test continue select`() { val keys = listOf("gh", "<Home>") val before = """ @@ -97,7 +97,8 @@ class MotionHomeActionTest : VimTestCase() { } @TestWithoutNeovim(SkipNeovimReason.OPTION) - @OptionTest(VimOption(OptionConstants.keymodel, limitedValues = [OptionConstants.keymodel_stopvisual])) fun `test exit visual`() { + @OptionTest(VimOption(OptionConstants.keymodel, limitedValues = [OptionConstants.keymodel_stopvisual])) + fun `test exit visual`() { val keys = listOf("v", "<Home>") val before = """ A Discovery @@ -119,7 +120,7 @@ class MotionHomeActionTest : VimTestCase() { } @TestWithoutNeovim(SkipNeovimReason.OPTION) -@OptionTest(VimOption(OptionConstants.keymodel, limitedValues = [OptionConstants.keymodel_stopselect])) + @OptionTest(VimOption(OptionConstants.keymodel, limitedValues = [OptionConstants.keymodel_stopselect])) fun `test exit select`() { val keys = listOf("gh", "<Home>") val before = """ diff --git a/src/test/java/org/jetbrains/plugins/ideavim/action/motion/leftright/MotionRightActionTest.kt b/src/test/java/org/jetbrains/plugins/ideavim/action/motion/leftright/MotionRightActionTest.kt index dc2be2d8d..bfb279dd8 100644 --- a/src/test/java/org/jetbrains/plugins/ideavim/action/motion/leftright/MotionRightActionTest.kt +++ b/src/test/java/org/jetbrains/plugins/ideavim/action/motion/leftright/MotionRightActionTest.kt @@ -12,17 +12,17 @@ package org.jetbrains.plugins.ideavim.action.motion.leftright import com.maddyhome.idea.vim.command.VimStateMachine import com.maddyhome.idea.vim.options.OptionConstants -import org.jetbrains.plugins.ideavim.impl.VimOption -import org.jetbrains.plugins.ideavim.impl.OptionTest import org.jetbrains.plugins.ideavim.SkipNeovimReason import org.jetbrains.plugins.ideavim.TestWithoutNeovim -import org.jetbrains.plugins.ideavim.impl.TraceOptions import org.jetbrains.plugins.ideavim.VimTestCase +import org.jetbrains.plugins.ideavim.impl.OptionTest +import org.jetbrains.plugins.ideavim.impl.TraceOptions +import org.jetbrains.plugins.ideavim.impl.VimOption @TraceOptions(OptionConstants.virtualedit) class MotionRightActionTest : VimTestCase() { @OptionTest(VimOption(OptionConstants.virtualedit, doesntAffectTest = true)) - fun `test simple motion`() { + fun `test simple motion`() { doTest( "l", """ @@ -47,7 +47,7 @@ class MotionRightActionTest : VimTestCase() { } @OptionTest(VimOption(OptionConstants.virtualedit, doesntAffectTest = true)) - fun `test simple motion with repeat`() { + fun `test simple motion with repeat`() { doTest( "3l", """ @@ -72,7 +72,7 @@ class MotionRightActionTest : VimTestCase() { } @OptionTest(VimOption(OptionConstants.virtualedit, doesntAffectTest = true)) - fun `test simple motion to the end`() { + fun `test simple motion to the end`() { doTest( "3l", """ @@ -97,7 +97,8 @@ class MotionRightActionTest : VimTestCase() { } @TestWithoutNeovim(SkipNeovimReason.OPTION) - @OptionTest(VimOption(OptionConstants.virtualedit, limitedValues = [OptionConstants.virtualedit_onemore])) fun `test virtual edit motion to the end`() { + @OptionTest(VimOption(OptionConstants.virtualedit, limitedValues = [OptionConstants.virtualedit_onemore])) + fun `test virtual edit motion to the end`() { doTest( "3l", """ @@ -116,7 +117,8 @@ class MotionRightActionTest : VimTestCase() { } @TestWithoutNeovim(SkipNeovimReason.OPTION) - @OptionTest(VimOption(OptionConstants.virtualedit, limitedValues = [OptionConstants.virtualedit_onemore])) fun `test virtual edit motion after dollar`() { + @OptionTest(VimOption(OptionConstants.virtualedit, limitedValues = [OptionConstants.virtualedit_onemore])) + fun `test virtual edit motion after dollar`() { doTest( "\$l", """ @@ -136,7 +138,7 @@ class MotionRightActionTest : VimTestCase() { @TestWithoutNeovim(SkipNeovimReason.NON_ASCII) @OptionTest(VimOption(OptionConstants.virtualedit, doesntAffectTest = true)) - fun `test simple motion non-ascii`() { + fun `test simple motion non-ascii`() { doTest( "l", """ @@ -162,7 +164,7 @@ class MotionRightActionTest : VimTestCase() { @TestWithoutNeovim(SkipNeovimReason.NON_ASCII) @OptionTest(VimOption(OptionConstants.virtualedit, doesntAffectTest = true)) - fun `test simple motion emoji`() { + fun `test simple motion emoji`() { doTest( "l", """ @@ -188,7 +190,7 @@ class MotionRightActionTest : VimTestCase() { @TestWithoutNeovim(SkipNeovimReason.NON_ASCII) @OptionTest(VimOption(OptionConstants.virtualedit, doesntAffectTest = true)) - fun `test simple motion czech`() { + fun `test simple motion czech`() { doTest( "l", """ @@ -213,7 +215,7 @@ class MotionRightActionTest : VimTestCase() { } @OptionTest(VimOption(OptionConstants.virtualedit, doesntAffectTest = true)) - fun `test simple motion tab`() { + fun `test simple motion tab`() { doTest( "l", """ @@ -238,7 +240,7 @@ class MotionRightActionTest : VimTestCase() { } @OptionTest(VimOption(OptionConstants.virtualedit, doesntAffectTest = true)) - fun `test char visual mode`() { + fun `test char visual mode`() { doTest( listOf("v", "ll"), """ @@ -263,7 +265,7 @@ class MotionRightActionTest : VimTestCase() { } @OptionTest(VimOption(OptionConstants.virtualedit, doesntAffectTest = true)) - fun `test block visual mode`() { + fun `test block visual mode`() { doTest( listOf("<C-V>", "ll"), """ @@ -289,7 +291,7 @@ class MotionRightActionTest : VimTestCase() { @TestWithoutNeovim(SkipNeovimReason.OPTION) @OptionTest(VimOption(OptionConstants.virtualedit, doesntAffectTest = true)) - fun `test whichwrap in the same line`() { + fun `test whichwrap in the same line`() { doTest( listOf("l"), """ @@ -305,7 +307,7 @@ class MotionRightActionTest : VimTestCase() { @TestWithoutNeovim(SkipNeovimReason.OPTION) @OptionTest(VimOption(OptionConstants.virtualedit, doesntAffectTest = true)) - fun `test whichwrap at file end`() { + fun `test whichwrap at file end`() { doTest( listOf("l"), """ @@ -321,7 +323,7 @@ class MotionRightActionTest : VimTestCase() { @TestWithoutNeovim(SkipNeovimReason.OPTION) @OptionTest(VimOption(OptionConstants.virtualedit, doesntAffectTest = true)) - fun `test whichwrap to next line`() { + fun `test whichwrap to next line`() { doTest( listOf("l"), """ @@ -339,7 +341,7 @@ class MotionRightActionTest : VimTestCase() { @TestWithoutNeovim(SkipNeovimReason.OPTION) @OptionTest(VimOption(OptionConstants.virtualedit, doesntAffectTest = true)) - fun `test from empty line to empty line`() { + fun `test from empty line to empty line`() { doTest( listOf("l"), """ @@ -361,7 +363,7 @@ class MotionRightActionTest : VimTestCase() { @TestWithoutNeovim(SkipNeovimReason.OPTION) @OptionTest(VimOption(OptionConstants.virtualedit, doesntAffectTest = true)) - fun `test d command with whichwrap`() { + fun `test d command with whichwrap`() { doTest( listOf("dl"), """ diff --git a/src/test/java/org/jetbrains/plugins/ideavim/action/motion/leftright/MotionShiftEndActionTest.kt b/src/test/java/org/jetbrains/plugins/ideavim/action/motion/leftright/MotionShiftEndActionTest.kt index aeb26cf56..ab9cd50c1 100644 --- a/src/test/java/org/jetbrains/plugins/ideavim/action/motion/leftright/MotionShiftEndActionTest.kt +++ b/src/test/java/org/jetbrains/plugins/ideavim/action/motion/leftright/MotionShiftEndActionTest.kt @@ -50,8 +50,8 @@ class MotionShiftEndActionTest : VimTestCase() { @TestWithoutNeovim(SkipNeovimReason.OPTION) @OptionTest( - VimOption(OptionConstants.keymodel, limitedValues = [OptionConstants.keymodel_startsel]), - VimOption(OptionConstants.selectmode, limitedValues = [""]), + VimOption(OptionConstants.keymodel, limitedValues = [OptionConstants.keymodel_startsel]), + VimOption(OptionConstants.selectmode, limitedValues = [""]), ) fun `test start visual`() { val keys = listOf("<S-End>") @@ -76,8 +76,8 @@ class MotionShiftEndActionTest : VimTestCase() { @TestWithoutNeovim(SkipNeovimReason.OPTION) @OptionTest( - VimOption(OptionConstants.keymodel, limitedValues = [OptionConstants.keymodel_startsel]), - VimOption(OptionConstants.selectmode, limitedValues = [OptionConstants.selectmode_key]), + VimOption(OptionConstants.keymodel, limitedValues = [OptionConstants.keymodel_startsel]), + VimOption(OptionConstants.selectmode, limitedValues = [OptionConstants.selectmode_key]), ) fun `test start select`() { val keys = listOf("<S-End>") @@ -101,8 +101,8 @@ class MotionShiftEndActionTest : VimTestCase() { } @OptionTest( - VimOption(OptionConstants.keymodel, limitedValues = [""]), - VimOption(OptionConstants.selectmode, limitedValues = [""]), + VimOption(OptionConstants.keymodel, limitedValues = [""]), + VimOption(OptionConstants.selectmode, limitedValues = [""]), ) @TestWithoutNeovim(SkipNeovimReason.OPTION) fun `test continue visual`() { @@ -131,8 +131,8 @@ class MotionShiftEndActionTest : VimTestCase() { } @OptionTest( - VimOption(OptionConstants.keymodel, limitedValues = [""]), - VimOption(OptionConstants.selectmode, limitedValues = [""]), + VimOption(OptionConstants.keymodel, limitedValues = [""]), + VimOption(OptionConstants.selectmode, limitedValues = [""]), ) @TestWithoutNeovim(SkipNeovimReason.OPTION) fun `test continue select`() { diff --git a/src/test/java/org/jetbrains/plugins/ideavim/action/motion/leftright/MotionShiftHomeActionTest.kt b/src/test/java/org/jetbrains/plugins/ideavim/action/motion/leftright/MotionShiftHomeActionTest.kt index a60eefe76..601213004 100644 --- a/src/test/java/org/jetbrains/plugins/ideavim/action/motion/leftright/MotionShiftHomeActionTest.kt +++ b/src/test/java/org/jetbrains/plugins/ideavim/action/motion/leftright/MotionShiftHomeActionTest.kt @@ -13,12 +13,12 @@ package org.jetbrains.plugins.ideavim.action.motion.leftright import com.maddyhome.idea.vim.api.injector import com.maddyhome.idea.vim.command.VimStateMachine import com.maddyhome.idea.vim.options.OptionConstants -import org.jetbrains.plugins.ideavim.impl.VimOption -import org.jetbrains.plugins.ideavim.impl.OptionTest import org.jetbrains.plugins.ideavim.SkipNeovimReason import org.jetbrains.plugins.ideavim.TestWithoutNeovim -import org.jetbrains.plugins.ideavim.impl.TraceOptions import org.jetbrains.plugins.ideavim.VimTestCase +import org.jetbrains.plugins.ideavim.impl.OptionTest +import org.jetbrains.plugins.ideavim.impl.TraceOptions +import org.jetbrains.plugins.ideavim.impl.VimOption @TraceOptions(OptionConstants.keymodel, OptionConstants.selectmode) class MotionShiftHomeActionTest : VimTestCase() { @@ -59,8 +59,8 @@ class MotionShiftHomeActionTest : VimTestCase() { @TestWithoutNeovim(SkipNeovimReason.OPTION) @OptionTest( - VimOption(OptionConstants.keymodel, limitedValues = [OptionConstants.keymodel_startsel]), - VimOption(OptionConstants.selectmode, limitedValues = [""]), + VimOption(OptionConstants.keymodel, limitedValues = [OptionConstants.keymodel_startsel]), + VimOption(OptionConstants.selectmode, limitedValues = [""]), ) fun `test start visual`() { val keys = listOf("<S-Home>") @@ -85,8 +85,8 @@ class MotionShiftHomeActionTest : VimTestCase() { @TestWithoutNeovim(SkipNeovimReason.OPTION) @OptionTest( - VimOption(OptionConstants.keymodel, limitedValues = [OptionConstants.keymodel_startsel]), - VimOption(OptionConstants.selectmode, limitedValues = [OptionConstants.selectmode_key]), + VimOption(OptionConstants.keymodel, limitedValues = [OptionConstants.keymodel_startsel]), + VimOption(OptionConstants.selectmode, limitedValues = [OptionConstants.selectmode_key]), ) fun `test start select`() { val keys = listOf("<S-Home>") @@ -110,8 +110,8 @@ class MotionShiftHomeActionTest : VimTestCase() { } @OptionTest( - VimOption(OptionConstants.keymodel, limitedValues = [""]), - VimOption(OptionConstants.selectmode, limitedValues = [""]), + VimOption(OptionConstants.keymodel, limitedValues = [""]), + VimOption(OptionConstants.selectmode, limitedValues = [""]), ) @TestWithoutNeovim(SkipNeovimReason.OPTION) fun `test continue visual`() { @@ -140,8 +140,8 @@ class MotionShiftHomeActionTest : VimTestCase() { } @OptionTest( - VimOption(OptionConstants.keymodel, limitedValues = [""]), - VimOption(OptionConstants.selectmode, limitedValues = [""]), + VimOption(OptionConstants.keymodel, limitedValues = [""]), + VimOption(OptionConstants.selectmode, limitedValues = [""]), ) @TestWithoutNeovim(SkipNeovimReason.OPTION) fun `test continue select`() { diff --git a/src/test/java/org/jetbrains/plugins/ideavim/action/motion/leftright/MotionShiftLeftActionHandlerTest.kt b/src/test/java/org/jetbrains/plugins/ideavim/action/motion/leftright/MotionShiftLeftActionHandlerTest.kt index e0b6dfdde..be2f7dcad 100644 --- a/src/test/java/org/jetbrains/plugins/ideavim/action/motion/leftright/MotionShiftLeftActionHandlerTest.kt +++ b/src/test/java/org/jetbrains/plugins/ideavim/action/motion/leftright/MotionShiftLeftActionHandlerTest.kt @@ -12,21 +12,21 @@ package org.jetbrains.plugins.ideavim.action.motion.leftright import com.maddyhome.idea.vim.command.VimStateMachine import com.maddyhome.idea.vim.options.OptionConstants -import org.jetbrains.plugins.ideavim.impl.VimOption -import org.jetbrains.plugins.ideavim.impl.OptionTest import org.jetbrains.plugins.ideavim.SkipNeovimReason import org.jetbrains.plugins.ideavim.TestWithoutNeovim -import org.jetbrains.plugins.ideavim.impl.TraceOptions import org.jetbrains.plugins.ideavim.VimTestCase +import org.jetbrains.plugins.ideavim.impl.OptionTest +import org.jetbrains.plugins.ideavim.impl.TraceOptions +import org.jetbrains.plugins.ideavim.impl.VimOption @TraceOptions(OptionConstants.keymodel, OptionConstants.selectmode) class MotionShiftLeftActionHandlerTest : VimTestCase() { @TestWithoutNeovim(SkipNeovimReason.OPTION) @OptionTest( - VimOption(OptionConstants.keymodel, limitedValues = [OptionConstants.keymodel_startsel]), - VimOption(OptionConstants.selectmode, limitedValues = [""]), + VimOption(OptionConstants.keymodel, limitedValues = [OptionConstants.keymodel_startsel]), + VimOption(OptionConstants.selectmode, limitedValues = [""]), ) - fun `test visual left`() { + fun `test visual left`() { doTest( listOf("<S-Left>"), """ @@ -52,10 +52,10 @@ class MotionShiftLeftActionHandlerTest : VimTestCase() { @TestWithoutNeovim(SkipNeovimReason.OPTION) @OptionTest( - VimOption(OptionConstants.keymodel, limitedValues = [OptionConstants.keymodel_startsel]), - VimOption(OptionConstants.selectmode, limitedValues = [""]), + VimOption(OptionConstants.keymodel, limitedValues = [OptionConstants.keymodel_startsel]), + VimOption(OptionConstants.selectmode, limitedValues = [""]), ) - fun `test visual left twice`() { + fun `test visual left twice`() { doTest( listOf("<S-Left><S-Left>"), """ @@ -81,10 +81,10 @@ class MotionShiftLeftActionHandlerTest : VimTestCase() { @TestWithoutNeovim(SkipNeovimReason.OPTION) @OptionTest( - VimOption(OptionConstants.keymodel, limitedValues = [OptionConstants.keymodel_startsel]), - VimOption(OptionConstants.selectmode, limitedValues = [OptionConstants.selectmode_key]), + VimOption(OptionConstants.keymodel, limitedValues = [OptionConstants.keymodel_startsel]), + VimOption(OptionConstants.selectmode, limitedValues = [OptionConstants.selectmode_key]), ) - fun `test select left`() { + fun `test select left`() { doTest( listOf("<S-Left>"), """ @@ -110,10 +110,10 @@ class MotionShiftLeftActionHandlerTest : VimTestCase() { @TestWithoutNeovim(SkipNeovimReason.OPTION) @OptionTest( - VimOption(OptionConstants.keymodel, limitedValues = [OptionConstants.keymodel_startsel]), - VimOption(OptionConstants.selectmode, limitedValues = [OptionConstants.selectmode_key]), + VimOption(OptionConstants.keymodel, limitedValues = [OptionConstants.keymodel_startsel]), + VimOption(OptionConstants.selectmode, limitedValues = [OptionConstants.selectmode_key]), ) - fun `test select left twice`() { + fun `test select left twice`() { doTest( listOf("<S-Left><S-Left>"), """ @@ -140,9 +140,9 @@ class MotionShiftLeftActionHandlerTest : VimTestCase() { @TestWithoutNeovim(SkipNeovimReason.OPTION) @OptionTest( VimOption(OptionConstants.keymodel, limitedValues = [OptionConstants.keymodel_continueselect]), - VimOption(OptionConstants.selectmode, limitedValues = [""]), + VimOption(OptionConstants.selectmode, limitedValues = [""]), ) - fun `test simple motion char mode`() { + fun `test simple motion char mode`() { doTest( listOf("gh", "<S-Left>"), """ @@ -169,9 +169,9 @@ class MotionShiftLeftActionHandlerTest : VimTestCase() { @TestWithoutNeovim(SkipNeovimReason.OPTION) @OptionTest( VimOption(OptionConstants.keymodel, limitedValues = [OptionConstants.keymodel_continueselect]), - VimOption(OptionConstants.selectmode, limitedValues = [""]), + VimOption(OptionConstants.selectmode, limitedValues = [""]), ) - fun `test double motion char mode`() { + fun `test double motion char mode`() { doTest( listOf("gh", "<S-Left>".repeat(2)), """ @@ -198,9 +198,9 @@ class MotionShiftLeftActionHandlerTest : VimTestCase() { @TestWithoutNeovim(SkipNeovimReason.OPTION) @OptionTest( VimOption(OptionConstants.keymodel, limitedValues = [OptionConstants.keymodel_continueselect]), - VimOption(OptionConstants.selectmode, limitedValues = [""]), + VimOption(OptionConstants.selectmode, limitedValues = [""]), ) - fun `test at line start char mode`() { + fun `test at line start char mode`() { doTest( listOf("gh", "<S-Left>".repeat(2)), """ @@ -227,9 +227,9 @@ class MotionShiftLeftActionHandlerTest : VimTestCase() { @TestWithoutNeovim(SkipNeovimReason.OPTION) @OptionTest( VimOption(OptionConstants.keymodel, limitedValues = [OptionConstants.keymodel_continueselect]), - VimOption(OptionConstants.selectmode, limitedValues = [""]), + VimOption(OptionConstants.selectmode, limitedValues = [""]), ) - fun `test at file start char mode`() { + fun `test at file start char mode`() { doTest( listOf("gh", "<S-Left>".repeat(2)), """ @@ -256,9 +256,9 @@ class MotionShiftLeftActionHandlerTest : VimTestCase() { @TestWithoutNeovim(SkipNeovimReason.OPTION) @OptionTest( VimOption(OptionConstants.keymodel, limitedValues = [OptionConstants.keymodel_continueselect]), - VimOption(OptionConstants.selectmode, limitedValues = [""]), + VimOption(OptionConstants.selectmode, limitedValues = [""]), ) - fun `test char mode multicaret`() { + fun `test char mode multicaret`() { doTest( listOf("gh", "<S-Left>".repeat(2)), """ @@ -285,9 +285,9 @@ class MotionShiftLeftActionHandlerTest : VimTestCase() { @TestWithoutNeovim(SkipNeovimReason.OPTION) @OptionTest( VimOption(OptionConstants.keymodel, limitedValues = [OptionConstants.keymodel_continueselect]), - VimOption(OptionConstants.selectmode, limitedValues = [""]), + VimOption(OptionConstants.selectmode, limitedValues = [""]), ) - fun `test simple motion line mode`() { + fun `test simple motion line mode`() { doTest( listOf("gH", "<S-Left>"), """ @@ -314,9 +314,9 @@ class MotionShiftLeftActionHandlerTest : VimTestCase() { @TestWithoutNeovim(SkipNeovimReason.OPTION) @OptionTest( VimOption(OptionConstants.keymodel, limitedValues = [OptionConstants.keymodel_continueselect]), - VimOption(OptionConstants.selectmode, limitedValues = [""]), + VimOption(OptionConstants.selectmode, limitedValues = [""]), ) - fun `test to line start line mode`() { + fun `test to line start line mode`() { doTest( listOf("gH", "<S-Left>".repeat(5)), """ @@ -343,9 +343,9 @@ class MotionShiftLeftActionHandlerTest : VimTestCase() { @TestWithoutNeovim(SkipNeovimReason.OPTION) @OptionTest( VimOption(OptionConstants.keymodel, limitedValues = [OptionConstants.keymodel_continueselect]), - VimOption(OptionConstants.selectmode, limitedValues = [""]), + VimOption(OptionConstants.selectmode, limitedValues = [""]), ) - fun `test to file start line mode`() { + fun `test to file start line mode`() { doTest( listOf("gH", "<S-Left>".repeat(5)), """ @@ -372,9 +372,9 @@ class MotionShiftLeftActionHandlerTest : VimTestCase() { @TestWithoutNeovim(SkipNeovimReason.OPTION) @OptionTest( VimOption(OptionConstants.keymodel, limitedValues = [OptionConstants.keymodel_continueselect]), - VimOption(OptionConstants.selectmode, limitedValues = [""]), + VimOption(OptionConstants.selectmode, limitedValues = [""]), ) - fun `test line mode multicaret`() { + fun `test line mode multicaret`() { doTest( listOf("gH", "<S-Left>".repeat(5)), """ @@ -401,9 +401,9 @@ class MotionShiftLeftActionHandlerTest : VimTestCase() { @TestWithoutNeovim(SkipNeovimReason.OPTION) @OptionTest( VimOption(OptionConstants.keymodel, limitedValues = [OptionConstants.keymodel_continueselect]), - VimOption(OptionConstants.selectmode, limitedValues = [""]), + VimOption(OptionConstants.selectmode, limitedValues = [""]), ) - fun `test simple motion block mode`() { + fun `test simple motion block mode`() { doTest( listOf("g<C-H>", "<S-Left>"), """ @@ -430,9 +430,9 @@ class MotionShiftLeftActionHandlerTest : VimTestCase() { @TestWithoutNeovim(SkipNeovimReason.OPTION) @OptionTest( VimOption(OptionConstants.keymodel, limitedValues = [OptionConstants.keymodel_continueselect]), - VimOption(OptionConstants.selectmode, limitedValues = [""]), + VimOption(OptionConstants.selectmode, limitedValues = [""]), ) - fun `test twice motion block mode`() { + fun `test twice motion block mode`() { doTest( listOf("g<C-H>", "<S-Left>".repeat(2)), """ @@ -459,9 +459,9 @@ class MotionShiftLeftActionHandlerTest : VimTestCase() { @TestWithoutNeovim(SkipNeovimReason.OPTION) @OptionTest( VimOption(OptionConstants.keymodel, limitedValues = [OptionConstants.keymodel_continueselect]), - VimOption(OptionConstants.selectmode, limitedValues = [""]), + VimOption(OptionConstants.selectmode, limitedValues = [""]), ) - fun `test at line start block mode`() { + fun `test at line start block mode`() { doTest( listOf("g<C-H>", "<S-Left>".repeat(2)), """ @@ -488,9 +488,9 @@ class MotionShiftLeftActionHandlerTest : VimTestCase() { @TestWithoutNeovim(SkipNeovimReason.OPTION) @OptionTest( VimOption(OptionConstants.keymodel, limitedValues = [OptionConstants.keymodel_continueselect]), - VimOption(OptionConstants.selectmode, limitedValues = [""]), + VimOption(OptionConstants.selectmode, limitedValues = [""]), ) - fun `test at file start block mode`() { + fun `test at file start block mode`() { doTest( listOf("g<C-H>", "<S-Left>".repeat(2)), """ @@ -517,9 +517,9 @@ class MotionShiftLeftActionHandlerTest : VimTestCase() { @TestWithoutNeovim(SkipNeovimReason.OPTION) @OptionTest( VimOption(OptionConstants.keymodel, limitedValues = [OptionConstants.keymodel_continueselect]), - VimOption(OptionConstants.selectmode, limitedValues = [""]), + VimOption(OptionConstants.selectmode, limitedValues = [""]), ) - fun `test multiline with empty line block mode`() { + fun `test multiline with empty line block mode`() { doTest( listOf("g<C-H>", "<S-Down>", "<S-Left>".repeat(2)), """ @@ -547,9 +547,9 @@ class MotionShiftLeftActionHandlerTest : VimTestCase() { @TestWithoutNeovim(SkipNeovimReason.OPTION) @OptionTest( VimOption(OptionConstants.keymodel, limitedValues = [OptionConstants.keymodel_continueselect]), - VimOption(OptionConstants.selectmode, limitedValues = [""]), + VimOption(OptionConstants.selectmode, limitedValues = [""]), ) - fun `test multiline block mode`() { + fun `test multiline block mode`() { doTest( listOf("g<C-H>", "<S-Down>".repeat(2), "<S-Left>".repeat(3)), """ @@ -577,9 +577,9 @@ class MotionShiftLeftActionHandlerTest : VimTestCase() { @TestWithoutNeovim(SkipNeovimReason.OPTION) @OptionTest( VimOption(OptionConstants.keymodel, limitedValues = [OptionConstants.keymodel_continuevisual]), - VimOption(OptionConstants.selectmode, limitedValues = [""]), + VimOption(OptionConstants.selectmode, limitedValues = [""]), ) - fun `test continuevisual`() { + fun `test continuevisual`() { doTest( listOf("v", "<S-Left>".repeat(3)), """ @@ -605,10 +605,10 @@ class MotionShiftLeftActionHandlerTest : VimTestCase() { @TestWithoutNeovim(SkipNeovimReason.OPTION) @OptionTest( - VimOption(OptionConstants.keymodel, limitedValues = [""]), - VimOption(OptionConstants.selectmode, limitedValues = [""]), + VimOption(OptionConstants.keymodel, limitedValues = [""]), + VimOption(OptionConstants.selectmode, limitedValues = [""]), ) - fun `test no continueselect`() { + fun `test no continueselect`() { doTest( listOf("gh", "<S-Left>".repeat(3)), """ @@ -634,10 +634,10 @@ class MotionShiftLeftActionHandlerTest : VimTestCase() { @TestWithoutNeovim(SkipNeovimReason.OPTION) @OptionTest( - VimOption(OptionConstants.keymodel, limitedValues = [""]), - VimOption(OptionConstants.selectmode, limitedValues = [""]), + VimOption(OptionConstants.keymodel, limitedValues = [""]), + VimOption(OptionConstants.selectmode, limitedValues = [""]), ) - fun `test no continuevisual`() { + fun `test no continuevisual`() { doTest( listOf("v", "<S-Left>".repeat(3)), """ diff --git a/src/test/java/org/jetbrains/plugins/ideavim/action/motion/leftright/MotionShiftRightActionHandlerTest.kt b/src/test/java/org/jetbrains/plugins/ideavim/action/motion/leftright/MotionShiftRightActionHandlerTest.kt index 21a19c1d2..e5eaf820d 100644 --- a/src/test/java/org/jetbrains/plugins/ideavim/action/motion/leftright/MotionShiftRightActionHandlerTest.kt +++ b/src/test/java/org/jetbrains/plugins/ideavim/action/motion/leftright/MotionShiftRightActionHandlerTest.kt @@ -12,12 +12,12 @@ package org.jetbrains.plugins.ideavim.action.motion.leftright import com.maddyhome.idea.vim.command.VimStateMachine import com.maddyhome.idea.vim.options.OptionConstants -import org.jetbrains.plugins.ideavim.impl.VimOption -import org.jetbrains.plugins.ideavim.impl.OptionTest import org.jetbrains.plugins.ideavim.SkipNeovimReason import org.jetbrains.plugins.ideavim.TestWithoutNeovim -import org.jetbrains.plugins.ideavim.impl.TraceOptions import org.jetbrains.plugins.ideavim.VimTestCase +import org.jetbrains.plugins.ideavim.impl.OptionTest +import org.jetbrains.plugins.ideavim.impl.TraceOptions +import org.jetbrains.plugins.ideavim.impl.VimOption @TraceOptions(OptionConstants.keymodel, OptionConstants.selectmode) class MotionShiftRightActionHandlerTest : VimTestCase() { diff --git a/src/test/java/org/jetbrains/plugins/ideavim/action/motion/mark/MotionMarkActionTest.kt b/src/test/java/org/jetbrains/plugins/ideavim/action/motion/mark/MotionMarkActionTest.kt index c4e75a1ae..a94b3dc73 100644 --- a/src/test/java/org/jetbrains/plugins/ideavim/action/motion/mark/MotionMarkActionTest.kt +++ b/src/test/java/org/jetbrains/plugins/ideavim/action/motion/mark/MotionMarkActionTest.kt @@ -15,14 +15,15 @@ import com.maddyhome.idea.vim.api.injector import com.maddyhome.idea.vim.group.IjOptionConstants import com.maddyhome.idea.vim.group.createLineBookmark import com.maddyhome.idea.vim.group.mnemonic -import org.jetbrains.plugins.ideavim.impl.VimOption +import org.jetbrains.plugins.ideavim.VimTestCase import org.jetbrains.plugins.ideavim.impl.OptionTest import org.jetbrains.plugins.ideavim.impl.TraceOptions -import org.jetbrains.plugins.ideavim.VimTestCase +import org.jetbrains.plugins.ideavim.impl.VimOption @TraceOptions(IjOptionConstants.ideamarks) class MotionMarkActionTest : VimTestCase() { - @OptionTest(VimOption(IjOptionConstants.ideamarks, limitedValues = ["true"])) fun `test simple add mark`() { + @OptionTest(VimOption(IjOptionConstants.ideamarks, limitedValues = ["true"])) + fun `test simple add mark`() { val keys = injector.parser.parseKeys("mA") val text = """ A Discovery @@ -37,7 +38,8 @@ class MotionMarkActionTest : VimTestCase() { checkMarks('A' to 2) } - @OptionTest(VimOption(IjOptionConstants.ideamarks, limitedValues = ["true"])) fun `test simple add multiple marks`() { + @OptionTest(VimOption(IjOptionConstants.ideamarks, limitedValues = ["true"])) + fun `test simple add multiple marks`() { val keys = injector.parser.parseKeys("mAj" + "mBj" + "mC") val text = """ A Discovery @@ -52,7 +54,8 @@ class MotionMarkActionTest : VimTestCase() { checkMarks('A' to 2, 'B' to 3, 'C' to 4) } - @OptionTest(VimOption(IjOptionConstants.ideamarks, limitedValues = ["true"])) fun `test simple add multiple marks on same line`() { + @OptionTest(VimOption(IjOptionConstants.ideamarks, limitedValues = ["true"])) + fun `test simple add multiple marks on same line`() { val keys = injector.parser.parseKeys("mA" + "mB" + "mC") val text = """ A Discovery @@ -70,7 +73,8 @@ class MotionMarkActionTest : VimTestCase() { // checkMarks('A' to 2, 'B' to 2, 'C' to 2) } - @OptionTest(VimOption(IjOptionConstants.ideamarks, limitedValues = ["true"])) fun `test move to another line`() { + @OptionTest(VimOption(IjOptionConstants.ideamarks, limitedValues = ["true"])) + fun `test move to another line`() { val keys = injector.parser.parseKeys("mAjj" + "mA") val text = """ A Discovery @@ -85,7 +89,8 @@ class MotionMarkActionTest : VimTestCase() { checkMarks('A' to 4) } - @OptionTest(VimOption(IjOptionConstants.ideamarks, limitedValues = ["true"])) fun `test simple system mark`() { + @OptionTest(VimOption(IjOptionConstants.ideamarks, limitedValues = ["true"])) + fun `test simple system mark`() { val text = """ A Discovery @@ -102,7 +107,8 @@ class MotionMarkActionTest : VimTestCase() { kotlin.test.assertEquals('A', vimMarks.first().key) } - @OptionTest(VimOption(IjOptionConstants.ideamarks, limitedValues = ["true"])) fun `test system mark move to another line`() { + @OptionTest(VimOption(IjOptionConstants.ideamarks, limitedValues = ["true"])) + fun `test system mark move to another line`() { val text = """ A Discovery diff --git a/src/test/java/org/jetbrains/plugins/ideavim/action/motion/select/motion/SelectMotionLeftActionTest.kt b/src/test/java/org/jetbrains/plugins/ideavim/action/motion/select/motion/SelectMotionLeftActionTest.kt index 3e0eba184..7b7cbb140 100644 --- a/src/test/java/org/jetbrains/plugins/ideavim/action/motion/select/motion/SelectMotionLeftActionTest.kt +++ b/src/test/java/org/jetbrains/plugins/ideavim/action/motion/select/motion/SelectMotionLeftActionTest.kt @@ -12,12 +12,12 @@ package org.jetbrains.plugins.ideavim.action.motion.select.motion import com.maddyhome.idea.vim.command.VimStateMachine import com.maddyhome.idea.vim.options.OptionConstants -import org.jetbrains.plugins.ideavim.impl.VimOption -import org.jetbrains.plugins.ideavim.impl.OptionTest import org.jetbrains.plugins.ideavim.SkipNeovimReason import org.jetbrains.plugins.ideavim.TestWithoutNeovim -import org.jetbrains.plugins.ideavim.impl.TraceOptions import org.jetbrains.plugins.ideavim.VimTestCase +import org.jetbrains.plugins.ideavim.impl.OptionTest +import org.jetbrains.plugins.ideavim.impl.TraceOptions +import org.jetbrains.plugins.ideavim.impl.VimOption @TraceOptions(OptionConstants.keymodel) class SelectMotionLeftActionTest : VimTestCase() { diff --git a/src/test/java/org/jetbrains/plugins/ideavim/action/motion/select/motion/SelectMotionRightActionTest.kt b/src/test/java/org/jetbrains/plugins/ideavim/action/motion/select/motion/SelectMotionRightActionTest.kt index 9781adf6b..5c0703060 100644 --- a/src/test/java/org/jetbrains/plugins/ideavim/action/motion/select/motion/SelectMotionRightActionTest.kt +++ b/src/test/java/org/jetbrains/plugins/ideavim/action/motion/select/motion/SelectMotionRightActionTest.kt @@ -12,12 +12,12 @@ package org.jetbrains.plugins.ideavim.action.motion.select.motion import com.maddyhome.idea.vim.command.VimStateMachine import com.maddyhome.idea.vim.options.OptionConstants -import org.jetbrains.plugins.ideavim.impl.VimOption -import org.jetbrains.plugins.ideavim.impl.OptionTest import org.jetbrains.plugins.ideavim.SkipNeovimReason import org.jetbrains.plugins.ideavim.TestWithoutNeovim -import org.jetbrains.plugins.ideavim.impl.TraceOptions import org.jetbrains.plugins.ideavim.VimTestCase +import org.jetbrains.plugins.ideavim.impl.OptionTest +import org.jetbrains.plugins.ideavim.impl.TraceOptions +import org.jetbrains.plugins.ideavim.impl.VimOption @TraceOptions(OptionConstants.keymodel) class SelectMotionRightActionTest : VimTestCase() { diff --git a/src/test/java/org/jetbrains/plugins/ideavim/action/motion/updown/MotionArrowDownActionTest.kt b/src/test/java/org/jetbrains/plugins/ideavim/action/motion/updown/MotionArrowDownActionTest.kt index ce019752f..f4a984128 100644 --- a/src/test/java/org/jetbrains/plugins/ideavim/action/motion/updown/MotionArrowDownActionTest.kt +++ b/src/test/java/org/jetbrains/plugins/ideavim/action/motion/updown/MotionArrowDownActionTest.kt @@ -12,12 +12,12 @@ package org.jetbrains.plugins.ideavim.action.motion.updown import com.maddyhome.idea.vim.command.VimStateMachine import com.maddyhome.idea.vim.options.OptionConstants -import org.jetbrains.plugins.ideavim.impl.VimOption -import org.jetbrains.plugins.ideavim.impl.OptionTest import org.jetbrains.plugins.ideavim.SkipNeovimReason import org.jetbrains.plugins.ideavim.TestWithoutNeovim -import org.jetbrains.plugins.ideavim.impl.TraceOptions import org.jetbrains.plugins.ideavim.VimTestCase +import org.jetbrains.plugins.ideavim.impl.OptionTest +import org.jetbrains.plugins.ideavim.impl.TraceOptions +import org.jetbrains.plugins.ideavim.impl.VimOption @TraceOptions(OptionConstants.keymodel, OptionConstants.virtualedit) class MotionArrowDownActionTest : VimTestCase() { diff --git a/src/test/java/org/jetbrains/plugins/ideavim/action/motion/updown/MotionArrowUpActionTest.kt b/src/test/java/org/jetbrains/plugins/ideavim/action/motion/updown/MotionArrowUpActionTest.kt index dcc37e584..1463ab8a9 100644 --- a/src/test/java/org/jetbrains/plugins/ideavim/action/motion/updown/MotionArrowUpActionTest.kt +++ b/src/test/java/org/jetbrains/plugins/ideavim/action/motion/updown/MotionArrowUpActionTest.kt @@ -12,12 +12,12 @@ package org.jetbrains.plugins.ideavim.action.motion.updown import com.maddyhome.idea.vim.command.VimStateMachine import com.maddyhome.idea.vim.options.OptionConstants -import org.jetbrains.plugins.ideavim.impl.VimOption -import org.jetbrains.plugins.ideavim.impl.OptionTest import org.jetbrains.plugins.ideavim.SkipNeovimReason import org.jetbrains.plugins.ideavim.TestWithoutNeovim -import org.jetbrains.plugins.ideavim.impl.TraceOptions import org.jetbrains.plugins.ideavim.VimTestCase +import org.jetbrains.plugins.ideavim.impl.OptionTest +import org.jetbrains.plugins.ideavim.impl.TraceOptions +import org.jetbrains.plugins.ideavim.impl.VimOption @TraceOptions(OptionConstants.keymodel) class MotionArrowUpActionTest : VimTestCase() { diff --git a/src/test/java/org/jetbrains/plugins/ideavim/action/motion/updown/MotionShiftDownActionHandlerTest.kt b/src/test/java/org/jetbrains/plugins/ideavim/action/motion/updown/MotionShiftDownActionHandlerTest.kt index 4e1d072e6..60eb6a5b4 100644 --- a/src/test/java/org/jetbrains/plugins/ideavim/action/motion/updown/MotionShiftDownActionHandlerTest.kt +++ b/src/test/java/org/jetbrains/plugins/ideavim/action/motion/updown/MotionShiftDownActionHandlerTest.kt @@ -12,12 +12,12 @@ package org.jetbrains.plugins.ideavim.action.motion.updown import com.maddyhome.idea.vim.command.VimStateMachine import com.maddyhome.idea.vim.options.OptionConstants -import org.jetbrains.plugins.ideavim.impl.VimOption -import org.jetbrains.plugins.ideavim.impl.OptionTest import org.jetbrains.plugins.ideavim.SkipNeovimReason import org.jetbrains.plugins.ideavim.TestWithoutNeovim -import org.jetbrains.plugins.ideavim.impl.TraceOptions import org.jetbrains.plugins.ideavim.VimTestCase +import org.jetbrains.plugins.ideavim.impl.OptionTest +import org.jetbrains.plugins.ideavim.impl.TraceOptions +import org.jetbrains.plugins.ideavim.impl.VimOption @TraceOptions(OptionConstants.keymodel, OptionConstants.selectmode) class MotionShiftDownActionHandlerTest : VimTestCase() { diff --git a/src/test/java/org/jetbrains/plugins/ideavim/action/motion/updown/MotionShiftUpActionHandlerTest.kt b/src/test/java/org/jetbrains/plugins/ideavim/action/motion/updown/MotionShiftUpActionHandlerTest.kt index 1071a4c1c..a94641ad7 100644 --- a/src/test/java/org/jetbrains/plugins/ideavim/action/motion/updown/MotionShiftUpActionHandlerTest.kt +++ b/src/test/java/org/jetbrains/plugins/ideavim/action/motion/updown/MotionShiftUpActionHandlerTest.kt @@ -12,12 +12,12 @@ package org.jetbrains.plugins.ideavim.action.motion.updown import com.maddyhome.idea.vim.command.VimStateMachine import com.maddyhome.idea.vim.options.OptionConstants -import org.jetbrains.plugins.ideavim.impl.VimOption -import org.jetbrains.plugins.ideavim.impl.OptionTest import org.jetbrains.plugins.ideavim.SkipNeovimReason import org.jetbrains.plugins.ideavim.TestWithoutNeovim -import org.jetbrains.plugins.ideavim.impl.TraceOptions import org.jetbrains.plugins.ideavim.VimTestCase +import org.jetbrains.plugins.ideavim.impl.OptionTest +import org.jetbrains.plugins.ideavim.impl.TraceOptions +import org.jetbrains.plugins.ideavim.impl.VimOption @TraceOptions(OptionConstants.selectmode, OptionConstants.keymodel) class MotionShiftUpActionHandlerTest : VimTestCase() { diff --git a/src/test/java/org/jetbrains/plugins/ideavim/action/scroll/ScrollFirstScreenColumnActionTest.kt b/src/test/java/org/jetbrains/plugins/ideavim/action/scroll/ScrollFirstScreenColumnActionTest.kt index 05854c498..f94049886 100644 --- a/src/test/java/org/jetbrains/plugins/ideavim/action/scroll/ScrollFirstScreenColumnActionTest.kt +++ b/src/test/java/org/jetbrains/plugins/ideavim/action/scroll/ScrollFirstScreenColumnActionTest.kt @@ -12,7 +12,6 @@ import com.intellij.openapi.editor.Inlay import com.maddyhome.idea.vim.helper.EditorHelper import com.maddyhome.idea.vim.helper.VimBehaviorDiffers import org.jetbrains.plugins.ideavim.VimTestCase -import org.junit.Assert import org.junit.jupiter.api.Test import kotlin.math.roundToInt @@ -74,7 +73,7 @@ class ScrollFirstScreenColumnActionTest : VimTestCase() { // The first visible text column will be 99, with the inlay positioned to the left of it assertVisibleLineBounds(0, 99, 99 + availableColumns - 1) - Assert.assertEquals(visibleArea.x, inlay.bounds!!.x) + assertEquals(visibleArea.x, inlay.bounds!!.x) } @Test diff --git a/src/test/java/org/jetbrains/plugins/ideavim/action/scroll/ScrollLastScreenColumnActionTest.kt b/src/test/java/org/jetbrains/plugins/ideavim/action/scroll/ScrollLastScreenColumnActionTest.kt index 7b70b48d1..405abc9c4 100644 --- a/src/test/java/org/jetbrains/plugins/ideavim/action/scroll/ScrollLastScreenColumnActionTest.kt +++ b/src/test/java/org/jetbrains/plugins/ideavim/action/scroll/ScrollLastScreenColumnActionTest.kt @@ -11,7 +11,6 @@ package org.jetbrains.plugins.ideavim.action.scroll import com.intellij.openapi.editor.Inlay import com.maddyhome.idea.vim.helper.EditorHelper import org.jetbrains.plugins.ideavim.VimTestCase -import org.junit.Assert import org.junit.jupiter.api.Test import kotlin.math.roundToInt @@ -112,8 +111,8 @@ class ScrollLastScreenColumnActionTest : VimTestCase() { // We have to assert the location of the inlay val inlayX = fixture.editor.visualPositionToPoint2D(inlay.visualPosition).x.roundToInt() - Assert.assertEquals(visibleArea.x + textWidth, inlayX) - Assert.assertEquals(visibleArea.x + visibleArea.width, inlayX + inlay.widthInPixels) + assertEquals(visibleArea.x + textWidth, inlayX) + assertEquals(visibleArea.x + visibleArea.width, inlayX + inlay.widthInPixels) } @Test diff --git a/src/test/java/org/jetbrains/plugins/ideavim/ex/implementation/commands/SubstituteCommandTest.kt b/src/test/java/org/jetbrains/plugins/ideavim/ex/implementation/commands/SubstituteCommandTest.kt index 6dc3d2c3a..0fead76f0 100644 --- a/src/test/java/org/jetbrains/plugins/ideavim/ex/implementation/commands/SubstituteCommandTest.kt +++ b/src/test/java/org/jetbrains/plugins/ideavim/ex/implementation/commands/SubstituteCommandTest.kt @@ -11,12 +11,12 @@ package org.jetbrains.plugins.ideavim.ex.implementation.commands import com.maddyhome.idea.vim.api.injector import com.maddyhome.idea.vim.helper.VimBehaviorDiffers import com.maddyhome.idea.vim.options.OptionConstants -import org.jetbrains.plugins.ideavim.impl.VimOption -import org.jetbrains.plugins.ideavim.impl.OptionTest import org.jetbrains.plugins.ideavim.SkipNeovimReason import org.jetbrains.plugins.ideavim.TestWithoutNeovim -import org.jetbrains.plugins.ideavim.impl.TraceOptions import org.jetbrains.plugins.ideavim.VimTestCase +import org.jetbrains.plugins.ideavim.impl.OptionTest +import org.jetbrains.plugins.ideavim.impl.TraceOptions +import org.jetbrains.plugins.ideavim.impl.VimOption import org.junit.jupiter.api.Disabled /** diff --git a/src/test/java/org/jetbrains/plugins/ideavim/extension/exchange/VimExchangeWithClipboardTest.kt b/src/test/java/org/jetbrains/plugins/ideavim/extension/exchange/VimExchangeWithClipboardTest.kt index ea4fe8a06..6c76802b2 100644 --- a/src/test/java/org/jetbrains/plugins/ideavim/extension/exchange/VimExchangeWithClipboardTest.kt +++ b/src/test/java/org/jetbrains/plugins/ideavim/extension/exchange/VimExchangeWithClipboardTest.kt @@ -14,10 +14,10 @@ import com.maddyhome.idea.vim.command.VimStateMachine import com.maddyhome.idea.vim.extension.exchange.VimExchangeExtension import com.maddyhome.idea.vim.helper.VimBehaviorDiffers import com.maddyhome.idea.vim.options.OptionConstants -import org.jetbrains.plugins.ideavim.impl.VimOption +import org.jetbrains.plugins.ideavim.VimTestCase import org.jetbrains.plugins.ideavim.impl.OptionTest import org.jetbrains.plugins.ideavim.impl.TraceOptions -import org.jetbrains.plugins.ideavim.VimTestCase +import org.jetbrains.plugins.ideavim.impl.VimOption import org.junit.jupiter.api.BeforeEach import org.junit.jupiter.api.TestInfo diff --git a/src/test/java/org/jetbrains/plugins/ideavim/group/SearchGroupTest.kt b/src/test/java/org/jetbrains/plugins/ideavim/group/SearchGroupTest.kt index 54943fd3c..74d6866f2 100644 --- a/src/test/java/org/jetbrains/plugins/ideavim/group/SearchGroupTest.kt +++ b/src/test/java/org/jetbrains/plugins/ideavim/group/SearchGroupTest.kt @@ -135,7 +135,7 @@ class SearchGroupTest : VimTestCase() { "\\c[ABC]b", "${c}dd\n", ) - kotlin.test.assertEquals(-1, pos) + assertEquals(-1, pos) } // VIM-856 @@ -146,7 +146,7 @@ class SearchGroupTest : VimTestCase() { "a\\@<!b", "${c}ab\n", ) - kotlin.test.assertEquals(-1, pos) + assertEquals(-1, pos) } @TestWithoutNeovim(reason = SkipNeovimReason.DIFFERENT) @@ -1518,7 +1518,7 @@ class SearchGroupTest : VimTestCase() { @Test fun `test find last cr in file`() { val res = search("\\n", "Something\n") - kotlin.test.assertEquals(9, res) + assertEquals(9, res) } private fun search(pattern: String, input: String): Int { @@ -1541,7 +1541,7 @@ class SearchGroupTest : VimTestCase() { } private fun assertNoSearchHighlights() { - kotlin.test.assertEquals(0, fixture.editor.markupModel.allHighlighters.size) + assertEquals(0, fixture.editor.markupModel.allHighlighters.size) } @Suppress("DEPRECATION") @@ -1572,7 +1572,7 @@ class SearchGroupTest : VimTestCase() { offset += v.length } - kotlin.test.assertEquals(expected, actual.toString()) + assertEquals(expected, actual.toString()) // Assert all highlighters have the correct tooltip and text attributes val editorColorsScheme = EditorColorsManager.getInstance().globalScheme @@ -1580,7 +1580,7 @@ class SearchGroupTest : VimTestCase() { val caretColour = editorColorsScheme.getColor(EditorColors.CARET_COLOR) allHighlighters.forEach { val offsets = "(${it.startOffset}, ${it.endOffset})" - kotlin.test.assertEquals(tooltip, it.errorStripeTooltip, "Incorrect tooltip for highlighter at $offsets") + assertEquals(tooltip, it.errorStripeTooltip, "Incorrect tooltip for highlighter at $offsets") assertEquals( attributes.backgroundColor, it.textAttributes?.backgroundColor, diff --git a/src/test/java/org/jetbrains/plugins/ideavim/group/motion/MotionGroup_scrolloff_scrolljump_Test.kt b/src/test/java/org/jetbrains/plugins/ideavim/group/motion/MotionGroup_scrolloff_scrolljump_Test.kt index 9f6afbb1e..7452d5317 100644 --- a/src/test/java/org/jetbrains/plugins/ideavim/group/motion/MotionGroup_scrolloff_scrolljump_Test.kt +++ b/src/test/java/org/jetbrains/plugins/ideavim/group/motion/MotionGroup_scrolloff_scrolljump_Test.kt @@ -12,19 +12,20 @@ package org.jetbrains.plugins.ideavim.group.motion import com.maddyhome.idea.vim.helper.VimBehaviorDiffers import com.maddyhome.idea.vim.options.OptionConstants -import org.jetbrains.plugins.ideavim.impl.VimOption -import org.jetbrains.plugins.ideavim.impl.OptionTest import org.jetbrains.plugins.ideavim.SkipNeovimReason import org.jetbrains.plugins.ideavim.TestWithoutNeovim -import org.jetbrains.plugins.ideavim.impl.TraceOptions import org.jetbrains.plugins.ideavim.VimTestCase +import org.jetbrains.plugins.ideavim.impl.OptionTest +import org.jetbrains.plugins.ideavim.impl.TraceOptions +import org.jetbrains.plugins.ideavim.impl.VimOption // These tests are sanity tests for scrolloff and scrolljump, with actions that move the cursor. Other actions that are // affected by scrolloff or scrolljump should include that in the action specific tests @TraceOptions(OptionConstants.scrolloff) class MotionGroup_scrolloff_Test : VimTestCase() { @TestWithoutNeovim(SkipNeovimReason.OPTION) - @OptionTest(VimOption(OptionConstants.scrolloff, limitedValues = ["0"])) fun `test move up shows no context with scrolloff=0`() { + @OptionTest(VimOption(OptionConstants.scrolloff, limitedValues = ["0"])) + fun `test move up shows no context with scrolloff=0`() { configureByPages(5) setPositionAndScroll(25, 25) typeText("k") @@ -33,7 +34,8 @@ class MotionGroup_scrolloff_Test : VimTestCase() { } @TestWithoutNeovim(SkipNeovimReason.OPTION) - @OptionTest(VimOption(OptionConstants.scrolloff, limitedValues = ["1"])) fun `test move up shows context line with scrolloff=1`() { + @OptionTest(VimOption(OptionConstants.scrolloff, limitedValues = ["1"])) + fun `test move up shows context line with scrolloff=1`() { configureByPages(5) setPositionAndScroll(25, 26) typeText("k") @@ -42,7 +44,8 @@ class MotionGroup_scrolloff_Test : VimTestCase() { } @TestWithoutNeovim(SkipNeovimReason.OPTION) - @OptionTest(VimOption(OptionConstants.scrolloff, limitedValues = ["10"])) fun `test move up shows context lines with scrolloff=10`() { + @OptionTest(VimOption(OptionConstants.scrolloff, limitedValues = ["10"])) + fun `test move up shows context lines with scrolloff=10`() { configureByPages(5) setPositionAndScroll(25, 35) typeText("k") @@ -51,7 +54,8 @@ class MotionGroup_scrolloff_Test : VimTestCase() { } @TestWithoutNeovim(SkipNeovimReason.OPTION) - @OptionTest(VimOption(OptionConstants.scrolloff, limitedValues = ["15"])) fun `test move up when scrolloff is slightly less than half screen height`() { + @OptionTest(VimOption(OptionConstants.scrolloff, limitedValues = ["15"])) + fun `test move up when scrolloff is slightly less than half screen height`() { // Screen height = 35. scrolloff=15. This gives 5 possible caret lines without scrolling (48, 49, 50, 51 + 52) configureByPages(5) setPositionAndScroll(33, 52) @@ -79,7 +83,8 @@ class MotionGroup_scrolloff_Test : VimTestCase() { } @TestWithoutNeovim(SkipNeovimReason.OPTION) - @OptionTest(VimOption(OptionConstants.scrolloff, limitedValues = ["16"])) fun `test move up when scrolloff is slightly less than half screen height 2`() { + @OptionTest(VimOption(OptionConstants.scrolloff, limitedValues = ["16"])) + fun `test move up when scrolloff is slightly less than half screen height 2`() { // Screen height = 35. scrolloff=16. This gives 3 possible caret lines without scrolling (49, 50 + 51) configureByPages(5) setPositionAndScroll(33, 51) @@ -99,7 +104,8 @@ class MotionGroup_scrolloff_Test : VimTestCase() { } @TestWithoutNeovim(SkipNeovimReason.OPTION) - @OptionTest(VimOption(OptionConstants.scrolloff, limitedValues = ["16"])) fun `test move up when scrolloff is slightly less than half screen height 3`() { + @OptionTest(VimOption(OptionConstants.scrolloff, limitedValues = ["16"])) + fun `test move up when scrolloff is slightly less than half screen height 3`() { // Screen height = 34. scrolloff=16 // Even numbers. 2 possible caret lines without scrolling (49 + 50) configureByPages(5) @@ -137,7 +143,8 @@ class MotionGroup_scrolloff_Test : VimTestCase() { } @TestWithoutNeovim(SkipNeovimReason.OPTION) - @OptionTest(VimOption(OptionConstants.scrolloff, limitedValues = ["17"])) fun `test move up when scrolloff is slightly greater than screen height keeps cursor in centre of screen`() { + @OptionTest(VimOption(OptionConstants.scrolloff, limitedValues = ["17"])) + fun `test move up when scrolloff is slightly greater than screen height keeps cursor in centre of screen`() { // Page height = 35. scrolloff=17 configureByPages(5) setPositionAndScroll(33, 50) @@ -148,7 +155,8 @@ class MotionGroup_scrolloff_Test : VimTestCase() { } @TestWithoutNeovim(SkipNeovimReason.OPTION) - @OptionTest(VimOption(OptionConstants.scrolloff, limitedValues = ["22"])) fun `test move up when scrolloff is slightly greater than screen height keeps cursor in centre of screen 2`() { + @OptionTest(VimOption(OptionConstants.scrolloff, limitedValues = ["22"])) + fun `test move up when scrolloff is slightly greater than screen height keeps cursor in centre of screen 2`() { // Page height = 35. scrolloff=17 configureByPages(5) setPositionAndScroll(33, 50) @@ -159,7 +167,8 @@ class MotionGroup_scrolloff_Test : VimTestCase() { } @TestWithoutNeovim(SkipNeovimReason.OPTION) - @OptionTest(VimOption(OptionConstants.scrolloff, limitedValues = ["0"])) fun `test move down shows no context with scrolloff=0`() { + @OptionTest(VimOption(OptionConstants.scrolloff, limitedValues = ["0"])) + fun `test move down shows no context with scrolloff=0`() { configureByPages(5) setPositionAndScroll(25, 59) typeText("j") @@ -168,7 +177,8 @@ class MotionGroup_scrolloff_Test : VimTestCase() { } @TestWithoutNeovim(SkipNeovimReason.OPTION) - @OptionTest(VimOption(OptionConstants.scrolloff, limitedValues = ["1"])) fun `test move down shows context line with scrolloff=1`() { + @OptionTest(VimOption(OptionConstants.scrolloff, limitedValues = ["1"])) + fun `test move down shows context line with scrolloff=1`() { configureByPages(5) setPositionAndScroll(25, 58) typeText("j") @@ -177,7 +187,8 @@ class MotionGroup_scrolloff_Test : VimTestCase() { } @TestWithoutNeovim(SkipNeovimReason.OPTION) - @OptionTest(VimOption(OptionConstants.scrolloff, limitedValues = ["10"])) fun `test move down shows context lines with scrolloff=10`() { + @OptionTest(VimOption(OptionConstants.scrolloff, limitedValues = ["10"])) + fun `test move down shows context lines with scrolloff=10`() { configureByPages(5) setPositionAndScroll(25, 49) typeText("j") @@ -186,7 +197,8 @@ class MotionGroup_scrolloff_Test : VimTestCase() { } @TestWithoutNeovim(SkipNeovimReason.OPTION) - @OptionTest(VimOption(OptionConstants.scrolloff, limitedValues = ["15"])) fun `test move down when scrolloff is slightly less than half screen height`() { + @OptionTest(VimOption(OptionConstants.scrolloff, limitedValues = ["15"])) + fun `test move down when scrolloff is slightly less than half screen height`() { // Screen height = 35. scrolloff=15. This gives 5 possible caret lines without scrolling (48, 49, 50, 51 + 52) configureByPages(5) setPositionAndScroll(33, 48) @@ -214,7 +226,8 @@ class MotionGroup_scrolloff_Test : VimTestCase() { } @TestWithoutNeovim(SkipNeovimReason.OPTION) - @OptionTest(VimOption(OptionConstants.scrolloff, limitedValues = ["16"])) fun `test move down when scrolloff is slightly less than half screen height 2`() { + @OptionTest(VimOption(OptionConstants.scrolloff, limitedValues = ["16"])) + fun `test move down when scrolloff is slightly less than half screen height 2`() { // Screen height = 35. scrolloff=16. This gives 3 possible caret lines without scrolling (49, 50 + 51) configureByPages(5) setPositionAndScroll(33, 49) @@ -234,7 +247,8 @@ class MotionGroup_scrolloff_Test : VimTestCase() { } @TestWithoutNeovim(SkipNeovimReason.OPTION) - @OptionTest(VimOption(OptionConstants.scrolloff, limitedValues = ["16"])) fun `test move down when scrolloff is slightly less than half screen height 3`() { + @OptionTest(VimOption(OptionConstants.scrolloff, limitedValues = ["16"])) + fun `test move down when scrolloff is slightly less than half screen height 3`() { // Screen height = 34. scrolloff=16 // Even numbers. 2 possible caret lines without scrolling (49 + 50) configureByPages(5) @@ -252,7 +266,8 @@ class MotionGroup_scrolloff_Test : VimTestCase() { } @TestWithoutNeovim(SkipNeovimReason.OPTION) - @OptionTest(VimOption(OptionConstants.scrolloff, limitedValues = ["17"])) fun `test move down when scrolloff is exactly screen height`() { + @OptionTest(VimOption(OptionConstants.scrolloff, limitedValues = ["17"])) + fun `test move down when scrolloff is exactly screen height`() { // Page height = 34. scrolloff=17 // 2 possible caret lines without scrolling (49 + 50), but moving to line 51 will scroll 2 lines! configureByPages(5) @@ -270,7 +285,8 @@ class MotionGroup_scrolloff_Test : VimTestCase() { } @TestWithoutNeovim(SkipNeovimReason.OPTION) - @OptionTest(VimOption(OptionConstants.scrolloff, limitedValues = ["17"])) fun `test move down when scrolloff is slightly greater than half screen height keeps cursor in centre of screen`() { + @OptionTest(VimOption(OptionConstants.scrolloff, limitedValues = ["17"])) + fun `test move down when scrolloff is slightly greater than half screen height keeps cursor in centre of screen`() { // Page height = 35. scrolloff=17 configureByPages(5) setPositionAndScroll(33, 50) @@ -281,7 +297,8 @@ class MotionGroup_scrolloff_Test : VimTestCase() { } @TestWithoutNeovim(SkipNeovimReason.OPTION) - @OptionTest(VimOption(OptionConstants.scrolloff, limitedValues = ["22"])) fun `test move down when scrolloff is slightly greater than half screen height keeps cursor in centre of screen 2`() { + @OptionTest(VimOption(OptionConstants.scrolloff, limitedValues = ["22"])) + fun `test move down when scrolloff is slightly greater than half screen height keeps cursor in centre of screen 2`() { // Page height = 35. scrolloff=17 configureByPages(5) setPositionAndScroll(33, 50) @@ -292,7 +309,8 @@ class MotionGroup_scrolloff_Test : VimTestCase() { } @TestWithoutNeovim(SkipNeovimReason.OPTION) - @OptionTest(VimOption(OptionConstants.scrolloff, limitedValues = ["999"])) fun `test scrolloff=999 keeps cursor in centre of screen`() { + @OptionTest(VimOption(OptionConstants.scrolloff, limitedValues = ["999"])) + fun `test scrolloff=999 keeps cursor in centre of screen`() { configureByPages(5) setPositionAndScroll(25, 42) @@ -306,7 +324,8 @@ class MotionGroup_scrolloff_Test : VimTestCase() { } @TestWithoutNeovim(SkipNeovimReason.OPTION) - @OptionTest(VimOption(OptionConstants.scrolloff, limitedValues = ["999"])) fun `test scrolloff=999 keeps cursor in centre of screen with even screen height`() { + @OptionTest(VimOption(OptionConstants.scrolloff, limitedValues = ["999"])) + fun `test scrolloff=999 keeps cursor in centre of screen with even screen height`() { configureByPages(5) setEditorVisibleSize(screenWidth, 34) setPositionAndScroll(26, 42) @@ -321,7 +340,8 @@ class MotionGroup_scrolloff_Test : VimTestCase() { } @TestWithoutNeovim(SkipNeovimReason.OPTION) - @OptionTest(VimOption(OptionConstants.scrolloff, limitedValues = ["0"])) fun `test reposition cursor when scrolloff is set`() { + @OptionTest(VimOption(OptionConstants.scrolloff, limitedValues = ["0"])) + fun `test reposition cursor when scrolloff is set`() { configureByPages(5) setPositionAndScroll(50, 50) @@ -334,7 +354,8 @@ class MotionGroup_scrolloff_Test : VimTestCase() { @TraceOptions(OptionConstants.scrolljump) class MotionGroup_scrolljump_Test : VimTestCase() { @TestWithoutNeovim(SkipNeovimReason.OPTION) - @OptionTest(VimOption(OptionConstants.scrolljump, limitedValues = ["0"])) fun `test move up scrolls single line with scrolljump=0`() { + @OptionTest(VimOption(OptionConstants.scrolljump, limitedValues = ["0"])) + fun `test move up scrolls single line with scrolljump=0`() { configureByPages(5) setPositionAndScroll(25, 25) typeText("k") @@ -343,7 +364,8 @@ class MotionGroup_scrolljump_Test : VimTestCase() { } @TestWithoutNeovim(SkipNeovimReason.OPTION) - @OptionTest(VimOption(OptionConstants.scrolljump, limitedValues = ["1"])) fun `test move up scrolls single line with scrolljump=1`() { + @OptionTest(VimOption(OptionConstants.scrolljump, limitedValues = ["1"])) + fun `test move up scrolls single line with scrolljump=1`() { configureByPages(5) setPositionAndScroll(25, 25) typeText("k") @@ -352,7 +374,8 @@ class MotionGroup_scrolljump_Test : VimTestCase() { } @TestWithoutNeovim(SkipNeovimReason.OPTION) - @OptionTest(VimOption(OptionConstants.scrolljump, limitedValues = ["10"])) fun `test move up scrolls multiple lines with scrolljump=10`() { + @OptionTest(VimOption(OptionConstants.scrolljump, limitedValues = ["10"])) + fun `test move up scrolls multiple lines with scrolljump=10`() { configureByPages(5) setPositionAndScroll(25, 25) typeText("k") @@ -361,7 +384,8 @@ class MotionGroup_scrolljump_Test : VimTestCase() { } @TestWithoutNeovim(SkipNeovimReason.OPTION) - @OptionTest(VimOption(OptionConstants.scrolljump, limitedValues = ["0"])) fun `test move down scrolls single line with scrolljump=0`() { + @OptionTest(VimOption(OptionConstants.scrolljump, limitedValues = ["0"])) + fun `test move down scrolls single line with scrolljump=0`() { configureByPages(5) setPositionAndScroll(25, 59) typeText("j") @@ -370,7 +394,8 @@ class MotionGroup_scrolljump_Test : VimTestCase() { } @TestWithoutNeovim(SkipNeovimReason.OPTION) - @OptionTest(VimOption(OptionConstants.scrolljump, limitedValues = ["1"])) fun `test move down scrolls single line with scrolljump=1`() { + @OptionTest(VimOption(OptionConstants.scrolljump, limitedValues = ["1"])) + fun `test move down scrolls single line with scrolljump=1`() { configureByPages(5) setPositionAndScroll(25, 59) typeText("j") @@ -379,7 +404,8 @@ class MotionGroup_scrolljump_Test : VimTestCase() { } @TestWithoutNeovim(SkipNeovimReason.OPTION) - @OptionTest(VimOption(OptionConstants.scrolljump, limitedValues = ["10"])) fun `test move down scrolls multiple lines with scrolljump=10`() { + @OptionTest(VimOption(OptionConstants.scrolljump, limitedValues = ["10"])) + fun `test move down scrolls multiple lines with scrolljump=10`() { configureByPages(5) setPositionAndScroll(25, 59) typeText("j") @@ -388,7 +414,8 @@ class MotionGroup_scrolljump_Test : VimTestCase() { } @TestWithoutNeovim(SkipNeovimReason.OPTION) - @OptionTest(VimOption(OptionConstants.scrolljump, limitedValues = ["-50"])) fun `test negative scrolljump treated as percentage 1`() { + @OptionTest(VimOption(OptionConstants.scrolljump, limitedValues = ["-50"])) + fun `test negative scrolljump treated as percentage 1`() { configureByPages(5) setPositionAndScroll(39, 39) typeText("k") @@ -397,7 +424,8 @@ class MotionGroup_scrolljump_Test : VimTestCase() { } @TestWithoutNeovim(SkipNeovimReason.OPTION) - @OptionTest(VimOption(OptionConstants.scrolljump, limitedValues = ["-10"])) fun `test negative scrolljump treated as percentage 2`() { + @OptionTest(VimOption(OptionConstants.scrolljump, limitedValues = ["-10"])) + fun `test negative scrolljump treated as percentage 2`() { configureByPages(5) setPositionAndScroll(39, 39) typeText("k") diff --git a/src/test/java/org/jetbrains/plugins/ideavim/group/visual/IdeaVisualControlTest.kt b/src/test/java/org/jetbrains/plugins/ideavim/group/visual/IdeaVisualControlTest.kt index 6cbe1b7fe..08daecb7d 100644 --- a/src/test/java/org/jetbrains/plugins/ideavim/group/visual/IdeaVisualControlTest.kt +++ b/src/test/java/org/jetbrains/plugins/ideavim/group/visual/IdeaVisualControlTest.kt @@ -21,12 +21,12 @@ import com.maddyhome.idea.vim.helper.VimBehaviorDiffers import com.maddyhome.idea.vim.helper.subMode import com.maddyhome.idea.vim.listener.VimListenerManager import com.maddyhome.idea.vim.options.OptionConstants -import org.jetbrains.plugins.ideavim.impl.VimOption -import org.jetbrains.plugins.ideavim.impl.OptionTest import org.jetbrains.plugins.ideavim.SkipNeovimReason import org.jetbrains.plugins.ideavim.TestWithoutNeovim -import org.jetbrains.plugins.ideavim.impl.TraceOptions import org.jetbrains.plugins.ideavim.VimTestCase +import org.jetbrains.plugins.ideavim.impl.OptionTest +import org.jetbrains.plugins.ideavim.impl.TraceOptions +import org.jetbrains.plugins.ideavim.impl.VimOption import org.jetbrains.plugins.ideavim.waitAndAssert import org.jetbrains.plugins.ideavim.waitAndAssertMode diff --git a/src/test/java/org/jetbrains/plugins/ideavim/group/visual/TemplateTest.kt b/src/test/java/org/jetbrains/plugins/ideavim/group/visual/TemplateTest.kt index b946a5427..4e70d746b 100644 --- a/src/test/java/org/jetbrains/plugins/ideavim/group/visual/TemplateTest.kt +++ b/src/test/java/org/jetbrains/plugins/ideavim/group/visual/TemplateTest.kt @@ -28,13 +28,13 @@ import com.maddyhome.idea.vim.helper.inNormalMode import com.maddyhome.idea.vim.helper.inSelectMode import com.maddyhome.idea.vim.helper.inVisualMode import com.maddyhome.idea.vim.listener.VimListenerManager -import org.jetbrains.plugins.ideavim.impl.VimOption -import org.jetbrains.plugins.ideavim.impl.OptionTest import org.jetbrains.plugins.ideavim.SkipNeovimReason import org.jetbrains.plugins.ideavim.TestWithoutNeovim -import org.jetbrains.plugins.ideavim.impl.TraceOptions import org.jetbrains.plugins.ideavim.VimTestCase import org.jetbrains.plugins.ideavim.assertDoesntChange +import org.jetbrains.plugins.ideavim.impl.OptionTest +import org.jetbrains.plugins.ideavim.impl.TraceOptions +import org.jetbrains.plugins.ideavim.impl.VimOption import org.jetbrains.plugins.ideavim.waitAndAssertMode import org.junit.jupiter.api.BeforeEach import org.junit.jupiter.api.TestInfo @@ -309,7 +309,7 @@ class TemplateTest : VimTestCase() { } @OptionTest( - VimOption(IjOptionConstants.idearefactormode, limitedValues = [IjOptionConstants.idearefactormode_keep]) + VimOption(IjOptionConstants.idearefactormode, limitedValues = [IjOptionConstants.idearefactormode_keep]), ) @TestWithoutNeovim(reason = SkipNeovimReason.TEMPLATES) fun `test template in normal mode`() { @@ -327,7 +327,7 @@ class TemplateTest : VimTestCase() { } @OptionTest( - VimOption(IjOptionConstants.idearefactormode, limitedValues = [IjOptionConstants.idearefactormode_keep]) + VimOption(IjOptionConstants.idearefactormode, limitedValues = [IjOptionConstants.idearefactormode_keep]), ) @TestWithoutNeovim(reason = SkipNeovimReason.TEMPLATES) fun `test save mode for insert mode`() { @@ -346,7 +346,7 @@ class TemplateTest : VimTestCase() { } @OptionTest( - VimOption(IjOptionConstants.idearefactormode, limitedValues = [IjOptionConstants.idearefactormode_keep]) + VimOption(IjOptionConstants.idearefactormode, limitedValues = [IjOptionConstants.idearefactormode_keep]), ) @TestWithoutNeovim(reason = SkipNeovimReason.TEMPLATES) fun `test save mode for visual mode`() { @@ -365,7 +365,7 @@ class TemplateTest : VimTestCase() { } @OptionTest( - VimOption(IjOptionConstants.idearefactormode, limitedValues = [IjOptionConstants.idearefactormode_select]) + VimOption(IjOptionConstants.idearefactormode, limitedValues = [IjOptionConstants.idearefactormode_select]), ) @TestWithoutNeovim(reason = SkipNeovimReason.TEMPLATES) fun `test template to select in normal mode`() { @@ -383,7 +383,7 @@ class TemplateTest : VimTestCase() { } @OptionTest( - VimOption(IjOptionConstants.idearefactormode, limitedValues = [IjOptionConstants.idearefactormode_select]) + VimOption(IjOptionConstants.idearefactormode, limitedValues = [IjOptionConstants.idearefactormode_select]), ) @TestWithoutNeovim(reason = SkipNeovimReason.TEMPLATES) fun `test template to select in insert mode`() { @@ -402,7 +402,7 @@ class TemplateTest : VimTestCase() { } @OptionTest( - VimOption(IjOptionConstants.idearefactormode, limitedValues = [IjOptionConstants.idearefactormode_select]) + VimOption(IjOptionConstants.idearefactormode, limitedValues = [IjOptionConstants.idearefactormode_select]), ) @TestWithoutNeovim(reason = SkipNeovimReason.TEMPLATES) fun `test template to select in visual mode`() { @@ -421,7 +421,7 @@ class TemplateTest : VimTestCase() { } @OptionTest( - VimOption(IjOptionConstants.idearefactormode, limitedValues = [IjOptionConstants.idearefactormode_select]) + VimOption(IjOptionConstants.idearefactormode, limitedValues = [IjOptionConstants.idearefactormode_select]), ) @TestWithoutNeovim(reason = SkipNeovimReason.TEMPLATES) fun `test template to select in select mode`() { @@ -440,7 +440,7 @@ class TemplateTest : VimTestCase() { } @OptionTest( - VimOption(IjOptionConstants.idearefactormode, limitedValues = [IjOptionConstants.idearefactormode_visual]) + VimOption(IjOptionConstants.idearefactormode, limitedValues = [IjOptionConstants.idearefactormode_visual]), ) @TestWithoutNeovim(reason = SkipNeovimReason.TEMPLATES) fun `test template to visual in normal mode`() { @@ -458,7 +458,7 @@ class TemplateTest : VimTestCase() { } @OptionTest( - VimOption(IjOptionConstants.idearefactormode, limitedValues = [IjOptionConstants.idearefactormode_visual]) + VimOption(IjOptionConstants.idearefactormode, limitedValues = [IjOptionConstants.idearefactormode_visual]), ) @TestWithoutNeovim(reason = SkipNeovimReason.TEMPLATES) fun `test template to visual in insert mode`() { @@ -477,7 +477,7 @@ class TemplateTest : VimTestCase() { } @OptionTest( - VimOption(IjOptionConstants.idearefactormode, limitedValues = [IjOptionConstants.idearefactormode_visual]) + VimOption(IjOptionConstants.idearefactormode, limitedValues = [IjOptionConstants.idearefactormode_visual]), ) @TestWithoutNeovim(reason = SkipNeovimReason.TEMPLATES) fun `test template to visual in visual mode`() { @@ -496,7 +496,7 @@ class TemplateTest : VimTestCase() { } @OptionTest( - VimOption(IjOptionConstants.idearefactormode, limitedValues = [IjOptionConstants.idearefactormode_visual]) + VimOption(IjOptionConstants.idearefactormode, limitedValues = [IjOptionConstants.idearefactormode_visual]), ) @TestWithoutNeovim(reason = SkipNeovimReason.TEMPLATES) fun `test template to visual in select mode`() { @@ -515,7 +515,7 @@ class TemplateTest : VimTestCase() { } @OptionTest( - VimOption(IjOptionConstants.idearefactormode, limitedValues = [IjOptionConstants.idearefactormode_keep]) + VimOption(IjOptionConstants.idearefactormode, limitedValues = [IjOptionConstants.idearefactormode_keep]), ) @TestWithoutNeovim(reason = SkipNeovimReason.TEMPLATES) fun `test template with multiple times`() { @@ -538,7 +538,7 @@ class TemplateTest : VimTestCase() { } @OptionTest( - VimOption(IjOptionConstants.idearefactormode, limitedValues = [IjOptionConstants.idearefactormode_keep]) + VimOption(IjOptionConstants.idearefactormode, limitedValues = [IjOptionConstants.idearefactormode_keep]), ) @TestWithoutNeovim(reason = SkipNeovimReason.TEMPLATES) fun `test template with lookup`() { diff --git a/src/test/java/org/jetbrains/plugins/ideavim/helper/EditorHelperTest.kt b/src/test/java/org/jetbrains/plugins/ideavim/helper/EditorHelperTest.kt index 1a78ecba8..ddf1cdb41 100644 --- a/src/test/java/org/jetbrains/plugins/ideavim/helper/EditorHelperTest.kt +++ b/src/test/java/org/jetbrains/plugins/ideavim/helper/EditorHelperTest.kt @@ -12,7 +12,6 @@ import com.maddyhome.idea.vim.helper.EditorHelper import org.jetbrains.plugins.ideavim.SkipNeovimReason import org.jetbrains.plugins.ideavim.TestWithoutNeovim import org.jetbrains.plugins.ideavim.VimTestCase -import org.junit.Assert import org.junit.jupiter.api.Test import kotlin.math.roundToInt @@ -24,7 +23,7 @@ class EditorHelperTest : VimTestCase() { EditorHelper.scrollColumnToLeftOfScreen(fixture.editor, 0, 2) val visibleArea = fixture.editor.scrollingModel.visibleArea val columnWidth = EditorHelper.getPlainSpaceWidthFloat(fixture.editor) - Assert.assertEquals((2 * columnWidth).roundToInt(), visibleArea.x) + assertEquals((2 * columnWidth).roundToInt(), visibleArea.x) } @TestWithoutNeovim(SkipNeovimReason.NOT_VIM_TESTING) @@ -35,7 +34,7 @@ class EditorHelperTest : VimTestCase() { EditorHelper.scrollColumnToRightOfScreen(fixture.editor, 0, column) val visibleArea = fixture.editor.scrollingModel.visibleArea val columnWidth = EditorHelper.getPlainSpaceWidthFloat(fixture.editor) - Assert.assertEquals(((column - screenWidth + 1) * columnWidth).roundToInt(), visibleArea.x) + assertEquals(((column - screenWidth + 1) * columnWidth).roundToInt(), visibleArea.x) } @TestWithoutNeovim(SkipNeovimReason.NOT_VIM_TESTING) @@ -48,7 +47,7 @@ class EditorHelperTest : VimTestCase() { EditorHelper.scrollColumnToMiddleOfScreen(fixture.editor, 0, 99) val visibleArea = fixture.editor.scrollingModel.visibleArea val columnWidth = EditorHelper.getPlainSpaceWidthFloat(fixture.editor) - Assert.assertEquals((59 * columnWidth).roundToInt(), visibleArea.x) + assertEquals((59 * columnWidth).roundToInt(), visibleArea.x) } @TestWithoutNeovim(SkipNeovimReason.NOT_VIM_TESTING) @@ -62,6 +61,6 @@ class EditorHelperTest : VimTestCase() { EditorHelper.scrollColumnToMiddleOfScreen(fixture.editor, 0, 99) val visibleArea = fixture.editor.scrollingModel.visibleArea val columnWidth = EditorHelper.getPlainSpaceWidthFloat(fixture.editor) - Assert.assertEquals((59 * columnWidth).roundToInt(), visibleArea.x) + assertEquals((59 * columnWidth).roundToInt(), visibleArea.x) } } diff --git a/src/test/java/org/jetbrains/plugins/ideavim/impl/OptionsVerificator.kt b/src/test/java/org/jetbrains/plugins/ideavim/impl/OptionsVerificator.kt index 14c39aab0..6a00e03fc 100644 --- a/src/test/java/org/jetbrains/plugins/ideavim/impl/OptionsVerificator.kt +++ b/src/test/java/org/jetbrains/plugins/ideavim/impl/OptionsVerificator.kt @@ -107,7 +107,6 @@ internal annotation class VimOption( val doesntAffectTest: Boolean = false, ) - // ----------- Implementation private class OptionsVerificator : BeforeTestExecutionCallback, AfterTestExecutionCallback { @@ -315,7 +314,9 @@ private class VimOptionsInvocator : TestTemplateInvocationContextProvider { .map { VimString(it.joinToString(",")) } }.flatten() valuesCombinations.map { option to it } - } else fail("Cannot generate values automatically. Please specify option values explicitelly using 'limitedValues' field") + } else { + fail("Cannot generate values automatically. Please specify option values explicitelly using 'limitedValues' field") + } } else { val boundedValues = option.boundedValues if (boundedValues != null) {