From f624052b1e237e8e16f7caeb40db52384e7ef75b Mon Sep 17 00:00:00 2001 From: Josh Taylor Date: Tue, 16 Jul 2024 04:06:32 +0800 Subject: [PATCH] remove tests for now, kind of pointless --- .../CodeGenerationPanelTest.kt | 25 ------ .../code_generation/CommentTogglingTest.kt | 83 ------------------- 2 files changed, 108 deletions(-) delete mode 100644 tests/org/elixir_lang/code_generation/CodeGenerationPanelTest.kt delete mode 100644 tests/org/elixir_lang/code_generation/CommentTogglingTest.kt diff --git a/tests/org/elixir_lang/code_generation/CodeGenerationPanelTest.kt b/tests/org/elixir_lang/code_generation/CodeGenerationPanelTest.kt deleted file mode 100644 index 28125b621..000000000 --- a/tests/org/elixir_lang/code_generation/CodeGenerationPanelTest.kt +++ /dev/null @@ -1,25 +0,0 @@ -import com.intellij.application.options.CodeStyle -import com.intellij.testFramework.fixtures.BasePlatformTestCase -import org.elixir_lang.formatter.settings.CodeGenerationPanel - -class CodeGenerationPanelTest : BasePlatformTestCase() { - fun testGetSupportedCommenterStandardOptionNames() { - val options = CodeGenerationPanel.getSupportedCommenterStandardOptionNames() - - // Always included options - assertTrue(options.contains("LINE_COMMENT_AT_FIRST_COLUMN")) - assertTrue(options.contains("LINE_COMMENT_ADD_SPACE")) - assertTrue(options.contains("BLOCK_COMMENT_AT_FIRST_COLUMN")) - assertTrue(options.contains("LINE_COMMENT_ADD_SPACE_ON_REFORMAT")) - - assertTrue(options.contains("BLOCK_COMMENT_ADD_SPACE")) - } - - fun testPanelCreation() { - val settings = CodeStyle.createTestSettings() - val panel = CodeGenerationPanel(settings) - - assertNotNull(panel.panel) - assertNotNull(panel.getPanelInner()) - } -} \ No newline at end of file diff --git a/tests/org/elixir_lang/code_generation/CommentTogglingTest.kt b/tests/org/elixir_lang/code_generation/CommentTogglingTest.kt deleted file mode 100644 index c14cee737..000000000 --- a/tests/org/elixir_lang/code_generation/CommentTogglingTest.kt +++ /dev/null @@ -1,83 +0,0 @@ -import com.intellij.testFramework.fixtures.BasePlatformTestCase - -class CommentTogglingTest : BasePlatformTestCase() { - fun testLineCommentToggle() { - myFixture.configureByText("test.ex", """ - defmodule Test do - def hello do - IO.puts "Hello, World!" - end - end - """.trimIndent()) - - myFixture.performEditorAction("CommentByLineComment") - - myFixture.checkResult(""" - # defmodule Test do - # def hello do - # IO.puts "Hello, World!" - # end - # end - """.trimIndent()) - - myFixture.performEditorAction("CommentByLineComment") - - myFixture.checkResult(""" - defmodule Test do - def hello do - IO.puts "Hello, World!" - end - end - """.trimIndent()) - } - - fun testBlockCommentToggle() { - myFixture.configureByText("test.ex", """ - defmodule Test do - def hello do - IO.puts "Hello, World!" - end - end - """.trimIndent()) - - myFixture.performEditorAction("CommentByBlockComment") - - myFixture.checkResult(""" - #[defmodule Test do - def hello do - IO.puts "Hello, World!" - end - end]# - """.trimIndent()) - - myFixture.performEditorAction("CommentByBlockComment") - - myFixture.checkResult(""" - defmodule Test do - def hello do - IO.puts "Hello, World!" - end - end - """.trimIndent()) - } - - fun testCommentTogglePreservesIndentation() { - myFixture.configureByText("test.ex", """ - defmodule Test do - def hello do - IO.puts "Hello, World!" - end - end - """.trimIndent()) - - myFixture.performEditorAction("CommentByLineComment") - - myFixture.checkResult(""" - # defmodule Test do - # def hello do - # IO.puts "Hello, World!" - # end - # end - """.trimIndent()) - } -} \ No newline at end of file