Skip to content

AntonButov/compilation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Maven Central

Setup

  repositories {
    mavenCentral()
  }
  implementation("com.github.antonbutov:compilation:<$last-version>")

How to use

  val correctCode =
    """
        class Test {
            fun test(): String {
                return "test"
            }
        }
    """.trimIndent()

  @Test
  fun `correct code should compile`() {
    correctCode compile { resolver: Resolver ->
      assertTrue { true }
    }
  }

  @Test
  fun `correct file should compile`() {
    File("src/test/kotlin/FilesForTests/CorrectFile.kt") compile {
      assertTrue { true }
    }
  }

About

KSP processing testing tools wrapped com.github.tschuchortdev:kotlin-compile-testing-ksp

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages