diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4e448bdd..a4b19f0c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -50,7 +50,7 @@ jobs: java-version: ${{ matrix.java-version }} - name: Test - run: ./gradlew check jacocoTestReport --stacktrace --info + run: ./gradlew check koverMergedReport --stacktrace --info - name: Danger # Run Danger for PRs originating from within the repo (for fork PRs the token won't give permission to comment) diff --git a/Dangerfile b/Dangerfile index db5dce99..ccae8031 100644 --- a/Dangerfile +++ b/Dangerfile @@ -1 +1 @@ -shroud.report 'jacoco/build/reports/jacoco/testCodeCoverageReport/testCodeCoverageReport.xml', 80, 80, true +shroud.report 'build/reports/kover/report.xml', 80, 80, true diff --git a/build-logic/convention/src/main/kotlin/com.livefront.sealedenum.detekt.gradle.kts b/build-logic/convention/src/main/kotlin/com.livefront.sealedenum.detekt.gradle.kts index 1d56dcd3..d2e5fd3d 100644 --- a/build-logic/convention/src/main/kotlin/com.livefront.sealedenum.detekt.gradle.kts +++ b/build-logic/convention/src/main/kotlin/com.livefront.sealedenum.detekt.gradle.kts @@ -20,7 +20,11 @@ tasks { jvmTarget = JavaVersion.VERSION_1_8.toString() } + val detektAll by registering { + dependsOn(tasks.withType()) + } + getByName("check") { - dependsOn("detektMain") + dependsOn(detektAll) } } diff --git a/build-logic/convention/src/main/kotlin/com.livefront.sealedenum.kotlin.gradle.kts b/build-logic/convention/src/main/kotlin/com.livefront.sealedenum.kotlin.gradle.kts index b50062df..20be9b04 100644 --- a/build-logic/convention/src/main/kotlin/com.livefront.sealedenum.kotlin.gradle.kts +++ b/build-logic/convention/src/main/kotlin/com.livefront.sealedenum.kotlin.gradle.kts @@ -1,6 +1,5 @@ plugins { - kotlin("jvm") - jacoco + kotlin("multiplatform") } val libs = extensions.getByType().named("libs") @@ -12,26 +11,15 @@ java { kotlin { explicitApi() -} - -jacoco { - toolVersion = libs.findVersion("jacoco").get().toString() -} - -tasks { - test { - useJUnitPlatform() - } - - jacocoTestReport { - dependsOn(test) - - reports { - html.required.set(true) - xml.required.set(true) + jvm { + withJava() + testRuns["test"].executionTask.configure { + useJUnitPlatform() } } +} +tasks { withType().configureEach { kotlinOptions { allWarningsAsErrors = true diff --git a/build-logic/convention/src/main/kotlin/com.livefront.sealedenum.publish.gradle.kts b/build-logic/convention/src/main/kotlin/com.livefront.sealedenum.publish.gradle.kts index da3eb055..fafe3d39 100644 --- a/build-logic/convention/src/main/kotlin/com.livefront.sealedenum.publish.gradle.kts +++ b/build-logic/convention/src/main/kotlin/com.livefront.sealedenum.publish.gradle.kts @@ -1,5 +1,6 @@ plugins{ - kotlin("jvm") + kotlin("multiplatform") + `java-library` `maven-publish` id("org.jetbrains.dokka") id("org.jetbrains.kotlinx.binary-compatibility-validator") @@ -15,11 +16,6 @@ tasks { } } -val sourcesJar by tasks.creating(Jar::class) { - archiveClassifier.set("sources") - from(sourceSets.main.get().allSource) -} - val javadocJar by tasks.creating(Jar::class) { archiveClassifier.set("javadoc") from(tasks.dokkaHtml) @@ -29,7 +25,7 @@ publishing { publications { create("default") { from(components["java"]) - artifact(sourcesJar) + artifact(tasks.getByName("sourcesJar")) artifact(javadocJar) pom { diff --git a/build.gradle.kts b/build.gradle.kts index bbd5f55b..d72db753 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,4 +1,12 @@ plugins { - alias(libs.plugins.kotlin.jvm) apply false + alias(libs.plugins.kotlin.multiplatform) apply false alias(libs.plugins.dokka) + alias(libs.plugins.kotlinx.kover) +} + +tasks.koverMergedHtmlReport { + excludes = listOf("com.livefront.sealedenum.compilation.*") +} +tasks.koverMergedXmlReport { + excludes = listOf("com.livefront.sealedenum.compilation.*") } diff --git a/config/detekt/detekt.yml b/config/detekt/detekt.yml index c44077d1..521b6708 100644 --- a/config/detekt/detekt.yml +++ b/config/detekt/detekt.yml @@ -1,9 +1,43 @@ +complexity: + CyclomaticComplexMethod: + excludes: [ '**/generated/**' ] + +empty-blocks: + EmptyDefaultConstructor: + excludes: [ '**/generated/**' ] + formatting: + ArgumentListWrapping: + excludes: [ '**/generated/**' ] + EnumEntryNameCase: + excludes: [ '**/generated/**' ] + Filename: + excludes: [ '**/generated/**' ] + Indentation: + excludes: [ '**/generated/**' ] MaximumLineLength: - excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] + excludes: [ '**/generated/**', '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] + NoConsecutiveBlankLines: + excludes: ['**/generated/**' ] + NoLineBreakBeforeAssignment: + excludes: [ '**/generated/**' ] + SpacingAroundCurly: + excludes: [ '**/generated/**' ] + Wrapping: + excludes: [ '**/generated/**' ] + +naming: + ClassNaming: + excludes: [ '**/generated/**' ] + MatchingDeclarationName: + excludes: [ '**/generated/**' ] + TopLevelPropertyNaming: + excludes: ['**/generated/**', '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**'] style: ForbiddenComment: values: ['FIXME:', 'STOPSHIP:'] + MagicNumber: + excludes: [ '**/generated/**', '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] MaxLineLength: - excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] + excludes: [ '**/generated/**', '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] diff --git a/gradle.properties b/gradle.properties index 5fee5f01..b0fe4abc 100644 --- a/gradle.properties +++ b/gradle.properties @@ -13,6 +13,10 @@ org.gradle.jvmargs=-Xmx1536m org.gradle.parallel=true # Kotlin code style for this project: "official" or "obsolete": kotlin.code.style=official +# Don't work about mpp stability +kotlin.mpp.stability.nowarn=true +# Don't warn about disabled targets +kotlin.native.ignoreDisabledTargets=true group=com.livefront.sealedenum version=0.6.0 diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 384bd635..c7aacd0a 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -3,10 +3,10 @@ autoService = "1.0" detekt = "1.22.0" dokka = "1.8.10" incap = "0.3" -jacoco = "0.8.8" junit = "5.8.1" kotlin = "1.8.0" kotlinxBinaryCompatibilityValidator = "0.13.0" +kotlinxKover = "0.5.0" kotlinCompileTesting = "1.5.0" kotlinPoet = "1.13.0" ksp = "1.8.0-1.0.9" @@ -39,5 +39,6 @@ ksp-api = { module = "com.google.devtools.ksp:symbol-processing-api", version.re [plugins] dokka = { id = "org.jetbrains.dokka", version.ref = "dokka" } -kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" } +kotlin-multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" } +kotlinx-kover = { id = "org.jetbrains.kotlinx.kover", version.ref = "kotlinxKover" } ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" } diff --git a/jacoco/build.gradle.kts b/jacoco/build.gradle.kts deleted file mode 100644 index 3ed7ccc3..00000000 --- a/jacoco/build.gradle.kts +++ /dev/null @@ -1,25 +0,0 @@ -plugins { - base - id("jacoco-report-aggregation") -} - -dependencies { - jacocoAggregation(projects.ksp) - jacocoAggregation(projects.processingCommon) - jacocoAggregation(projects.processingTests.kspTests) - jacocoAggregation(projects.processingTests.processorTests) - jacocoAggregation(projects.processor) - jacocoAggregation(projects.runtime) -} - -reporting { - reports { - val testCodeCoverageReport by creating(JacocoCoverageReport::class) { - testType.set(TestSuiteType.UNIT_TEST) - } - } -} - -tasks.check { - dependsOn(tasks.named("testCodeCoverageReport")) -} diff --git a/kotlin-js-store/yarn.lock b/kotlin-js-store/yarn.lock new file mode 100644 index 00000000..a7d69769 --- /dev/null +++ b/kotlin-js-store/yarn.lock @@ -0,0 +1,1932 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@colors/colors@1.5.0": + version "1.5.0" + resolved "https://registry.yarnpkg.com/@colors/colors/-/colors-1.5.0.tgz#bb504579c1cae923e6576a4f5da43d25f97bdbd9" + integrity sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ== + +"@discoveryjs/json-ext@^0.5.0": + version "0.5.7" + resolved "https://registry.yarnpkg.com/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz#1d572bfbbe14b7704e0ba0f39b74815b84870d70" + integrity sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw== + +"@jridgewell/gen-mapping@^0.3.0": + version "0.3.3" + resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz#7e02e6eb5df901aaedb08514203b096614024098" + integrity sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ== + dependencies: + "@jridgewell/set-array" "^1.0.1" + "@jridgewell/sourcemap-codec" "^1.4.10" + "@jridgewell/trace-mapping" "^0.3.9" + +"@jridgewell/resolve-uri@3.1.0": + version "3.1.0" + resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz#2203b118c157721addfe69d47b70465463066d78" + integrity sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w== + +"@jridgewell/set-array@^1.0.1": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.1.2.tgz#7c6cf998d6d20b914c0a55a91ae928ff25965e72" + integrity sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw== + +"@jridgewell/source-map@^0.3.2": + version "0.3.3" + resolved "https://registry.yarnpkg.com/@jridgewell/source-map/-/source-map-0.3.3.tgz#8108265659d4c33e72ffe14e33d6cc5eb59f2fda" + integrity sha512-b+fsZXeLYi9fEULmfBrhxn4IrPlINf8fiNarzTof004v3lFdntdwa9PF7vFJqm3mg7s+ScJMxXaE3Acp1irZcg== + dependencies: + "@jridgewell/gen-mapping" "^0.3.0" + "@jridgewell/trace-mapping" "^0.3.9" + +"@jridgewell/sourcemap-codec@1.4.14": + version "1.4.14" + resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz#add4c98d341472a289190b424efbdb096991bb24" + integrity sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw== + +"@jridgewell/sourcemap-codec@^1.4.10": + version "1.4.15" + resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz#d7c6e6755c78567a951e04ab52ef0fd26de59f32" + integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg== + +"@jridgewell/trace-mapping@^0.3.17", "@jridgewell/trace-mapping@^0.3.9": + version "0.3.18" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.18.tgz#25783b2086daf6ff1dcb53c9249ae480e4dd4cd6" + integrity sha512-w+niJYzMHdd7USdiH2U6869nqhD2nbfZXND5Yp93qIbEmnDNk7PD48o+YchRVpzMU7M6jVCbenTR7PA1FLQ9pA== + dependencies: + "@jridgewell/resolve-uri" "3.1.0" + "@jridgewell/sourcemap-codec" "1.4.14" + +"@socket.io/component-emitter@~3.1.0": + version "3.1.0" + resolved "https://registry.yarnpkg.com/@socket.io/component-emitter/-/component-emitter-3.1.0.tgz#96116f2a912e0c02817345b3c10751069920d553" + integrity sha512-+9jVqKhRSpsc591z5vX+X5Yyw+he/HCB4iQ/RYxw35CEPaY1gnsNE43nf9n9AaYjAQrTiI/mOwKUKdUs9vf7Xg== + +"@types/cookie@^0.4.1": + version "0.4.1" + resolved "https://registry.yarnpkg.com/@types/cookie/-/cookie-0.4.1.tgz#bfd02c1f2224567676c1545199f87c3a861d878d" + integrity sha512-XW/Aa8APYr6jSVVA1y/DEIZX0/GMKLEVekNG727R8cs56ahETkRAy/3DR7+fJyh7oUgGwNQaRfXCun0+KbWY7Q== + +"@types/cors@^2.8.12": + version "2.8.13" + resolved "https://registry.yarnpkg.com/@types/cors/-/cors-2.8.13.tgz#b8ade22ba455a1b8cb3b5d3f35910fd204f84f94" + integrity sha512-RG8AStHlUiV5ysZQKq97copd2UmVYw3/pRMLefISZ3S1hK104Cwm7iLQ3fTKx+lsUH2CE8FlLaYeEA2LSeqYUA== + dependencies: + "@types/node" "*" + +"@types/eslint-scope@^3.7.3": + version "3.7.4" + resolved "https://registry.yarnpkg.com/@types/eslint-scope/-/eslint-scope-3.7.4.tgz#37fc1223f0786c39627068a12e94d6e6fc61de16" + integrity sha512-9K4zoImiZc3HlIp6AVUDE4CWYx22a+lhSZMYNpbjW04+YF0KWj4pJXnEMjdnFTiQibFFmElcsasJXDbdI/EPhA== + dependencies: + "@types/eslint" "*" + "@types/estree" "*" + +"@types/eslint@*": + version "8.40.0" + resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-8.40.0.tgz#ae73dc9ec5237f2794c4f79efd6a4c73b13daf23" + integrity sha512-nbq2mvc/tBrK9zQQuItvjJl++GTN5j06DaPtp3hZCpngmG6Q3xoyEmd0TwZI0gAy/G1X0zhGBbr2imsGFdFV0g== + dependencies: + "@types/estree" "*" + "@types/json-schema" "*" + +"@types/estree@*": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.1.tgz#aa22750962f3bf0e79d753d3cc067f010c95f194" + integrity sha512-LG4opVs2ANWZ1TJoKc937iMmNstM/d0ae1vNbnBvBhqCSezgVUOzcLCqbI5elV8Vy6WKwKjaqR+zO9VKirBBCA== + +"@types/estree@^0.0.51": + version "0.0.51" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.51.tgz#cfd70924a25a3fd32b218e5e420e6897e1ac4f40" + integrity sha512-CuPgU6f3eT/XgKKPqKd/gLZV1Xmvf1a2R5POBOGQa6uv82xpls89HU5zKeVoyR8XzHd1RGNOlQlvUe3CFkjWNQ== + +"@types/json-schema@*", "@types/json-schema@^7.0.8": + version "7.0.12" + resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.12.tgz#d70faba7039d5fca54c83c7dbab41051d2b6f6cb" + integrity sha512-Hr5Jfhc9eYOQNPYO5WLDq/n4jqijdHNlDXjuAQkkt+mWdQR+XJToOHrsD4cPaMXpn6KO7y2+wM8AZEs8VpBLVA== + +"@types/node@*", "@types/node@>=10.0.0": + version "20.2.5" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.2.5.tgz#26d295f3570323b2837d322180dfbf1ba156fefb" + integrity sha512-JJulVEQXmiY9Px5axXHeYGLSjhkZEnD+MDPDGbCbIAbMslkKwmygtZFy1X6s/075Yo94sf8GuSlFfPzysQrWZQ== + +"@ungap/promise-all-settled@1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz#aa58042711d6e3275dd37dc597e5d31e8c290a44" + integrity sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q== + +"@webassemblyjs/ast@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.11.1.tgz#2bfd767eae1a6996f432ff7e8d7fc75679c0b6a7" + integrity sha512-ukBh14qFLjxTQNTXocdyksN5QdM28S1CxHt2rdskFyL+xFV7VremuBLVbmCePj+URalXBENx/9Lm7lnhihtCSw== + dependencies: + "@webassemblyjs/helper-numbers" "1.11.1" + "@webassemblyjs/helper-wasm-bytecode" "1.11.1" + +"@webassemblyjs/floating-point-hex-parser@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.1.tgz#f6c61a705f0fd7a6aecaa4e8198f23d9dc179e4f" + integrity sha512-iGRfyc5Bq+NnNuX8b5hwBrRjzf0ocrJPI6GWFodBFzmFnyvrQ83SHKhmilCU/8Jv67i4GJZBMhEzltxzcNagtQ== + +"@webassemblyjs/helper-api-error@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.1.tgz#1a63192d8788e5c012800ba6a7a46c705288fd16" + integrity sha512-RlhS8CBCXfRUR/cwo2ho9bkheSXG0+NwooXcc3PAILALf2QLdFyj7KGsKRbVc95hZnhnERon4kW/D3SZpp6Tcg== + +"@webassemblyjs/helper-buffer@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.1.tgz#832a900eb444884cde9a7cad467f81500f5e5ab5" + integrity sha512-gwikF65aDNeeXa8JxXa2BAk+REjSyhrNC9ZwdT0f8jc4dQQeDQ7G4m0f2QCLPJiMTTO6wfDmRmj/pW0PsUvIcA== + +"@webassemblyjs/helper-numbers@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.1.tgz#64d81da219fbbba1e3bd1bfc74f6e8c4e10a62ae" + integrity sha512-vDkbxiB8zfnPdNK9Rajcey5C0w+QJugEglN0of+kmO8l7lDb77AnlKYQF7aarZuCrv+l0UvqL+68gSDr3k9LPQ== + dependencies: + "@webassemblyjs/floating-point-hex-parser" "1.11.1" + "@webassemblyjs/helper-api-error" "1.11.1" + "@xtuc/long" "4.2.2" + +"@webassemblyjs/helper-wasm-bytecode@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.1.tgz#f328241e41e7b199d0b20c18e88429c4433295e1" + integrity sha512-PvpoOGiJwXeTrSf/qfudJhwlvDQxFgelbMqtq52WWiXC6Xgg1IREdngmPN3bs4RoO83PnL/nFrxucXj1+BX62Q== + +"@webassemblyjs/helper-wasm-section@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.1.tgz#21ee065a7b635f319e738f0dd73bfbda281c097a" + integrity sha512-10P9No29rYX1j7F3EVPX3JvGPQPae+AomuSTPiF9eBQeChHI6iqjMIwR9JmOJXwpnn/oVGDk7I5IlskuMwU/pg== + dependencies: + "@webassemblyjs/ast" "1.11.1" + "@webassemblyjs/helper-buffer" "1.11.1" + "@webassemblyjs/helper-wasm-bytecode" "1.11.1" + "@webassemblyjs/wasm-gen" "1.11.1" + +"@webassemblyjs/ieee754@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/ieee754/-/ieee754-1.11.1.tgz#963929e9bbd05709e7e12243a099180812992614" + integrity sha512-hJ87QIPtAMKbFq6CGTkZYJivEwZDbQUgYd3qKSadTNOhVY7p+gfP6Sr0lLRVTaG1JjFj+r3YchoqRYxNH3M0GQ== + dependencies: + "@xtuc/ieee754" "^1.2.0" + +"@webassemblyjs/leb128@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/leb128/-/leb128-1.11.1.tgz#ce814b45574e93d76bae1fb2644ab9cdd9527aa5" + integrity sha512-BJ2P0hNZ0u+Th1YZXJpzW6miwqQUGcIHT1G/sf72gLVD9DZ5AdYTqPNbHZh6K1M5VmKvFXwGSWZADz+qBWxeRw== + dependencies: + "@xtuc/long" "4.2.2" + +"@webassemblyjs/utf8@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/utf8/-/utf8-1.11.1.tgz#d1f8b764369e7c6e6bae350e854dec9a59f0a3ff" + integrity sha512-9kqcxAEdMhiwQkHpkNiorZzqpGrodQQ2IGrHHxCy+Ozng0ofyMA0lTqiLkVs1uzTRejX+/O0EOT7KxqVPuXosQ== + +"@webassemblyjs/wasm-edit@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.1.tgz#ad206ebf4bf95a058ce9880a8c092c5dec8193d6" + integrity sha512-g+RsupUC1aTHfR8CDgnsVRVZFJqdkFHpsHMfJuWQzWU3tvnLC07UqHICfP+4XyL2tnr1amvl1Sdp06TnYCmVkA== + dependencies: + "@webassemblyjs/ast" "1.11.1" + "@webassemblyjs/helper-buffer" "1.11.1" + "@webassemblyjs/helper-wasm-bytecode" "1.11.1" + "@webassemblyjs/helper-wasm-section" "1.11.1" + "@webassemblyjs/wasm-gen" "1.11.1" + "@webassemblyjs/wasm-opt" "1.11.1" + "@webassemblyjs/wasm-parser" "1.11.1" + "@webassemblyjs/wast-printer" "1.11.1" + +"@webassemblyjs/wasm-gen@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.1.tgz#86c5ea304849759b7d88c47a32f4f039ae3c8f76" + integrity sha512-F7QqKXwwNlMmsulj6+O7r4mmtAlCWfO/0HdgOxSklZfQcDu0TpLiD1mRt/zF25Bk59FIjEuGAIyn5ei4yMfLhA== + dependencies: + "@webassemblyjs/ast" "1.11.1" + "@webassemblyjs/helper-wasm-bytecode" "1.11.1" + "@webassemblyjs/ieee754" "1.11.1" + "@webassemblyjs/leb128" "1.11.1" + "@webassemblyjs/utf8" "1.11.1" + +"@webassemblyjs/wasm-opt@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.1.tgz#657b4c2202f4cf3b345f8a4c6461c8c2418985f2" + integrity sha512-VqnkNqnZlU5EB64pp1l7hdm3hmQw7Vgqa0KF/KCNO9sIpI6Fk6brDEiX+iCOYrvMuBWDws0NkTOxYEb85XQHHw== + dependencies: + "@webassemblyjs/ast" "1.11.1" + "@webassemblyjs/helper-buffer" "1.11.1" + "@webassemblyjs/wasm-gen" "1.11.1" + "@webassemblyjs/wasm-parser" "1.11.1" + +"@webassemblyjs/wasm-parser@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.1.tgz#86ca734534f417e9bd3c67c7a1c75d8be41fb199" + integrity sha512-rrBujw+dJu32gYB7/Lup6UhdkPx9S9SnobZzRVL7VcBH9Bt9bCBLEuX/YXOOtBsOZ4NQrRykKhffRWHvigQvOA== + dependencies: + "@webassemblyjs/ast" "1.11.1" + "@webassemblyjs/helper-api-error" "1.11.1" + "@webassemblyjs/helper-wasm-bytecode" "1.11.1" + "@webassemblyjs/ieee754" "1.11.1" + "@webassemblyjs/leb128" "1.11.1" + "@webassemblyjs/utf8" "1.11.1" + +"@webassemblyjs/wast-printer@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-printer/-/wast-printer-1.11.1.tgz#d0c73beda8eec5426f10ae8ef55cee5e7084c2f0" + integrity sha512-IQboUWM4eKzWW+N/jij2sRatKMh99QEelo3Eb2q0qXkvPRISAj8Qxtmw5itwqK+TTkBuUIE45AxYPToqPtL5gg== + dependencies: + "@webassemblyjs/ast" "1.11.1" + "@xtuc/long" "4.2.2" + +"@webpack-cli/configtest@^1.2.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@webpack-cli/configtest/-/configtest-1.2.0.tgz#7b20ce1c12533912c3b217ea68262365fa29a6f5" + integrity sha512-4FB8Tj6xyVkyqjj1OaTqCjXYULB9FMkqQ8yGrZjRDrYh0nOE+7Lhs45WioWQQMV+ceFlE368Ukhe6xdvJM9Egg== + +"@webpack-cli/info@^1.5.0": + version "1.5.0" + resolved "https://registry.yarnpkg.com/@webpack-cli/info/-/info-1.5.0.tgz#6c78c13c5874852d6e2dd17f08a41f3fe4c261b1" + integrity sha512-e8tSXZpw2hPl2uMJY6fsMswaok5FdlGNRTktvFk2sD8RjH0hE2+XistawJx1vmKteh4NmGmNUrp+Tb2w+udPcQ== + dependencies: + envinfo "^7.7.3" + +"@webpack-cli/serve@^1.7.0": + version "1.7.0" + resolved "https://registry.yarnpkg.com/@webpack-cli/serve/-/serve-1.7.0.tgz#e1993689ac42d2b16e9194376cfb6753f6254db1" + integrity sha512-oxnCNGj88fL+xzV+dacXs44HcDwf1ovs3AuEzvP7mqXw7fQntqIhQ1BRmynh4qEKQSSSRSWVyXRjmTbZIX9V2Q== + +"@xtuc/ieee754@^1.2.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@xtuc/ieee754/-/ieee754-1.2.0.tgz#eef014a3145ae477a1cbc00cd1e552336dceb790" + integrity sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA== + +"@xtuc/long@4.2.2": + version "4.2.2" + resolved "https://registry.yarnpkg.com/@xtuc/long/-/long-4.2.2.tgz#d291c6a4e97989b5c61d9acf396ae4fe133a718d" + integrity sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ== + +abab@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.6.tgz#41b80f2c871d19686216b82309231cfd3cb3d291" + integrity sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA== + +accepts@~1.3.4: + version "1.3.8" + resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.8.tgz#0bf0be125b67014adcb0b0921e62db7bffe16b2e" + integrity sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw== + dependencies: + mime-types "~2.1.34" + negotiator "0.6.3" + +acorn-import-assertions@^1.7.6: + version "1.9.0" + resolved "https://registry.yarnpkg.com/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz#507276249d684797c84e0734ef84860334cfb1ac" + integrity sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA== + +acorn@^8.5.0, acorn@^8.7.1: + version "8.8.2" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.2.tgz#1b2f25db02af965399b9776b0c2c391276d37c4a" + integrity sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw== + +ajv-keywords@^3.5.2: + version "3.5.2" + resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.5.2.tgz#31f29da5ab6e00d1c2d329acf7b5929614d5014d" + integrity sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ== + +ajv@^6.12.5: + version "6.12.6" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" + integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== + dependencies: + fast-deep-equal "^3.1.1" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.4.1" + uri-js "^4.2.2" + +ansi-colors@4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348" + integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA== + +ansi-regex@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" + integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== + +ansi-styles@^4.0.0, ansi-styles@^4.1.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" + integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== + dependencies: + color-convert "^2.0.1" + +anymatch@~3.1.2: + version "3.1.3" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e" + integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw== + dependencies: + normalize-path "^3.0.0" + picomatch "^2.0.4" + +argparse@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" + integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== + +balanced-match@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" + integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== + +base64id@2.0.0, base64id@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/base64id/-/base64id-2.0.0.tgz#2770ac6bc47d312af97a8bf9a634342e0cd25cb6" + integrity sha512-lGe34o6EHj9y3Kts9R4ZYs/Gr+6N7MCaMlIFA3F1R2O5/m7K06AxfSeO5530PEERE6/WyEg3lsuyw4GHlPZHog== + +binary-extensions@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" + integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== + +body-parser@^1.19.0: + version "1.20.2" + resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.20.2.tgz#6feb0e21c4724d06de7ff38da36dad4f57a747fd" + integrity sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA== + dependencies: + bytes "3.1.2" + content-type "~1.0.5" + debug "2.6.9" + depd "2.0.0" + destroy "1.2.0" + http-errors "2.0.0" + iconv-lite "0.4.24" + on-finished "2.4.1" + qs "6.11.0" + raw-body "2.5.2" + type-is "~1.6.18" + unpipe "1.0.0" + +brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +brace-expansion@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.1.tgz#1edc459e0f0c548486ecf9fc99f2221364b9a0ae" + integrity sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA== + dependencies: + balanced-match "^1.0.0" + +braces@^3.0.2, braces@~3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" + integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== + dependencies: + fill-range "^7.0.1" + +browser-stdout@1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" + integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== + +browserslist@^4.14.5: + version "4.21.7" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.21.7.tgz#e2b420947e5fb0a58e8f4668ae6e23488127e551" + integrity sha512-BauCXrQ7I2ftSqd2mvKHGo85XR0u7Ru3C/Hxsy/0TkfCtjrmAbPdzLGasmoiBxplpDXlPvdjX9u7srIMfgasNA== + dependencies: + caniuse-lite "^1.0.30001489" + electron-to-chromium "^1.4.411" + node-releases "^2.0.12" + update-browserslist-db "^1.0.11" + +buffer-from@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" + integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== + +bytes@3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.2.tgz#8b0beeb98605adf1b128fa4386403c009e0221a5" + integrity sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg== + +call-bind@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c" + integrity sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA== + dependencies: + function-bind "^1.1.1" + get-intrinsic "^1.0.2" + +camelcase@^6.0.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" + integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== + +caniuse-lite@^1.0.30001489: + version "1.0.30001492" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001492.tgz#4a06861788a52b4c81fd3344573b68cc87fe062b" + integrity sha512-2efF8SAZwgAX1FJr87KWhvuJxnGJKOnctQa8xLOskAXNXq8oiuqgl6u1kk3fFpsp3GgvzlRjiK1sl63hNtFADw== + +chalk@^4.1.0: + version "4.1.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" + integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + +chokidar@3.5.3, chokidar@^3.5.1: + version "3.5.3" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd" + integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== + dependencies: + anymatch "~3.1.2" + braces "~3.0.2" + glob-parent "~5.1.2" + is-binary-path "~2.1.0" + is-glob "~4.0.1" + normalize-path "~3.0.0" + readdirp "~3.6.0" + optionalDependencies: + fsevents "~2.3.2" + +chrome-trace-event@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz#1015eced4741e15d06664a957dbbf50d041e26ac" + integrity sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg== + +cliui@^7.0.2: + version "7.0.4" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f" + integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ== + dependencies: + string-width "^4.2.0" + strip-ansi "^6.0.0" + wrap-ansi "^7.0.0" + +clone-deep@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/clone-deep/-/clone-deep-4.0.1.tgz#c19fd9bdbbf85942b4fd979c84dcf7d5f07c2387" + integrity sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ== + dependencies: + is-plain-object "^2.0.4" + kind-of "^6.0.2" + shallow-clone "^3.0.0" + +color-convert@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" + integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== + dependencies: + color-name "~1.1.4" + +color-name@~1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" + integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== + +colorette@^2.0.14: + version "2.0.20" + resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.20.tgz#9eb793e6833067f7235902fcd3b09917a000a95a" + integrity sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w== + +commander@^2.20.0: + version "2.20.3" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" + integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== + +commander@^7.0.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7" + integrity sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw== + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== + +connect@^3.7.0: + version "3.7.0" + resolved "https://registry.yarnpkg.com/connect/-/connect-3.7.0.tgz#5d49348910caa5e07a01800b030d0c35f20484f8" + integrity sha512-ZqRXc+tZukToSNmh5C2iWMSoV3X1YUcPbqEM4DkEG5tNQXrQUZCNVGGv3IuicnkMtPfGf3Xtp8WCXs295iQ1pQ== + dependencies: + debug "2.6.9" + finalhandler "1.1.2" + parseurl "~1.3.3" + utils-merge "1.0.1" + +content-type@~1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.5.tgz#8b773162656d1d1086784c8f23a54ce6d73d7918" + integrity sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA== + +cookie@~0.4.1: + version "0.4.2" + resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.2.tgz#0e41f24de5ecf317947c82fc789e06a884824432" + integrity sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA== + +cors@~2.8.5: + version "2.8.5" + resolved "https://registry.yarnpkg.com/cors/-/cors-2.8.5.tgz#eac11da51592dd86b9f06f6e7ac293b3df875d29" + integrity sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g== + dependencies: + object-assign "^4" + vary "^1" + +cross-spawn@^7.0.3: + version "7.0.3" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" + integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== + dependencies: + path-key "^3.1.0" + shebang-command "^2.0.0" + which "^2.0.1" + +custom-event@~1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/custom-event/-/custom-event-1.0.1.tgz#5d02a46850adf1b4a317946a3928fccb5bfd0425" + integrity sha512-GAj5FOq0Hd+RsCGVJxZuKaIDXDf3h6GQoNEjFgbLLI/trgtavwUbSnZ5pVfg27DVCaWjIohryS0JFwIJyT2cMg== + +date-format@^4.0.14: + version "4.0.14" + resolved "https://registry.yarnpkg.com/date-format/-/date-format-4.0.14.tgz#7a8e584434fb169a521c8b7aa481f355810d9400" + integrity sha512-39BOQLs9ZjKh0/patS9nrT8wc3ioX3/eA/zgbKNopnF2wCqJEoxywwwElATYvRsXdnOxA/OQeQoFZ3rFjVajhg== + +debug@2.6.9: + version "2.6.9" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" + integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== + dependencies: + ms "2.0.0" + +debug@4.3.4, debug@^4.3.4, debug@~4.3.1, debug@~4.3.2: + version "4.3.4" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" + integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== + dependencies: + ms "2.1.2" + +decamelize@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-4.0.0.tgz#aa472d7bf660eb15f3494efd531cab7f2a709837" + integrity sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ== + +depd@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/depd/-/depd-2.0.0.tgz#b696163cc757560d09cf22cc8fad1571b79e76df" + integrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw== + +destroy@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.2.0.tgz#4803735509ad8be552934c67df614f94e66fa015" + integrity sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg== + +di@^0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/di/-/di-0.0.1.tgz#806649326ceaa7caa3306d75d985ea2748ba913c" + integrity sha512-uJaamHkagcZtHPqCIHZxnFrXlunQXgBOsZSUOWwFw31QJCAbyTBoHMW75YOTur5ZNx8pIeAKgf6GWIgaqqiLhA== + +diff@5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-5.0.0.tgz#7ed6ad76d859d030787ec35855f5b1daf31d852b" + integrity sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w== + +dom-serialize@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/dom-serialize/-/dom-serialize-2.2.1.tgz#562ae8999f44be5ea3076f5419dcd59eb43ac95b" + integrity sha512-Yra4DbvoW7/Z6LBN560ZwXMjoNOSAN2wRsKFGc4iBeso+mpIA6qj1vfdf9HpMaKAqG6wXTy+1SYEzmNpKXOSsQ== + dependencies: + custom-event "~1.0.0" + ent "~2.2.0" + extend "^3.0.0" + void-elements "^2.0.0" + +ee-first@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" + integrity sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow== + +electron-to-chromium@^1.4.411: + version "1.4.416" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.416.tgz#7291f704168d3842ae4da3ae9fdc7bfbeb97d116" + integrity sha512-AUYh0XDTb2vrj0rj82jb3P9hHSyzQNdTPYWZIhPdCOui7/vpme7+HTE07BE5jwuqg/34TZ8ktlRz6GImJ4IXjA== + +emoji-regex@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" + integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== + +encodeurl@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" + integrity sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w== + +engine.io-parser@~5.0.3: + version "5.0.7" + resolved "https://registry.yarnpkg.com/engine.io-parser/-/engine.io-parser-5.0.7.tgz#ed5eae76c71f398284c578ab6deafd3ba7e4e4f6" + integrity sha512-P+jDFbvK6lE3n1OL+q9KuzdOFWkkZ/cMV9gol/SbVfpyqfvrfrFTOFJ6fQm2VC3PZHlU3QPhVwmbsCnauHF2MQ== + +engine.io@~6.4.2: + version "6.4.2" + resolved "https://registry.yarnpkg.com/engine.io/-/engine.io-6.4.2.tgz#ffeaf68f69b1364b0286badddf15ff633476473f" + integrity sha512-FKn/3oMiJjrOEOeUub2WCox6JhxBXq/Zn3fZOMCBxKnNYtsdKjxhl7yR3fZhM9PV+rdE75SU5SYMc+2PGzo+Tg== + dependencies: + "@types/cookie" "^0.4.1" + "@types/cors" "^2.8.12" + "@types/node" ">=10.0.0" + accepts "~1.3.4" + base64id "2.0.0" + cookie "~0.4.1" + cors "~2.8.5" + debug "~4.3.1" + engine.io-parser "~5.0.3" + ws "~8.11.0" + +enhanced-resolve@^5.10.0: + version "5.14.1" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.14.1.tgz#de684b6803724477a4af5d74ccae5de52c25f6b3" + integrity sha512-Vklwq2vDKtl0y/vtwjSesgJ5MYS7Etuk5txS8VdKL4AOS1aUlD96zqIfsOSLQsdv3xgMRbtkWM8eG9XDfKUPow== + dependencies: + graceful-fs "^4.2.4" + tapable "^2.2.0" + +ent@~2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/ent/-/ent-2.2.0.tgz#e964219325a21d05f44466a2f686ed6ce5f5dd1d" + integrity sha512-GHrMyVZQWvTIdDtpiEXdHZnFQKzeO09apj8Cbl4pKWy4i0Oprcq17usfDt5aO63swf0JOeMWjWQE/LzgSRuWpA== + +envinfo@^7.7.3: + version "7.8.1" + resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.8.1.tgz#06377e3e5f4d379fea7ac592d5ad8927e0c4d475" + integrity sha512-/o+BXHmB7ocbHEAs6F2EnG0ogybVVUdkRunTT2glZU9XAaGmhqskrvKwqXuDfNjEO0LZKWdejEEpnq8aM0tOaw== + +es-module-lexer@^0.9.0: + version "0.9.3" + resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-0.9.3.tgz#6f13db00cc38417137daf74366f535c8eb438f19" + integrity sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ== + +escalade@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" + integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== + +escape-html@~1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" + integrity sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow== + +escape-string-regexp@4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" + integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== + +eslint-scope@5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" + integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== + dependencies: + esrecurse "^4.3.0" + estraverse "^4.1.1" + +esrecurse@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921" + integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== + dependencies: + estraverse "^5.2.0" + +estraverse@^4.1.1: + version "4.3.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" + integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== + +estraverse@^5.2.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" + integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== + +eventemitter3@^4.0.0: + version "4.0.7" + resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f" + integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw== + +events@^3.2.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" + integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== + +extend@^3.0.0: + version "3.0.2" + resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" + integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== + +fast-deep-equal@^3.1.1: + version "3.1.3" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" + integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== + +fast-json-stable-stringify@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" + integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== + +fastest-levenshtein@^1.0.12: + version "1.0.16" + resolved "https://registry.yarnpkg.com/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz#210e61b6ff181de91ea9b3d1b84fdedd47e034e5" + integrity sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg== + +fill-range@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" + integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== + dependencies: + to-regex-range "^5.0.1" + +finalhandler@1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.2.tgz#b7e7d000ffd11938d0fdb053506f6ebabe9f587d" + integrity sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA== + dependencies: + debug "2.6.9" + encodeurl "~1.0.2" + escape-html "~1.0.3" + on-finished "~2.3.0" + parseurl "~1.3.3" + statuses "~1.5.0" + unpipe "~1.0.0" + +find-up@5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" + integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== + dependencies: + locate-path "^6.0.0" + path-exists "^4.0.0" + +find-up@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" + integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== + dependencies: + locate-path "^5.0.0" + path-exists "^4.0.0" + +flat@^5.0.2: + version "5.0.2" + resolved "https://registry.yarnpkg.com/flat/-/flat-5.0.2.tgz#8ca6fe332069ffa9d324c327198c598259ceb241" + integrity sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ== + +flatted@^3.2.7: + version "3.2.7" + resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.7.tgz#609f39207cb614b89d0765b477cb2d437fbf9787" + integrity sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ== + +follow-redirects@^1.0.0: + version "1.15.2" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.2.tgz#b460864144ba63f2681096f274c4e57026da2c13" + integrity sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA== + +format-util@1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/format-util/-/format-util-1.0.5.tgz#1ffb450c8a03e7bccffe40643180918cc297d271" + integrity sha512-varLbTj0e0yVyRpqQhuWV+8hlePAgaoFRhNFj50BNjEIrw1/DphHSObtqwskVCPWNgzwPoQrZAbfa/SBiicNeg== + +fs-extra@^8.1.0: + version "8.1.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-8.1.0.tgz#49d43c45a88cd9677668cb7be1b46efdb8d2e1c0" + integrity sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g== + dependencies: + graceful-fs "^4.2.0" + jsonfile "^4.0.0" + universalify "^0.1.0" + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== + +fsevents@~2.3.2: + version "2.3.2" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" + integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== + +function-bind@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" + integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== + +get-caller-file@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" + integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== + +get-intrinsic@^1.0.2: + version "1.2.1" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.1.tgz#d295644fed4505fc9cde952c37ee12b477a83d82" + integrity sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw== + dependencies: + function-bind "^1.1.1" + has "^1.0.3" + has-proto "^1.0.1" + has-symbols "^1.0.3" + +glob-parent@~5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" + integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== + dependencies: + is-glob "^4.0.1" + +glob-to-regexp@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz#c75297087c851b9a578bd217dd59a92f59fe546e" + integrity sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw== + +glob@7.2.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.0.tgz#d15535af7732e02e948f4c41628bd910293f6023" + integrity sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + +glob@^7.1.3, glob@^7.1.7: + version "7.2.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" + integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.1.1" + once "^1.3.0" + path-is-absolute "^1.0.0" + +graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.4, graceful-fs@^4.2.6, graceful-fs@^4.2.9: + version "4.2.11" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" + integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== + +has-flag@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" + integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== + +has-proto@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.0.1.tgz#1885c1305538958aff469fef37937c22795408e0" + integrity sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg== + +has-symbols@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" + integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== + +has@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" + integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== + dependencies: + function-bind "^1.1.1" + +he@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" + integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== + +http-errors@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-2.0.0.tgz#b7774a1486ef73cf7667ac9ae0858c012c57b9d3" + integrity sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ== + dependencies: + depd "2.0.0" + inherits "2.0.4" + setprototypeof "1.2.0" + statuses "2.0.1" + toidentifier "1.0.1" + +http-proxy@^1.18.1: + version "1.18.1" + resolved "https://registry.yarnpkg.com/http-proxy/-/http-proxy-1.18.1.tgz#401541f0534884bbf95260334e72f88ee3976549" + integrity sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ== + dependencies: + eventemitter3 "^4.0.0" + follow-redirects "^1.0.0" + requires-port "^1.0.0" + +iconv-lite@0.4.24: + version "0.4.24" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" + integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== + dependencies: + safer-buffer ">= 2.1.2 < 3" + +iconv-lite@^0.6.3: + version "0.6.3" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.3.tgz#a52f80bf38da1952eb5c681790719871a1a72501" + integrity sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw== + dependencies: + safer-buffer ">= 2.1.2 < 3.0.0" + +import-local@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/import-local/-/import-local-3.1.0.tgz#b4479df8a5fd44f6cdce24070675676063c95cb4" + integrity sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg== + dependencies: + pkg-dir "^4.2.0" + resolve-cwd "^3.0.0" + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2, inherits@2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== + +interpret@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/interpret/-/interpret-2.2.0.tgz#1a78a0b5965c40a5416d007ad6f50ad27c417df9" + integrity sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw== + +is-binary-path@~2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" + integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== + dependencies: + binary-extensions "^2.0.0" + +is-core-module@^2.11.0: + version "2.12.1" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.12.1.tgz#0c0b6885b6f80011c71541ce15c8d66cf5a4f9fd" + integrity sha512-Q4ZuBAe2FUsKtyQJoQHlvP8OvBERxO3jEmy1I7hcRXcJBGGHFh/aJBswbXuS9sgrDH2QUO8ilkwNPHvHMd8clg== + dependencies: + has "^1.0.3" + +is-extglob@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" + integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== + +is-fullwidth-code-point@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" + integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== + +is-glob@^4.0.1, is-glob@~4.0.1: + version "4.0.3" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" + integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== + dependencies: + is-extglob "^2.1.1" + +is-number@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" + integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== + +is-plain-obj@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-2.1.0.tgz#45e42e37fccf1f40da8e5f76ee21515840c09287" + integrity sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA== + +is-plain-object@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" + integrity sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og== + dependencies: + isobject "^3.0.1" + +is-unicode-supported@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz#3f26c76a809593b52bfa2ecb5710ed2779b522a7" + integrity sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw== + +isbinaryfile@^4.0.8: + version "4.0.10" + resolved "https://registry.yarnpkg.com/isbinaryfile/-/isbinaryfile-4.0.10.tgz#0c5b5e30c2557a2f06febd37b7322946aaee42b3" + integrity sha512-iHrqe5shvBUcFbmZq9zOQHBoeOhZJu6RQGrDpBgenUm/Am+F3JM2MgQj+rK3Z601fzrL5gLZWtAPH2OBaSVcyw== + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== + +isobject@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" + integrity sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg== + +jest-worker@^27.4.5: + version "27.5.1" + resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-27.5.1.tgz#8d146f0900e8973b106b6f73cc1e9a8cb86f8db0" + integrity sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg== + dependencies: + "@types/node" "*" + merge-stream "^2.0.0" + supports-color "^8.0.0" + +js-yaml@4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" + integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== + dependencies: + argparse "^2.0.1" + +json-parse-even-better-errors@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d" + integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w== + +json-schema-traverse@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" + integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== + +jsonfile@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" + integrity sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg== + optionalDependencies: + graceful-fs "^4.1.6" + +karma-chrome-launcher@3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/karma-chrome-launcher/-/karma-chrome-launcher-3.1.1.tgz#baca9cc071b1562a1db241827257bfe5cab597ea" + integrity sha512-hsIglcq1vtboGPAN+DGCISCFOxW+ZVnIqhDQcCMqqCp+4dmJ0Qpq5QAjkbA0X2L9Mi6OBkHi2Srrbmm7pUKkzQ== + dependencies: + which "^1.2.1" + +karma-mocha@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/karma-mocha/-/karma-mocha-2.0.1.tgz#4b0254a18dfee71bdbe6188d9a6861bf86b0cd7d" + integrity sha512-Tzd5HBjm8his2OA4bouAsATYEpZrp9vC7z5E5j4C5Of5Rrs1jY67RAwXNcVmd/Bnk1wgvQRou0zGVLey44G4tQ== + dependencies: + minimist "^1.2.3" + +karma-sourcemap-loader@0.3.8: + version "0.3.8" + resolved "https://registry.yarnpkg.com/karma-sourcemap-loader/-/karma-sourcemap-loader-0.3.8.tgz#d4bae72fb7a8397328a62b75013d2df937bdcf9c" + integrity sha512-zorxyAakYZuBcHRJE+vbrK2o2JXLFWK8VVjiT/6P+ltLBUGUvqTEkUiQ119MGdOrK7mrmxXHZF1/pfT6GgIZ6g== + dependencies: + graceful-fs "^4.1.2" + +karma-webpack@5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/karma-webpack/-/karma-webpack-5.0.0.tgz#2a2c7b80163fe7ffd1010f83f5507f95ef39f840" + integrity sha512-+54i/cd3/piZuP3dr54+NcFeKOPnys5QeM1IY+0SPASwrtHsliXUiCL50iW+K9WWA7RvamC4macvvQ86l3KtaA== + dependencies: + glob "^7.1.3" + minimatch "^3.0.4" + webpack-merge "^4.1.5" + +karma@6.4.0: + version "6.4.0" + resolved "https://registry.yarnpkg.com/karma/-/karma-6.4.0.tgz#82652dfecdd853ec227b74ed718a997028a99508" + integrity sha512-s8m7z0IF5g/bS5ONT7wsOavhW4i4aFkzD4u4wgzAQWT4HGUeWI3i21cK2Yz6jndMAeHETp5XuNsRoyGJZXVd4w== + dependencies: + "@colors/colors" "1.5.0" + body-parser "^1.19.0" + braces "^3.0.2" + chokidar "^3.5.1" + connect "^3.7.0" + di "^0.0.1" + dom-serialize "^2.2.1" + glob "^7.1.7" + graceful-fs "^4.2.6" + http-proxy "^1.18.1" + isbinaryfile "^4.0.8" + lodash "^4.17.21" + log4js "^6.4.1" + mime "^2.5.2" + minimatch "^3.0.4" + mkdirp "^0.5.5" + qjobs "^1.2.0" + range-parser "^1.2.1" + rimraf "^3.0.2" + socket.io "^4.4.1" + source-map "^0.6.1" + tmp "^0.2.1" + ua-parser-js "^0.7.30" + yargs "^16.1.1" + +kind-of@^6.0.2: + version "6.0.3" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" + integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== + +loader-runner@^4.2.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-4.3.0.tgz#c1b4a163b99f614830353b16755e7149ac2314e1" + integrity sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg== + +locate-path@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" + integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== + dependencies: + p-locate "^4.1.0" + +locate-path@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" + integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== + dependencies: + p-locate "^5.0.0" + +lodash@^4.17.15, lodash@^4.17.21: + version "4.17.21" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" + integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== + +log-symbols@4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.1.0.tgz#3fbdbb95b4683ac9fc785111e792e558d4abd503" + integrity sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg== + dependencies: + chalk "^4.1.0" + is-unicode-supported "^0.1.0" + +log4js@^6.4.1: + version "6.9.1" + resolved "https://registry.yarnpkg.com/log4js/-/log4js-6.9.1.tgz#aba5a3ff4e7872ae34f8b4c533706753709e38b6" + integrity sha512-1somDdy9sChrr9/f4UlzhdaGfDR2c/SaD2a4T7qEkG4jTS57/B3qmnjLYePwQ8cqWnUHZI0iAKxMBpCZICiZ2g== + dependencies: + date-format "^4.0.14" + debug "^4.3.4" + flatted "^3.2.7" + rfdc "^1.3.0" + streamroller "^3.1.5" + +media-typer@0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" + integrity sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ== + +merge-stream@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" + integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== + +mime-db@1.52.0: + version "1.52.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" + integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== + +mime-types@^2.1.27, mime-types@~2.1.24, mime-types@~2.1.34: + version "2.1.35" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" + integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== + dependencies: + mime-db "1.52.0" + +mime@^2.5.2: + version "2.6.0" + resolved "https://registry.yarnpkg.com/mime/-/mime-2.6.0.tgz#a2a682a95cd4d0cb1d6257e28f83da7e35800367" + integrity sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg== + +minimatch@5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.0.1.tgz#fb9022f7528125187c92bd9e9b6366be1cf3415b" + integrity sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g== + dependencies: + brace-expansion "^2.0.1" + +minimatch@^3.0.4, minimatch@^3.1.1: + version "3.1.2" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" + integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== + dependencies: + brace-expansion "^1.1.7" + +minimist@^1.2.3, minimist@^1.2.6: + version "1.2.8" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" + integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== + +mkdirp@^0.5.5: + version "0.5.6" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.6.tgz#7def03d2432dcae4ba1d611445c48396062255f6" + integrity sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw== + dependencies: + minimist "^1.2.6" + +mocha@10.0.0: + version "10.0.0" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-10.0.0.tgz#205447d8993ec755335c4b13deba3d3a13c4def9" + integrity sha512-0Wl+elVUD43Y0BqPZBzZt8Tnkw9CMUdNYnUsTfOM1vuhJVZL+kiesFYsqwBkEEuEixaiPe5ZQdqDgX2jddhmoA== + dependencies: + "@ungap/promise-all-settled" "1.1.2" + ansi-colors "4.1.1" + browser-stdout "1.3.1" + chokidar "3.5.3" + debug "4.3.4" + diff "5.0.0" + escape-string-regexp "4.0.0" + find-up "5.0.0" + glob "7.2.0" + he "1.2.0" + js-yaml "4.1.0" + log-symbols "4.1.0" + minimatch "5.0.1" + ms "2.1.3" + nanoid "3.3.3" + serialize-javascript "6.0.0" + strip-json-comments "3.1.1" + supports-color "8.1.1" + workerpool "6.2.1" + yargs "16.2.0" + yargs-parser "20.2.4" + yargs-unparser "2.0.0" + +ms@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + integrity sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A== + +ms@2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" + integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== + +ms@2.1.3: + version "2.1.3" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" + integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== + +nanoid@3.3.3: + version "3.3.3" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.3.tgz#fd8e8b7aa761fe807dba2d1b98fb7241bb724a25" + integrity sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w== + +negotiator@0.6.3: + version "0.6.3" + resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.3.tgz#58e323a72fedc0d6f9cd4d31fe49f51479590ccd" + integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg== + +neo-async@^2.6.2: + version "2.6.2" + resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" + integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== + +node-releases@^2.0.12: + version "2.0.12" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.12.tgz#35627cc224a23bfb06fb3380f2b3afaaa7eb1039" + integrity sha512-QzsYKWhXTWx8h1kIvqfnC++o0pEmpRQA/aenALsL2F4pqNVr7YzcdMlDij5WBnwftRbJCNJL/O7zdKaxKPHqgQ== + +normalize-path@^3.0.0, normalize-path@~3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" + integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== + +object-assign@^4: + version "4.1.1" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg== + +object-inspect@^1.9.0: + version "1.12.3" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.3.tgz#ba62dffd67ee256c8c086dfae69e016cd1f198b9" + integrity sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g== + +on-finished@2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.4.1.tgz#58c8c44116e54845ad57f14ab10b03533184ac3f" + integrity sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg== + dependencies: + ee-first "1.1.1" + +on-finished@~2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" + integrity sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww== + dependencies: + ee-first "1.1.1" + +once@^1.3.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== + dependencies: + wrappy "1" + +p-limit@^2.2.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" + integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== + dependencies: + p-try "^2.0.0" + +p-limit@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" + integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== + dependencies: + yocto-queue "^0.1.0" + +p-locate@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" + integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== + dependencies: + p-limit "^2.2.0" + +p-locate@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" + integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== + dependencies: + p-limit "^3.0.2" + +p-try@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" + integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== + +parseurl@~1.3.3: + version "1.3.3" + resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" + integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== + +path-exists@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" + integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== + +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== + +path-key@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" + integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== + +path-parse@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" + integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== + +picocolors@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" + integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== + +picomatch@^2.0.4, picomatch@^2.2.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" + integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== + +pkg-dir@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3" + integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ== + dependencies: + find-up "^4.0.0" + +punycode@^2.1.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.0.tgz#f67fa67c94da8f4d0cfff981aee4118064199b8f" + integrity sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA== + +qjobs@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/qjobs/-/qjobs-1.2.0.tgz#c45e9c61800bd087ef88d7e256423bdd49e5d071" + integrity sha512-8YOJEHtxpySA3fFDyCRxA+UUV+fA+rTWnuWvylOK/NCjhY+b4ocCtmu8TtsWb+mYeU+GCHf/S66KZF/AsteKHg== + +qs@6.11.0: + version "6.11.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.11.0.tgz#fd0d963446f7a65e1367e01abd85429453f0c37a" + integrity sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q== + dependencies: + side-channel "^1.0.4" + +randombytes@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" + integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== + dependencies: + safe-buffer "^5.1.0" + +range-parser@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" + integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== + +raw-body@2.5.2: + version "2.5.2" + resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.5.2.tgz#99febd83b90e08975087e8f1f9419a149366b68a" + integrity sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA== + dependencies: + bytes "3.1.2" + http-errors "2.0.0" + iconv-lite "0.4.24" + unpipe "1.0.0" + +readdirp@~3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" + integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA== + dependencies: + picomatch "^2.2.1" + +rechoir@^0.7.0: + version "0.7.1" + resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.7.1.tgz#9478a96a1ca135b5e88fc027f03ee92d6c645686" + integrity sha512-/njmZ8s1wVeR6pjTZ+0nCnv8SpZNRMT2D1RLOJQESlYFDBvwpTA4KWJpZ+sBJ4+vhjILRcK7JIFdGCdxEAAitg== + dependencies: + resolve "^1.9.0" + +require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== + +requires-port@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" + integrity sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ== + +resolve-cwd@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-3.0.0.tgz#0f0075f1bb2544766cf73ba6a6e2adfebcb13f2d" + integrity sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg== + dependencies: + resolve-from "^5.0.0" + +resolve-from@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" + integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== + +resolve@^1.9.0: + version "1.22.2" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.2.tgz#0ed0943d4e301867955766c9f3e1ae6d01c6845f" + integrity sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g== + dependencies: + is-core-module "^2.11.0" + path-parse "^1.0.7" + supports-preserve-symlinks-flag "^1.0.0" + +rfdc@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/rfdc/-/rfdc-1.3.0.tgz#d0b7c441ab2720d05dc4cf26e01c89631d9da08b" + integrity sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA== + +rimraf@^3.0.0, rimraf@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" + integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== + dependencies: + glob "^7.1.3" + +safe-buffer@^5.1.0: + version "5.2.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" + integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== + +"safer-buffer@>= 2.1.2 < 3", "safer-buffer@>= 2.1.2 < 3.0.0": + version "2.1.2" + resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" + integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== + +schema-utils@^3.1.0, schema-utils@^3.1.1: + version "3.1.2" + resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-3.1.2.tgz#36c10abca6f7577aeae136c804b0c741edeadc99" + integrity sha512-pvjEHOgWc9OWA/f/DE3ohBWTD6EleVLf7iFUkoSwAxttdBhB9QUebQgxER2kWueOvRJXPHNnyrvvh9eZINB8Eg== + dependencies: + "@types/json-schema" "^7.0.8" + ajv "^6.12.5" + ajv-keywords "^3.5.2" + +serialize-javascript@6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.0.tgz#efae5d88f45d7924141da8b5c3a7a7e663fefeb8" + integrity sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag== + dependencies: + randombytes "^2.1.0" + +serialize-javascript@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.1.tgz#b206efb27c3da0b0ab6b52f48d170b7996458e5c" + integrity sha512-owoXEFjWRllis8/M1Q+Cw5k8ZH40e3zhp/ovX+Xr/vi1qj6QesbyXXViFbpNvWvPNAD62SutwEXavefrLJWj7w== + dependencies: + randombytes "^2.1.0" + +setprototypeof@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.2.0.tgz#66c9a24a73f9fc28cbe66b09fed3d33dcaf1b424" + integrity sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw== + +shallow-clone@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/shallow-clone/-/shallow-clone-3.0.1.tgz#8f2981ad92531f55035b01fb230769a40e02efa3" + integrity sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA== + dependencies: + kind-of "^6.0.2" + +shebang-command@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" + integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== + dependencies: + shebang-regex "^3.0.0" + +shebang-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" + integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== + +side-channel@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf" + integrity sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw== + dependencies: + call-bind "^1.0.0" + get-intrinsic "^1.0.2" + object-inspect "^1.9.0" + +socket.io-adapter@~2.5.2: + version "2.5.2" + resolved "https://registry.yarnpkg.com/socket.io-adapter/-/socket.io-adapter-2.5.2.tgz#5de9477c9182fdc171cd8c8364b9a8894ec75d12" + integrity sha512-87C3LO/NOMc+eMcpcxUBebGjkpMDkNBS9tf7KJqcDsmL936EChtVva71Dw2q4tQcuVC+hAUy4an2NO/sYXmwRA== + dependencies: + ws "~8.11.0" + +socket.io-parser@~4.2.4: + version "4.2.4" + resolved "https://registry.yarnpkg.com/socket.io-parser/-/socket.io-parser-4.2.4.tgz#c806966cf7270601e47469ddeec30fbdfda44c83" + integrity sha512-/GbIKmo8ioc+NIWIhwdecY0ge+qVBSMdgxGygevmdHj24bsfgtCmcUUcQ5ZzcylGFHsN3k4HB4Cgkl96KVnuew== + dependencies: + "@socket.io/component-emitter" "~3.1.0" + debug "~4.3.1" + +socket.io@^4.4.1: + version "4.6.2" + resolved "https://registry.yarnpkg.com/socket.io/-/socket.io-4.6.2.tgz#d597db077d4df9cbbdfaa7a9ed8ccc3d49439786" + integrity sha512-Vp+lSks5k0dewYTfwgPT9UeGGd+ht7sCpB7p0e83VgO4X/AHYWhXITMrNk/pg8syY2bpx23ptClCQuHhqi2BgQ== + dependencies: + accepts "~1.3.4" + base64id "~2.0.0" + debug "~4.3.2" + engine.io "~6.4.2" + socket.io-adapter "~2.5.2" + socket.io-parser "~4.2.4" + +source-map-js@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c" + integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw== + +source-map-loader@4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/source-map-loader/-/source-map-loader-4.0.0.tgz#bdc6b118bc6c87ee4d8d851f2d4efcc5abdb2ef5" + integrity sha512-i3KVgM3+QPAHNbGavK+VBq03YoJl24m9JWNbLgsjTj8aJzXG9M61bantBTNBt7CNwY2FYf+RJRYJ3pzalKjIrw== + dependencies: + abab "^2.0.6" + iconv-lite "^0.6.3" + source-map-js "^1.0.2" + +source-map-support@0.5.21, source-map-support@~0.5.20: + version "0.5.21" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f" + integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w== + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" + +source-map@^0.6.0, source-map@^0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== + +statuses@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/statuses/-/statuses-2.0.1.tgz#55cb000ccf1d48728bd23c685a063998cf1a1b63" + integrity sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ== + +statuses@~1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" + integrity sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA== + +streamroller@^3.1.5: + version "3.1.5" + resolved "https://registry.yarnpkg.com/streamroller/-/streamroller-3.1.5.tgz#1263182329a45def1ffaef58d31b15d13d2ee7ff" + integrity sha512-KFxaM7XT+irxvdqSP1LGLgNWbYN7ay5owZ3r/8t77p+EtSUAfUgtl7be3xtqtOmGUl9K9YPO2ca8133RlTjvKw== + dependencies: + date-format "^4.0.14" + debug "^4.3.4" + fs-extra "^8.1.0" + +string-width@^4.1.0, string-width@^4.2.0: + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + +strip-ansi@^6.0.0, strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + +strip-json-comments@3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" + integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== + +supports-color@8.1.1, supports-color@^8.0.0: + version "8.1.1" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" + integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== + dependencies: + has-flag "^4.0.0" + +supports-color@^7.1.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" + integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== + dependencies: + has-flag "^4.0.0" + +supports-preserve-symlinks-flag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" + integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== + +tapable@^2.1.1, tapable@^2.2.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.1.tgz#1967a73ef4060a82f12ab96af86d52fdb76eeca0" + integrity sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ== + +terser-webpack-plugin@^5.1.3: + version "5.3.9" + resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.3.9.tgz#832536999c51b46d468067f9e37662a3b96adfe1" + integrity sha512-ZuXsqE07EcggTWQjXUj+Aot/OMcD0bMKGgF63f7UxYcu5/AJF53aIpK1YoP5xR9l6s/Hy2b+t1AM0bLNPRuhwA== + dependencies: + "@jridgewell/trace-mapping" "^0.3.17" + jest-worker "^27.4.5" + schema-utils "^3.1.1" + serialize-javascript "^6.0.1" + terser "^5.16.8" + +terser@^5.16.8: + version "5.17.6" + resolved "https://registry.yarnpkg.com/terser/-/terser-5.17.6.tgz#d810e75e1bb3350c799cd90ebefe19c9412c12de" + integrity sha512-V8QHcs8YuyLkLHsJO5ucyff1ykrLVsR4dNnS//L5Y3NiSXpbK1J+WMVUs67eI0KTxs9JtHhgEQpXQVHlHI92DQ== + dependencies: + "@jridgewell/source-map" "^0.3.2" + acorn "^8.5.0" + commander "^2.20.0" + source-map-support "~0.5.20" + +tmp@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.2.1.tgz#8457fc3037dcf4719c251367a1af6500ee1ccf14" + integrity sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ== + dependencies: + rimraf "^3.0.0" + +to-regex-range@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" + integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== + dependencies: + is-number "^7.0.0" + +toidentifier@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.1.tgz#3be34321a88a820ed1bd80dfaa33e479fbb8dd35" + integrity sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA== + +type-is@~1.6.18: + version "1.6.18" + resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131" + integrity sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g== + dependencies: + media-typer "0.3.0" + mime-types "~2.1.24" + +ua-parser-js@^0.7.30: + version "0.7.35" + resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.35.tgz#8bda4827be4f0b1dda91699a29499575a1f1d307" + integrity sha512-veRf7dawaj9xaWEu9HoTVn5Pggtc/qj+kqTOFvNiN1l0YdxwC1kvel57UCjThjGa3BHBihE8/UJAHI+uQHmd/g== + +universalify@^0.1.0: + version "0.1.2" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" + integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== + +unpipe@1.0.0, unpipe@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" + integrity sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ== + +update-browserslist-db@^1.0.11: + version "1.0.11" + resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz#9a2a641ad2907ae7b3616506f4b977851db5b940" + integrity sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA== + dependencies: + escalade "^3.1.1" + picocolors "^1.0.0" + +uri-js@^4.2.2: + version "4.4.1" + resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" + integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== + dependencies: + punycode "^2.1.0" + +utils-merge@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" + integrity sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA== + +vary@^1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" + integrity sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg== + +void-elements@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/void-elements/-/void-elements-2.0.1.tgz#c066afb582bb1cb4128d60ea92392e94d5e9dbec" + integrity sha512-qZKX4RnBzH2ugr8Lxa7x+0V6XD9Sb/ouARtiasEQCHB1EVU4NXtmHsDDrx1dO4ne5fc3J6EW05BP1Dl0z0iung== + +watchpack@^2.4.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.4.0.tgz#fa33032374962c78113f93c7f2fb4c54c9862a5d" + integrity sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg== + dependencies: + glob-to-regexp "^0.4.1" + graceful-fs "^4.1.2" + +webpack-cli@4.10.0: + version "4.10.0" + resolved "https://registry.yarnpkg.com/webpack-cli/-/webpack-cli-4.10.0.tgz#37c1d69c8d85214c5a65e589378f53aec64dab31" + integrity sha512-NLhDfH/h4O6UOy+0LSso42xvYypClINuMNBVVzX4vX98TmTaTUxwRbXdhucbFMd2qLaCTcLq/PdYrvi8onw90w== + dependencies: + "@discoveryjs/json-ext" "^0.5.0" + "@webpack-cli/configtest" "^1.2.0" + "@webpack-cli/info" "^1.5.0" + "@webpack-cli/serve" "^1.7.0" + colorette "^2.0.14" + commander "^7.0.0" + cross-spawn "^7.0.3" + fastest-levenshtein "^1.0.12" + import-local "^3.0.2" + interpret "^2.2.0" + rechoir "^0.7.0" + webpack-merge "^5.7.3" + +webpack-merge@^4.1.5: + version "4.2.2" + resolved "https://registry.yarnpkg.com/webpack-merge/-/webpack-merge-4.2.2.tgz#a27c52ea783d1398afd2087f547d7b9d2f43634d" + integrity sha512-TUE1UGoTX2Cd42j3krGYqObZbOD+xF7u28WB7tfUordytSjbWTIjK/8V0amkBfTYN4/pB/GIDlJZZ657BGG19g== + dependencies: + lodash "^4.17.15" + +webpack-merge@^5.7.3: + version "5.9.0" + resolved "https://registry.yarnpkg.com/webpack-merge/-/webpack-merge-5.9.0.tgz#dc160a1c4cf512ceca515cc231669e9ddb133826" + integrity sha512-6NbRQw4+Sy50vYNTw7EyOn41OZItPiXB8GNv3INSoe3PSFaHJEz3SHTrYVaRm2LilNGnFUzh0FAwqPEmU/CwDg== + dependencies: + clone-deep "^4.0.1" + wildcard "^2.0.0" + +webpack-sources@^3.2.3: + version "3.2.3" + resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-3.2.3.tgz#2d4daab8451fd4b240cc27055ff6a0c2ccea0cde" + integrity sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w== + +webpack@5.74.0: + version "5.74.0" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.74.0.tgz#02a5dac19a17e0bb47093f2be67c695102a55980" + integrity sha512-A2InDwnhhGN4LYctJj6M1JEaGL7Luj6LOmyBHjcI8529cm5p6VXiTIW2sn6ffvEAKmveLzvu4jrihwXtPojlAA== + dependencies: + "@types/eslint-scope" "^3.7.3" + "@types/estree" "^0.0.51" + "@webassemblyjs/ast" "1.11.1" + "@webassemblyjs/wasm-edit" "1.11.1" + "@webassemblyjs/wasm-parser" "1.11.1" + acorn "^8.7.1" + acorn-import-assertions "^1.7.6" + browserslist "^4.14.5" + chrome-trace-event "^1.0.2" + enhanced-resolve "^5.10.0" + es-module-lexer "^0.9.0" + eslint-scope "5.1.1" + events "^3.2.0" + glob-to-regexp "^0.4.1" + graceful-fs "^4.2.9" + json-parse-even-better-errors "^2.3.1" + loader-runner "^4.2.0" + mime-types "^2.1.27" + neo-async "^2.6.2" + schema-utils "^3.1.0" + tapable "^2.1.1" + terser-webpack-plugin "^5.1.3" + watchpack "^2.4.0" + webpack-sources "^3.2.3" + +which@^1.2.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" + integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== + dependencies: + isexe "^2.0.0" + +which@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" + integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== + dependencies: + isexe "^2.0.0" + +wildcard@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/wildcard/-/wildcard-2.0.1.tgz#5ab10d02487198954836b6349f74fff961e10f67" + integrity sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ== + +workerpool@6.2.1: + version "6.2.1" + resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.2.1.tgz#46fc150c17d826b86a008e5a4508656777e9c343" + integrity sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw== + +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== + +ws@~8.11.0: + version "8.11.0" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.11.0.tgz#6a0d36b8edfd9f96d8b25683db2f8d7de6e8e143" + integrity sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg== + +y18n@^5.0.5: + version "5.0.8" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" + integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== + +yargs-parser@20.2.4: + version "20.2.4" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.4.tgz#b42890f14566796f85ae8e3a25290d205f154a54" + integrity sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA== + +yargs-parser@^20.2.2: + version "20.2.9" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" + integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== + +yargs-unparser@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-2.0.0.tgz#f131f9226911ae5d9ad38c432fe809366c2325eb" + integrity sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA== + dependencies: + camelcase "^6.0.0" + decamelize "^4.0.0" + flat "^5.0.2" + is-plain-obj "^2.1.0" + +yargs@16.2.0, yargs@^16.1.1: + version "16.2.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" + integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== + dependencies: + cliui "^7.0.2" + escalade "^3.1.1" + get-caller-file "^2.0.5" + require-directory "^2.1.1" + string-width "^4.2.0" + y18n "^5.0.5" + yargs-parser "^20.2.2" + +yocto-queue@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" + integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== diff --git a/ksp/build.gradle.kts b/ksp/build.gradle.kts index 66ff51c2..81b30981 100644 --- a/ksp/build.gradle.kts +++ b/ksp/build.gradle.kts @@ -5,14 +5,22 @@ plugins { kotlin("kapt") } -dependencies { - implementation(projects.runtime) - implementation(projects.processingCommon) - implementation(libs.squareUp.kotlinPoet) - implementation(libs.squareUp.kotlinPoetKsp) - compileOnly(libs.ksp.api) - implementation(libs.autoService.runtime) - kapt(libs.autoService.processor) +kotlin { + jvm() + + sourceSets { + val jvmMain by getting { + dependencies { + implementation(projects.runtime) + implementation(projects.processingCommon) + implementation(libs.squareUp.kotlinPoet) + implementation(libs.squareUp.kotlinPoetKsp) + compileOnly(libs.ksp.api) + implementation(libs.autoService.runtime) + configurations["kapt"].dependencies.add(project.dependencies.create(libs.autoService.processor.get())) + } + } + } } kapt { diff --git a/ksp/src/main/kotlin/com/livefront/sealedenum/internal/ksp/GenSealedEnumHolder.kt b/ksp/src/jvmMain/kotlin/com/livefront/sealedenum/internal/ksp/GenSealedEnumHolder.kt similarity index 100% rename from ksp/src/main/kotlin/com/livefront/sealedenum/internal/ksp/GenSealedEnumHolder.kt rename to ksp/src/jvmMain/kotlin/com/livefront/sealedenum/internal/ksp/GenSealedEnumHolder.kt diff --git a/ksp/src/main/kotlin/com/livefront/sealedenum/internal/ksp/InvalidSubclassVisibilityException.kt b/ksp/src/jvmMain/kotlin/com/livefront/sealedenum/internal/ksp/InvalidSubclassVisibilityException.kt similarity index 100% rename from ksp/src/main/kotlin/com/livefront/sealedenum/internal/ksp/InvalidSubclassVisibilityException.kt rename to ksp/src/jvmMain/kotlin/com/livefront/sealedenum/internal/ksp/InvalidSubclassVisibilityException.kt diff --git a/ksp/src/main/kotlin/com/livefront/sealedenum/internal/ksp/KotlinPoetKsp.kt b/ksp/src/jvmMain/kotlin/com/livefront/sealedenum/internal/ksp/KotlinPoetKsp.kt similarity index 100% rename from ksp/src/main/kotlin/com/livefront/sealedenum/internal/ksp/KotlinPoetKsp.kt rename to ksp/src/jvmMain/kotlin/com/livefront/sealedenum/internal/ksp/KotlinPoetKsp.kt diff --git a/ksp/src/main/kotlin/com/livefront/sealedenum/internal/ksp/KspUtils.kt b/ksp/src/jvmMain/kotlin/com/livefront/sealedenum/internal/ksp/KspUtils.kt similarity index 100% rename from ksp/src/main/kotlin/com/livefront/sealedenum/internal/ksp/KspUtils.kt rename to ksp/src/jvmMain/kotlin/com/livefront/sealedenum/internal/ksp/KspUtils.kt diff --git a/ksp/src/main/kotlin/com/livefront/sealedenum/internal/ksp/NonObjectSealedSubclassException.kt b/ksp/src/jvmMain/kotlin/com/livefront/sealedenum/internal/ksp/NonObjectSealedSubclassException.kt similarity index 100% rename from ksp/src/main/kotlin/com/livefront/sealedenum/internal/ksp/NonObjectSealedSubclassException.kt rename to ksp/src/jvmMain/kotlin/com/livefront/sealedenum/internal/ksp/NonObjectSealedSubclassException.kt diff --git a/ksp/src/main/kotlin/com/livefront/sealedenum/internal/ksp/SealedEnumProcessor.kt b/ksp/src/jvmMain/kotlin/com/livefront/sealedenum/internal/ksp/SealedEnumProcessor.kt similarity index 100% rename from ksp/src/main/kotlin/com/livefront/sealedenum/internal/ksp/SealedEnumProcessor.kt rename to ksp/src/jvmMain/kotlin/com/livefront/sealedenum/internal/ksp/SealedEnumProcessor.kt diff --git a/ksp/src/main/kotlin/com/livefront/sealedenum/internal/ksp/SuperInterfaces.kt b/ksp/src/jvmMain/kotlin/com/livefront/sealedenum/internal/ksp/SuperInterfaces.kt similarity index 100% rename from ksp/src/main/kotlin/com/livefront/sealedenum/internal/ksp/SuperInterfaces.kt rename to ksp/src/jvmMain/kotlin/com/livefront/sealedenum/internal/ksp/SuperInterfaces.kt diff --git a/processing-common/build.gradle.kts b/processing-common/build.gradle.kts index e114f7fc..e1df9061 100644 --- a/processing-common/build.gradle.kts +++ b/processing-common/build.gradle.kts @@ -5,6 +5,10 @@ plugins { `maven-publish` } +kotlin { + jvm() +} + dependencies { implementation(projects.runtime) implementation(libs.squareUp.kotlinPoet) diff --git a/processing-common/src/main/kotlin/com/livefront/sealedenum/internal/common/SealedClassNode.kt b/processing-common/src/jvmMain/kotlin/com/livefront/sealedenum/internal/common/SealedClassNode.kt similarity index 100% rename from processing-common/src/main/kotlin/com/livefront/sealedenum/internal/common/SealedClassNode.kt rename to processing-common/src/jvmMain/kotlin/com/livefront/sealedenum/internal/common/SealedClassNode.kt diff --git a/processing-common/src/main/kotlin/com/livefront/sealedenum/internal/common/TreeUtils.kt b/processing-common/src/jvmMain/kotlin/com/livefront/sealedenum/internal/common/TreeUtils.kt similarity index 100% rename from processing-common/src/main/kotlin/com/livefront/sealedenum/internal/common/TreeUtils.kt rename to processing-common/src/jvmMain/kotlin/com/livefront/sealedenum/internal/common/TreeUtils.kt diff --git a/processing-common/src/main/kotlin/com/livefront/sealedenum/internal/common/Unique.kt b/processing-common/src/jvmMain/kotlin/com/livefront/sealedenum/internal/common/Unique.kt similarity index 100% rename from processing-common/src/main/kotlin/com/livefront/sealedenum/internal/common/Unique.kt rename to processing-common/src/jvmMain/kotlin/com/livefront/sealedenum/internal/common/Unique.kt diff --git a/processing-common/src/main/kotlin/com/livefront/sealedenum/internal/common/Visibility.kt b/processing-common/src/jvmMain/kotlin/com/livefront/sealedenum/internal/common/Visibility.kt similarity index 100% rename from processing-common/src/main/kotlin/com/livefront/sealedenum/internal/common/Visibility.kt rename to processing-common/src/jvmMain/kotlin/com/livefront/sealedenum/internal/common/Visibility.kt diff --git a/processing-common/src/main/kotlin/com/livefront/sealedenum/internal/common/spec/CamelCase.kt b/processing-common/src/jvmMain/kotlin/com/livefront/sealedenum/internal/common/spec/CamelCase.kt similarity index 100% rename from processing-common/src/main/kotlin/com/livefront/sealedenum/internal/common/spec/CamelCase.kt rename to processing-common/src/jvmMain/kotlin/com/livefront/sealedenum/internal/common/spec/CamelCase.kt diff --git a/processing-common/src/main/kotlin/com/livefront/sealedenum/internal/common/spec/EnumForSealedEnumTypeSpec.kt b/processing-common/src/jvmMain/kotlin/com/livefront/sealedenum/internal/common/spec/EnumForSealedEnumTypeSpec.kt similarity index 100% rename from processing-common/src/main/kotlin/com/livefront/sealedenum/internal/common/spec/EnumForSealedEnumTypeSpec.kt rename to processing-common/src/jvmMain/kotlin/com/livefront/sealedenum/internal/common/spec/EnumForSealedEnumTypeSpec.kt diff --git a/processing-common/src/main/kotlin/com/livefront/sealedenum/internal/common/spec/EnumSealedObjectPropertySpec.kt b/processing-common/src/jvmMain/kotlin/com/livefront/sealedenum/internal/common/spec/EnumSealedObjectPropertySpec.kt similarity index 100% rename from processing-common/src/main/kotlin/com/livefront/sealedenum/internal/common/spec/EnumSealedObjectPropertySpec.kt rename to processing-common/src/jvmMain/kotlin/com/livefront/sealedenum/internal/common/spec/EnumSealedObjectPropertySpec.kt diff --git a/processing-common/src/main/kotlin/com/livefront/sealedenum/internal/common/spec/MaybeAddOriginatingElement.kt b/processing-common/src/jvmMain/kotlin/com/livefront/sealedenum/internal/common/spec/MaybeAddOriginatingElement.kt similarity index 100% rename from processing-common/src/main/kotlin/com/livefront/sealedenum/internal/common/spec/MaybeAddOriginatingElement.kt rename to processing-common/src/jvmMain/kotlin/com/livefront/sealedenum/internal/common/spec/MaybeAddOriginatingElement.kt diff --git a/processing-common/src/main/kotlin/com/livefront/sealedenum/internal/common/spec/SealedClassExtensions.kt b/processing-common/src/jvmMain/kotlin/com/livefront/sealedenum/internal/common/spec/SealedClassExtensions.kt similarity index 100% rename from processing-common/src/main/kotlin/com/livefront/sealedenum/internal/common/spec/SealedClassExtensions.kt rename to processing-common/src/jvmMain/kotlin/com/livefront/sealedenum/internal/common/spec/SealedClassExtensions.kt diff --git a/processing-common/src/main/kotlin/com/livefront/sealedenum/internal/common/spec/SealedEnumEnumPropertySpec.kt b/processing-common/src/jvmMain/kotlin/com/livefront/sealedenum/internal/common/spec/SealedEnumEnumPropertySpec.kt similarity index 100% rename from processing-common/src/main/kotlin/com/livefront/sealedenum/internal/common/spec/SealedEnumEnumPropertySpec.kt rename to processing-common/src/jvmMain/kotlin/com/livefront/sealedenum/internal/common/spec/SealedEnumEnumPropertySpec.kt diff --git a/processing-common/src/main/kotlin/com/livefront/sealedenum/internal/common/spec/SealedEnumFileSpec.kt b/processing-common/src/jvmMain/kotlin/com/livefront/sealedenum/internal/common/spec/SealedEnumFileSpec.kt similarity index 100% rename from processing-common/src/main/kotlin/com/livefront/sealedenum/internal/common/spec/SealedEnumFileSpec.kt rename to processing-common/src/jvmMain/kotlin/com/livefront/sealedenum/internal/common/spec/SealedEnumFileSpec.kt diff --git a/processing-common/src/main/kotlin/com/livefront/sealedenum/internal/common/spec/SealedEnumNamePropertySpec.kt b/processing-common/src/jvmMain/kotlin/com/livefront/sealedenum/internal/common/spec/SealedEnumNamePropertySpec.kt similarity index 100% rename from processing-common/src/main/kotlin/com/livefront/sealedenum/internal/common/spec/SealedEnumNamePropertySpec.kt rename to processing-common/src/jvmMain/kotlin/com/livefront/sealedenum/internal/common/spec/SealedEnumNamePropertySpec.kt diff --git a/processing-common/src/main/kotlin/com/livefront/sealedenum/internal/common/spec/SealedEnumOrdinalPropertySpec.kt b/processing-common/src/jvmMain/kotlin/com/livefront/sealedenum/internal/common/spec/SealedEnumOrdinalPropertySpec.kt similarity index 100% rename from processing-common/src/main/kotlin/com/livefront/sealedenum/internal/common/spec/SealedEnumOrdinalPropertySpec.kt rename to processing-common/src/jvmMain/kotlin/com/livefront/sealedenum/internal/common/spec/SealedEnumOrdinalPropertySpec.kt diff --git a/processing-common/src/main/kotlin/com/livefront/sealedenum/internal/common/spec/SealedEnumSealedEnumPropertySpec.kt b/processing-common/src/jvmMain/kotlin/com/livefront/sealedenum/internal/common/spec/SealedEnumSealedEnumPropertySpec.kt similarity index 80% rename from processing-common/src/main/kotlin/com/livefront/sealedenum/internal/common/spec/SealedEnumSealedEnumPropertySpec.kt rename to processing-common/src/jvmMain/kotlin/com/livefront/sealedenum/internal/common/spec/SealedEnumSealedEnumPropertySpec.kt index e6d9b1af..76decd47 100644 --- a/processing-common/src/main/kotlin/com/livefront/sealedenum/internal/common/spec/SealedEnumSealedEnumPropertySpec.kt +++ b/processing-common/src/jvmMain/kotlin/com/livefront/sealedenum/internal/common/spec/SealedEnumSealedEnumPropertySpec.kt @@ -5,6 +5,7 @@ import com.livefront.sealedenum.internal.common.Visibility import com.squareup.kotlinpoet.ClassName import com.squareup.kotlinpoet.FunSpec import com.squareup.kotlinpoet.PropertySpec +import com.squareup.kotlinpoet.asTypeName import javax.lang.model.element.TypeElement internal data class SealedEnumSealedEnumPropertySpec( @@ -18,7 +19,11 @@ internal data class SealedEnumSealedEnumPropertySpec( fun build(): PropertySpec { val propertySpecBuilder = PropertySpec.builder(pascalCaseToCamelCase(enumPrefix + "SealedEnum"), sealedEnum) .maybeAddOriginatingElement(sealedClassCompanionObjectElement) - .addKdoc("Returns an implementation of [%T] for the sealed class [%T]", SealedEnum::class, sealedClass) + .addKdoc( + "Returns an implementation of [%T] for the sealed class [%T]", + SealedEnum::class.asTypeName(), // Explicitly resolve to TypeName to avoid hitting javax.lang classes + sealedClass + ) .receiver(sealedClassCompanionObject) .addModifiers(sealedClassCompanionObjectEffectiveVisibility.kModifier) .getter( diff --git a/processing-common/src/main/kotlin/com/livefront/sealedenum/internal/common/spec/SealedEnumTypeSpec.kt b/processing-common/src/jvmMain/kotlin/com/livefront/sealedenum/internal/common/spec/SealedEnumTypeSpec.kt similarity index 100% rename from processing-common/src/main/kotlin/com/livefront/sealedenum/internal/common/spec/SealedEnumTypeSpec.kt rename to processing-common/src/jvmMain/kotlin/com/livefront/sealedenum/internal/common/spec/SealedEnumTypeSpec.kt diff --git a/processing-common/src/main/kotlin/com/livefront/sealedenum/internal/common/spec/SealedEnumValueOfFunSpec.kt b/processing-common/src/jvmMain/kotlin/com/livefront/sealedenum/internal/common/spec/SealedEnumValueOfFunSpec.kt similarity index 100% rename from processing-common/src/main/kotlin/com/livefront/sealedenum/internal/common/spec/SealedEnumValueOfFunSpec.kt rename to processing-common/src/jvmMain/kotlin/com/livefront/sealedenum/internal/common/spec/SealedEnumValueOfFunSpec.kt diff --git a/processing-common/src/main/kotlin/com/livefront/sealedenum/internal/common/spec/SealedEnumValuesPropertySpec.kt b/processing-common/src/jvmMain/kotlin/com/livefront/sealedenum/internal/common/spec/SealedEnumValuesPropertySpec.kt similarity index 100% rename from processing-common/src/main/kotlin/com/livefront/sealedenum/internal/common/spec/SealedEnumValuesPropertySpec.kt rename to processing-common/src/jvmMain/kotlin/com/livefront/sealedenum/internal/common/spec/SealedEnumValuesPropertySpec.kt diff --git a/processing-common/src/test/kotlin/com/livefront/sealedenum/internal/common/TreeUtilsTests.kt b/processing-common/src/jvmTest/kotlin/com/livefront/sealedenum/internal/common/TreeUtilsTests.kt similarity index 100% rename from processing-common/src/test/kotlin/com/livefront/sealedenum/internal/common/TreeUtilsTests.kt rename to processing-common/src/jvmTest/kotlin/com/livefront/sealedenum/internal/common/TreeUtilsTests.kt diff --git a/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/basic/EmptySealedClass.kt b/processing-tests/common/src/commonMain/kotlin/com/livefront/sealedenum/compilation/basic/EmptySealedClass.kt similarity index 95% rename from processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/basic/EmptySealedClass.kt rename to processing-tests/common/src/commonMain/kotlin/com/livefront/sealedenum/compilation/basic/EmptySealedClass.kt index 1916de17..47eed01c 100644 --- a/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/basic/EmptySealedClass.kt +++ b/processing-tests/common/src/commonMain/kotlin/com/livefront/sealedenum/compilation/basic/EmptySealedClass.kt @@ -1,15 +1,13 @@ package com.livefront.sealedenum.compilation.basic import com.livefront.sealedenum.GenSealedEnum -import org.intellij.lang.annotations.Language -sealed class EmptySealedClass { +public sealed class EmptySealedClass { @GenSealedEnum(generateEnum = true) - companion object + public companion object } -@Language("kotlin") -val emptySealedClassGenerated = """ +public val emptySealedClassGenerated: String = """ package com.livefront.sealedenum.compilation.basic import com.livefront.sealedenum.EnumForSealedEnumProvider diff --git a/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/basic/EmptySealedInterface.kt b/processing-tests/common/src/commonMain/kotlin/com/livefront/sealedenum/compilation/basic/EmptySealedInterface.kt similarity index 95% rename from processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/basic/EmptySealedInterface.kt rename to processing-tests/common/src/commonMain/kotlin/com/livefront/sealedenum/compilation/basic/EmptySealedInterface.kt index e7c7d9b0..40a7d9bd 100644 --- a/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/basic/EmptySealedInterface.kt +++ b/processing-tests/common/src/commonMain/kotlin/com/livefront/sealedenum/compilation/basic/EmptySealedInterface.kt @@ -1,15 +1,13 @@ package com.livefront.sealedenum.compilation.basic import com.livefront.sealedenum.GenSealedEnum -import org.intellij.lang.annotations.Language -sealed interface EmptySealedInterface { +public sealed interface EmptySealedInterface { @GenSealedEnum(generateEnum = true) - companion object + public companion object } -@Language("kotlin") -val emptySealedInterfaceGenerated = """ +public val emptySealedInterfaceGenerated: String = """ package com.livefront.sealedenum.compilation.basic import com.livefront.sealedenum.EnumForSealedEnumProvider diff --git a/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/basic/OneObjectSealedClass.kt b/processing-tests/common/src/commonMain/kotlin/com/livefront/sealedenum/compilation/basic/OneObjectSealedClass.kt similarity index 94% rename from processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/basic/OneObjectSealedClass.kt rename to processing-tests/common/src/commonMain/kotlin/com/livefront/sealedenum/compilation/basic/OneObjectSealedClass.kt index 2d76d397..9d98a7ac 100644 --- a/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/basic/OneObjectSealedClass.kt +++ b/processing-tests/common/src/commonMain/kotlin/com/livefront/sealedenum/compilation/basic/OneObjectSealedClass.kt @@ -1,17 +1,15 @@ package com.livefront.sealedenum.compilation.basic import com.livefront.sealedenum.GenSealedEnum -import org.intellij.lang.annotations.Language -sealed class OneObjectSealedClass { - object FirstObject : OneObjectSealedClass() +public sealed class OneObjectSealedClass { + public object FirstObject : OneObjectSealedClass() @GenSealedEnum(generateEnum = true) - companion object + public companion object } -@Language("kotlin") -val oneObjectSealedClassGenerated = """ +public val oneObjectSealedClassGenerated: String = """ package com.livefront.sealedenum.compilation.basic import com.livefront.sealedenum.EnumForSealedEnumProvider diff --git a/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/basic/OneObjectSealedInterface.kt b/processing-tests/common/src/commonMain/kotlin/com/livefront/sealedenum/compilation/basic/OneObjectSealedInterface.kt similarity index 94% rename from processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/basic/OneObjectSealedInterface.kt rename to processing-tests/common/src/commonMain/kotlin/com/livefront/sealedenum/compilation/basic/OneObjectSealedInterface.kt index 20c2cabe..4b054dc9 100644 --- a/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/basic/OneObjectSealedInterface.kt +++ b/processing-tests/common/src/commonMain/kotlin/com/livefront/sealedenum/compilation/basic/OneObjectSealedInterface.kt @@ -1,17 +1,15 @@ package com.livefront.sealedenum.compilation.basic import com.livefront.sealedenum.GenSealedEnum -import org.intellij.lang.annotations.Language -sealed interface OneObjectSealedInterface { - object FirstObject : OneObjectSealedInterface +public sealed interface OneObjectSealedInterface { + public object FirstObject : OneObjectSealedInterface @GenSealedEnum(generateEnum = true) - companion object + public companion object } -@Language("kotlin") -val oneObjectSealedInterfaceGenerated = """ +public val oneObjectSealedInterfaceGenerated: String = """ package com.livefront.sealedenum.compilation.basic import com.livefront.sealedenum.EnumForSealedEnumProvider diff --git a/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/basic/TwoObjectSealedClass.kt b/processing-tests/common/src/commonMain/kotlin/com/livefront/sealedenum/compilation/basic/TwoObjectSealedClass.kt similarity index 94% rename from processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/basic/TwoObjectSealedClass.kt rename to processing-tests/common/src/commonMain/kotlin/com/livefront/sealedenum/compilation/basic/TwoObjectSealedClass.kt index ac635e82..404f5df7 100644 --- a/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/basic/TwoObjectSealedClass.kt +++ b/processing-tests/common/src/commonMain/kotlin/com/livefront/sealedenum/compilation/basic/TwoObjectSealedClass.kt @@ -1,19 +1,17 @@ package com.livefront.sealedenum.compilation.basic import com.livefront.sealedenum.GenSealedEnum -import org.intellij.lang.annotations.Language -sealed class TwoObjectSealedClass { - object FirstObject : TwoObjectSealedClass() +public sealed class TwoObjectSealedClass { + public object FirstObject : TwoObjectSealedClass() - object SecondObject : TwoObjectSealedClass() + public object SecondObject : TwoObjectSealedClass() @GenSealedEnum(generateEnum = true) - companion object + public companion object } -@Language("kotlin") -val twoObjectSealedClassGenerated = """ +public val twoObjectSealedClassGenerated: String = """ package com.livefront.sealedenum.compilation.basic import com.livefront.sealedenum.EnumForSealedEnumProvider diff --git a/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/basic/TwoObjectSealedInterface.kt b/processing-tests/common/src/commonMain/kotlin/com/livefront/sealedenum/compilation/basic/TwoObjectSealedInterface.kt similarity index 94% rename from processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/basic/TwoObjectSealedInterface.kt rename to processing-tests/common/src/commonMain/kotlin/com/livefront/sealedenum/compilation/basic/TwoObjectSealedInterface.kt index 064101bd..c33c0b8f 100644 --- a/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/basic/TwoObjectSealedInterface.kt +++ b/processing-tests/common/src/commonMain/kotlin/com/livefront/sealedenum/compilation/basic/TwoObjectSealedInterface.kt @@ -1,19 +1,17 @@ package com.livefront.sealedenum.compilation.basic import com.livefront.sealedenum.GenSealedEnum -import org.intellij.lang.annotations.Language -sealed interface TwoObjectSealedInterface { - object FirstObject : TwoObjectSealedInterface +public sealed interface TwoObjectSealedInterface { + public object FirstObject : TwoObjectSealedInterface - object SecondObject : TwoObjectSealedInterface + public object SecondObject : TwoObjectSealedInterface @GenSealedEnum(generateEnum = true) - companion object + public companion object } -@Language("kotlin") -val twoObjectSealedInterfaceGenerated = """ +public val twoObjectSealedInterfaceGenerated: String = """ package com.livefront.sealedenum.compilation.basic import com.livefront.sealedenum.EnumForSealedEnumProvider diff --git a/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/generics/GenericSealedClass.kt b/processing-tests/common/src/commonMain/kotlin/com/livefront/sealedenum/compilation/generics/GenericSealedClass.kt similarity index 91% rename from processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/generics/GenericSealedClass.kt rename to processing-tests/common/src/commonMain/kotlin/com/livefront/sealedenum/compilation/generics/GenericSealedClass.kt index 6519b8cf..a7cfca3c 100644 --- a/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/generics/GenericSealedClass.kt +++ b/processing-tests/common/src/commonMain/kotlin/com/livefront/sealedenum/compilation/generics/GenericSealedClass.kt @@ -1,23 +1,21 @@ package com.livefront.sealedenum.compilation.generics import com.livefront.sealedenum.GenSealedEnum -import org.intellij.lang.annotations.Language -interface GenericInterfaceOut +public interface GenericInterfaceOut -sealed class OneTypeParameterSealedClass : GenericInterfaceOut { - object FirstObject : OneTypeParameterSealedClass() +public sealed class OneTypeParameterSealedClass : GenericInterfaceOut { + public object FirstObject : OneTypeParameterSealedClass() - object SecondObject : OneTypeParameterSealedClass() + public object SecondObject : OneTypeParameterSealedClass() - object ThirdObject : OneTypeParameterSealedClass() + public object ThirdObject : OneTypeParameterSealedClass() @GenSealedEnum(generateEnum = true) - companion object OneType + public companion object OneType } -@Language("kotlin") -val oneTypeParameterSealedClassGenerated = """ +public val oneTypeParameterSealedClassGenerated: String = """ package com.livefront.sealedenum.compilation.generics import com.livefront.sealedenum.EnumForSealedEnumProvider @@ -144,19 +142,18 @@ public fun OneTypeParameterSealedClass.OneType.valueOf(name: String): OneTypePar """.trimIndent() -interface GenericInterfaceTwoOut +public interface GenericInterfaceTwoOut -sealed class TwoTypeParameterSealedClass : GenericInterfaceTwoOut { - object FirstObject : TwoTypeParameterSealedClass() +public sealed class TwoTypeParameterSealedClass : GenericInterfaceTwoOut { + public object FirstObject : TwoTypeParameterSealedClass() - object SecondObject : TwoTypeParameterSealedClass() + public object SecondObject : TwoTypeParameterSealedClass() @GenSealedEnum(generateEnum = true) - companion object TwoType + public companion object TwoType } -@Language("kotlin") -val twoTypeParameterSealedClassGenerated = """ +public val twoTypeParameterSealedClassGenerated: String = """ package com.livefront.sealedenum.compilation.generics import com.livefront.sealedenum.EnumForSealedEnumProvider @@ -275,19 +272,18 @@ public fun TwoTypeParameterSealedClass.TwoType.valueOf(name: String): """.trimIndent() -interface GenericInterfaceInOut +public interface GenericInterfaceInOut -sealed class LimitedTypeParameterSealedClass : GenericInterfaceInOut { - object FirstObject : LimitedTypeParameterSealedClass() +public sealed class LimitedTypeParameterSealedClass : GenericInterfaceInOut { + public object FirstObject : LimitedTypeParameterSealedClass() - object SecondObject : LimitedTypeParameterSealedClass() + public object SecondObject : LimitedTypeParameterSealedClass() @GenSealedEnum(generateEnum = true) - companion object LimitedType + public companion object LimitedType } -@Language("kotlin") -val limitedTypeParameterSealedClassGenerated = """ +public val limitedTypeParameterSealedClassGenerated: String = """ package com.livefront.sealedenum.compilation.generics import com.livefront.sealedenum.EnumForSealedEnumProvider @@ -413,21 +409,20 @@ public fun LimitedTypeParameterSealedClass.LimitedType.valueOf(name: String): """.trimIndent() -interface MultipleBoundsInterface1 +public interface MultipleBoundsInterface1 -interface MultipleBoundsInterface2 +public interface MultipleBoundsInterface2 -interface MultipleBoundsInterface3 : MultipleBoundsInterface1, MultipleBoundsInterface2 +public interface MultipleBoundsInterface3 : MultipleBoundsInterface1, MultipleBoundsInterface2 -sealed class MultipleBoundsSealedClass where T : MultipleBoundsInterface1, T : MultipleBoundsInterface2 { - object FirstObject : MultipleBoundsSealedClass() +public sealed class MultipleBoundsSealedClass where T : MultipleBoundsInterface1, T : MultipleBoundsInterface2 { + public object FirstObject : MultipleBoundsSealedClass() @GenSealedEnum(generateEnum = true) - companion object + public companion object } -@Language("kotlin") -val multipleBoundsSealedClassGenerated = """ +public val multipleBoundsSealedClassGenerated: String = """ package com.livefront.sealedenum.compilation.generics import com.livefront.sealedenum.EnumForSealedEnumProvider diff --git a/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/generics/SealedEnumWithAbstractBaseClasses.kt b/processing-tests/common/src/commonMain/kotlin/com/livefront/sealedenum/compilation/generics/SealedEnumWithAbstractBaseClasses.kt similarity index 90% rename from processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/generics/SealedEnumWithAbstractBaseClasses.kt rename to processing-tests/common/src/commonMain/kotlin/com/livefront/sealedenum/compilation/generics/SealedEnumWithAbstractBaseClasses.kt index fddf8e55..4b996bbc 100644 --- a/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/generics/SealedEnumWithAbstractBaseClasses.kt +++ b/processing-tests/common/src/commonMain/kotlin/com/livefront/sealedenum/compilation/generics/SealedEnumWithAbstractBaseClasses.kt @@ -3,25 +3,26 @@ package com.livefront.sealedenum.compilation.generics import com.livefront.sealedenum.GenSealedEnum -import org.intellij.lang.annotations.Language -interface BaseClassInterface1 +public interface BaseClassInterface1 -interface BaseClassInterface2 +public interface BaseClassInterface2 -interface BaseClassInterface3 +public interface BaseClassInterface3 -abstract class AlphaBase : BaseClassInterface1 +@Suppress("UnnecessaryAbstractClass") +public abstract class AlphaBase : BaseClassInterface1 -abstract class BetaBase : AlphaBase>(), BaseClassInterface2 +@Suppress("UnnecessaryAbstractClass") +public abstract class BetaBase : AlphaBase>(), BaseClassInterface2 -sealed class SealedEnumWithAbstractBaseClasses : BetaBase() { +public sealed class SealedEnumWithAbstractBaseClasses : BetaBase() { @GenSealedEnum(generateEnum = true) - companion object + public companion object } -@Language("kotlin") -val sealedEnumWithAbstractBaseClassesGenerated = """ +@Suppress("MaxLineLength") +public val sealedEnumWithAbstractBaseClassesGenerated: String = """ package com.livefront.sealedenum.compilation.generics import com.livefront.sealedenum.EnumForSealedEnumProvider @@ -128,17 +129,19 @@ public fun SealedEnumWithAbstractBaseClasses.Companion.valueOf(name: String): """.trimIndent() -abstract class GammaBase +@Suppress("UnnecessaryAbstractClass") +public abstract class GammaBase -abstract class DeltaBase : GammaBase(), BaseClassInterface3> +@Suppress("UnnecessaryAbstractClass") +public abstract class DeltaBase : GammaBase(), BaseClassInterface3> -sealed class SealedEnumWithAbstractBaseClassesCovariantType : DeltaBase() { +public sealed class SealedEnumWithAbstractBaseClassesCovariantType : DeltaBase() { @GenSealedEnum(generateEnum = true) - companion object + public companion object } -@Language("kotlin") -val sealedEnumWithAbstractBaseClassesCovariantTypeGenerated = """ +@Suppress("MaxLineLength") +public val sealedEnumWithAbstractBaseClassesCovariantTypeGenerated: String = """ package com.livefront.sealedenum.compilation.generics import com.livefront.sealedenum.EnumForSealedEnumProvider diff --git a/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/generics/SealedEnumWithInterfaces.kt b/processing-tests/common/src/commonMain/kotlin/com/livefront/sealedenum/compilation/generics/SealedEnumWithInterfaces.kt similarity index 93% rename from processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/generics/SealedEnumWithInterfaces.kt rename to processing-tests/common/src/commonMain/kotlin/com/livefront/sealedenum/compilation/generics/SealedEnumWithInterfaces.kt index 9220c8b6..3eb2bb71 100644 --- a/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/generics/SealedEnumWithInterfaces.kt +++ b/processing-tests/common/src/commonMain/kotlin/com/livefront/sealedenum/compilation/generics/SealedEnumWithInterfaces.kt @@ -1,23 +1,22 @@ package com.livefront.sealedenum.compilation.generics import com.livefront.sealedenum.GenSealedEnum -import org.intellij.lang.annotations.Language -interface TestInterface +public interface TestInterface -interface TestGenericInterface +public interface TestGenericInterface -interface TestGetterInterface { - fun get(): String +public interface TestGetterInterface { + public fun get(): String } -sealed class EmptySealedClassWithInterface : TestInterface { +public sealed class EmptySealedClassWithInterface : TestInterface { @GenSealedEnum(generateEnum = true) - companion object + public companion object } -@Language("kotlin") -val emptySealedClassWithInterfaceGenerated = """ +@Suppress("MaxLineLength") +public val emptySealedClassWithInterfaceGenerated: String = """ package com.livefront.sealedenum.compilation.generics import com.livefront.sealedenum.EnumForSealedEnumProvider @@ -118,15 +117,15 @@ public fun EmptySealedClassWithInterface.Companion.valueOf(name: String): """.trimIndent() -sealed class OneObjectSealedClassWithInterface : TestInterface { - object FirstObject : OneObjectSealedClassWithInterface() +public sealed class OneObjectSealedClassWithInterface : TestInterface { + public object FirstObject : OneObjectSealedClassWithInterface() @GenSealedEnum(generateEnum = true) - companion object + public companion object } -@Language("kotlin") -val oneObjectSealedClassWithInterfaceGenerated = """ +@Suppress("MaxLineLength") +public val oneObjectSealedClassWithInterfaceGenerated: String = """ package com.livefront.sealedenum.compilation.generics import com.livefront.sealedenum.EnumForSealedEnumProvider @@ -245,16 +244,16 @@ public fun OneObjectSealedClassWithInterface.Companion.valueOf(name: String): """.trimIndent() -sealed class TwoObjectSealedClassWithGenericInterface : TestGenericInterface { - object FirstObject : TwoObjectSealedClassWithGenericInterface() - object SecondObject : TwoObjectSealedClassWithGenericInterface() +public sealed class TwoObjectSealedClassWithGenericInterface : TestGenericInterface { + public object FirstObject : TwoObjectSealedClassWithGenericInterface() + public object SecondObject : TwoObjectSealedClassWithGenericInterface() @GenSealedEnum(generateEnum = true) - companion object + public companion object } -@Language("kotlin") -val twoObjectSealedClassWithGenericInterfaceGenerated = """ +@Suppress("MaxLineLength") +public val twoObjectSealedClassWithGenericInterfaceGenerated: String = """ package com.livefront.sealedenum.compilation.generics import com.livefront.sealedenum.EnumForSealedEnumProvider @@ -390,9 +389,10 @@ public fun TwoObjectSealedClassWithGenericInterface.Companion.valueOf(name: Stri """.trimIndent() -sealed class SealedClassWithGetterInterface : TestGetterInterface { - object FirstObject : SealedClassWithGetterInterface() { - var hasGetBeenCalled = false +public var hasGetBeenCalled: Boolean = false + +public sealed class SealedClassWithGetterInterface : TestGetterInterface { + public object FirstObject : SealedClassWithGetterInterface() { override fun get(): String { hasGetBeenCalled = true @@ -401,11 +401,11 @@ sealed class SealedClassWithGetterInterface : TestGetterInterface { } @GenSealedEnum(generateEnum = true) - companion object + public companion object } -@Language("kotlin") -val sealedClassWithGetterInterface = """ +@Suppress("MaxLineLength") +public val sealedClassWithGetterInterface: String = """ package com.livefront.sealedenum.compilation.generics import com.livefront.sealedenum.EnumForSealedEnumProvider diff --git a/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/hierarchy/SealedClassHierarchy.kt b/processing-tests/common/src/commonMain/kotlin/com/livefront/sealedenum/compilation/hierarchy/SealedClassHierarchy.kt similarity index 94% rename from processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/hierarchy/SealedClassHierarchy.kt rename to processing-tests/common/src/commonMain/kotlin/com/livefront/sealedenum/compilation/hierarchy/SealedClassHierarchy.kt index b35c806a..8b59172e 100644 --- a/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/hierarchy/SealedClassHierarchy.kt +++ b/processing-tests/common/src/commonMain/kotlin/com/livefront/sealedenum/compilation/hierarchy/SealedClassHierarchy.kt @@ -1,26 +1,24 @@ package com.livefront.sealedenum.compilation.hierarchy import com.livefront.sealedenum.GenSealedEnum -import org.intellij.lang.annotations.Language -class FirstClassHierarchy { +public class FirstClassHierarchy { - sealed class A { + public sealed class A { - sealed class B : A() { - object C : B() + public sealed class B : A() { + public object C : B() @GenSealedEnum(generateEnum = true) - companion object + public companion object } @GenSealedEnum(generateEnum = true) - companion object + public companion object } } -@Language("kotlin") -val firstClassHierarchyAGenerated = """ +public val firstClassHierarchyAGenerated: String = """ package com.livefront.sealedenum.compilation.hierarchy import com.livefront.sealedenum.EnumForSealedEnumProvider @@ -127,8 +125,7 @@ public fun FirstClassHierarchy.A.Companion.valueOf(name: String): FirstClassHier """.trimIndent() -@Language("kotlin") -val firstClassHierarchyBGenerated = """ +public val firstClassHierarchyBGenerated: String = """ package com.livefront.sealedenum.compilation.hierarchy import com.livefront.sealedenum.EnumForSealedEnumProvider @@ -235,53 +232,52 @@ public fun FirstClassHierarchy.A.B.Companion.valueOf(name: String): FirstClassHi """.trimIndent() -class SecondClassHierarchy { +public class SecondClassHierarchy { - sealed class Z { + public sealed class Z { - object Y : Z() + public object Y : Z() - sealed class X : Z() { + public sealed class X : Z() { - object W : X() + public object W : X() - object V : X() + public object V : X() - sealed class U : X() { - object T : U() + public sealed class U : X() { + public object T : U() @GenSealedEnum - companion object + public companion object } - sealed class S : X() { - object R : S() + public sealed class S : X() { + public object R : S() @GenSealedEnum - companion object + public companion object } @GenSealedEnum - companion object + public companion object } - sealed class Q : Z() { + public sealed class Q : Z() { - object P : Q() + public object P : Q() @GenSealedEnum - companion object + public companion object } - object O : Z() + public object O : Z() @GenSealedEnum - companion object + public companion object } } -@Language("kotlin") -val secondClassHierarchyZGenerated = """ +public val secondClassHierarchyZGenerated: String = """ package com.livefront.sealedenum.compilation.hierarchy import com.livefront.sealedenum.SealedEnum @@ -375,8 +371,7 @@ public fun SecondClassHierarchy.Z.Companion.valueOf(name: String): SecondClassHi """.trimIndent() -@Language("kotlin") -val secondClassHierarchyZXGenerated = """ +public val secondClassHierarchyZXGenerated: String = """ package com.livefront.sealedenum.compilation.hierarchy import com.livefront.sealedenum.SealedEnum @@ -458,8 +453,7 @@ public fun SecondClassHierarchy.Z.X.Companion.valueOf(name: String): SecondClass """.trimIndent() -@Language("kotlin") -val secondClassHierarchyZXUGenerated = """ +public val secondClassHierarchyZXUGenerated: String = """ package com.livefront.sealedenum.compilation.hierarchy import com.livefront.sealedenum.SealedEnum @@ -529,8 +523,7 @@ public fun SecondClassHierarchy.Z.X.U.Companion.valueOf(name: String): SecondCla """.trimIndent() -@Language("kotlin") -val secondClassHierarchyZXSGenerated = """ +public val secondClassHierarchyZXSGenerated: String = """ package com.livefront.sealedenum.compilation.hierarchy import com.livefront.sealedenum.SealedEnum @@ -600,8 +593,7 @@ public fun SecondClassHierarchy.Z.X.S.Companion.valueOf(name: String): SecondCla """.trimIndent() -@Language("kotlin") -val secondClassHierarchyZQGenerated = """ +public val secondClassHierarchyZQGenerated: String = """ package com.livefront.sealedenum.compilation.hierarchy import com.livefront.sealedenum.SealedEnum diff --git a/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/hierarchy/SealedInterfaceHierarchy.kt b/processing-tests/common/src/commonMain/kotlin/com/livefront/sealedenum/compilation/hierarchy/SealedInterfaceHierarchy.kt similarity index 94% rename from processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/hierarchy/SealedInterfaceHierarchy.kt rename to processing-tests/common/src/commonMain/kotlin/com/livefront/sealedenum/compilation/hierarchy/SealedInterfaceHierarchy.kt index 7678157a..2641aac8 100644 --- a/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/hierarchy/SealedInterfaceHierarchy.kt +++ b/processing-tests/common/src/commonMain/kotlin/com/livefront/sealedenum/compilation/hierarchy/SealedInterfaceHierarchy.kt @@ -1,26 +1,24 @@ package com.livefront.sealedenum.compilation.hierarchy import com.livefront.sealedenum.GenSealedEnum -import org.intellij.lang.annotations.Language -class FirstInterfaceHierarchy { +public class FirstInterfaceHierarchy { - sealed interface A { + public sealed interface A { - sealed interface B : A { - object C : B + public sealed interface B : A { + public object C : B @GenSealedEnum(generateEnum = true) - companion object + public companion object } @GenSealedEnum(generateEnum = true) - companion object + public companion object } } -@Language("kotlin") -val firstInterfaceHierarchyAGenerated = """ +public val firstInterfaceHierarchyAGenerated: String = """ package com.livefront.sealedenum.compilation.hierarchy import com.livefront.sealedenum.EnumForSealedEnumProvider @@ -128,8 +126,7 @@ public fun FirstInterfaceHierarchy.A.Companion.valueOf(name: String): FirstInter """.trimIndent() -@Language("kotlin") -val firstInterfaceHierarchyBGenerated = """ +public val firstInterfaceHierarchyBGenerated: String = """ package com.livefront.sealedenum.compilation.hierarchy import com.livefront.sealedenum.EnumForSealedEnumProvider @@ -238,53 +235,52 @@ public fun FirstInterfaceHierarchy.A.B.Companion.valueOf(name: String): FirstInt """.trimIndent() -class SecondInterfaceHierarchy { +public class SecondInterfaceHierarchy { - sealed interface A { + public sealed interface A { - object B : A + public object B : A - sealed interface C : A { + public sealed interface C : A { - object D : C + public object D : C - object E : C + public object E : C - sealed interface F : C { - object G : F + public sealed interface F : C { + public object G : F @GenSealedEnum - companion object + public companion object } - sealed interface H : C { - object I : H + public sealed interface H : C { + public object I : H @GenSealedEnum - companion object + public companion object } @GenSealedEnum - companion object + public companion object } - sealed interface J : A { + public sealed interface J : A { - object K : J + public object K : J @GenSealedEnum - companion object + public companion object } - object L : A + public object L : A @GenSealedEnum - companion object + public companion object } } -@Language("kotlin") -val secondInterfaceHierarchyAGenerated = """ +public val secondInterfaceHierarchyAGenerated: String = """ package com.livefront.sealedenum.compilation.hierarchy import com.livefront.sealedenum.SealedEnum @@ -378,8 +374,7 @@ public fun SecondInterfaceHierarchy.A.Companion.valueOf(name: String): SecondInt """.trimIndent() -@Language("kotlin") -val secondInterfaceHierarchyACGenerated = """ +public val secondInterfaceHierarchyACGenerated: String = """ package com.livefront.sealedenum.compilation.hierarchy import com.livefront.sealedenum.SealedEnum @@ -461,8 +456,7 @@ public fun SecondInterfaceHierarchy.A.C.Companion.valueOf(name: String): """.trimIndent() -@Language("kotlin") -val secondInterfaceHierarchyACFGenerated = """ +public val secondInterfaceHierarchyACFGenerated: String = """ package com.livefront.sealedenum.compilation.hierarchy import com.livefront.sealedenum.SealedEnum @@ -534,8 +528,7 @@ public fun SecondInterfaceHierarchy.A.C.F.Companion.valueOf(name: String): """.trimIndent() -@Language("kotlin") -val secondInterfaceHierarchyACHGenerated = """ +public val secondInterfaceHierarchyACHGenerated: String = """ package com.livefront.sealedenum.compilation.hierarchy import com.livefront.sealedenum.SealedEnum @@ -607,8 +600,7 @@ public fun SecondInterfaceHierarchy.A.C.H.Companion.valueOf(name: String): """.trimIndent() -@Language("kotlin") -val secondInterfaceHierarchyAJGenerated = """ +public val secondInterfaceHierarchyAJGenerated: String = """ package com.livefront.sealedenum.compilation.hierarchy import com.livefront.sealedenum.SealedEnum diff --git a/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/location/NestedClass.kt b/processing-tests/common/src/commonMain/kotlin/com/livefront/sealedenum/compilation/location/NestedClass.kt similarity index 91% rename from processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/location/NestedClass.kt rename to processing-tests/common/src/commonMain/kotlin/com/livefront/sealedenum/compilation/location/NestedClass.kt index 3c1f03df..d3180a6f 100644 --- a/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/location/NestedClass.kt +++ b/processing-tests/common/src/commonMain/kotlin/com/livefront/sealedenum/compilation/location/NestedClass.kt @@ -1,21 +1,19 @@ package com.livefront.sealedenum.compilation.location import com.livefront.sealedenum.GenSealedEnum -import org.intellij.lang.annotations.Language -class OuterClass { - sealed class InsideOneClassSealedClass { - object FirstObject : InsideOneClassSealedClass() +public class OuterClass { + public sealed class InsideOneClassSealedClass { + public object FirstObject : InsideOneClassSealedClass() - object SecondObject : InsideOneClassSealedClass() + public object SecondObject : InsideOneClassSealedClass() @GenSealedEnum - companion object + public companion object } } -@Language("kotlin") -val insideOneClassSealedClassGenerated = """ +public val insideOneClassSealedClassGenerated: String = """ package com.livefront.sealedenum.compilation.location import com.livefront.sealedenum.SealedEnum @@ -98,21 +96,20 @@ public fun OuterClass.InsideOneClassSealedClass.Companion.valueOf(name: String): """.trimIndent() -class FirstOuterClass { - class SecondOuterClass { - sealed class InsideTwoClassesSealedClass { - object FirstObject : InsideTwoClassesSealedClass() +public class FirstOuterClass { + public class SecondOuterClass { + public sealed class InsideTwoClassesSealedClass { + public object FirstObject : InsideTwoClassesSealedClass() - object SecondObject : InsideTwoClassesSealedClass() + public object SecondObject : InsideTwoClassesSealedClass() @GenSealedEnum - companion object + public companion object } } } -@Language("kotlin") -val insideTwoClassesSealedClassGenerated = """ +public val insideTwoClassesSealedClassGenerated: String = """ package com.livefront.sealedenum.compilation.location import com.livefront.sealedenum.SealedEnum diff --git a/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/location/OutsideSealedClass.kt b/processing-tests/common/src/commonMain/kotlin/com/livefront/sealedenum/compilation/location/OutsideSealedClass.kt similarity index 93% rename from processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/location/OutsideSealedClass.kt rename to processing-tests/common/src/commonMain/kotlin/com/livefront/sealedenum/compilation/location/OutsideSealedClass.kt index 3d2ce0ce..bb8f048d 100644 --- a/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/location/OutsideSealedClass.kt +++ b/processing-tests/common/src/commonMain/kotlin/com/livefront/sealedenum/compilation/location/OutsideSealedClass.kt @@ -1,17 +1,15 @@ package com.livefront.sealedenum.compilation.location import com.livefront.sealedenum.GenSealedEnum -import org.intellij.lang.annotations.Language -sealed class AlphaOutsideSealedClass { +public sealed class AlphaOutsideSealedClass { @GenSealedEnum(generateEnum = true) - companion object + public companion object } -object AlphaFirstObject : AlphaOutsideSealedClass() +public object AlphaFirstObject : AlphaOutsideSealedClass() -@Language("kotlin") -val alphaOutsideSealedClassGenerated = """ +public val alphaOutsideSealedClassGenerated: String = """ package com.livefront.sealedenum.compilation.location import com.livefront.sealedenum.EnumForSealedEnumProvider @@ -118,21 +116,20 @@ public fun AlphaOutsideSealedClass.Companion.valueOf(name: String): AlphaOutside """.trimIndent() -sealed class BetaOutsideSealedClass { +public sealed class BetaOutsideSealedClass { @GenSealedEnum(generateEnum = true) - companion object + public companion object } -object BetaFirstObject : BetaOutsideSealedClass() +public object BetaFirstObject : BetaOutsideSealedClass() -object BetaSecondObject : BetaOutsideSealedClass() +public object BetaSecondObject : BetaOutsideSealedClass() -object BetaThirdObject : BetaOutsideSealedClass() +public object BetaThirdObject : BetaOutsideSealedClass() -object BetaFourthObject : BetaOutsideSealedClass() +public object BetaFourthObject : BetaOutsideSealedClass() -@Language("kotlin") -val betaOutsideSealedClassGenerated = """ +public val betaOutsideSealedClassGenerated: String = """ package com.livefront.sealedenum.compilation.location import com.livefront.sealedenum.EnumForSealedEnumProvider @@ -260,22 +257,21 @@ public fun BetaOutsideSealedClass.Companion.valueOf(name: String): BetaOutsideSe """.trimIndent() -object GammaFirstObject : GammaOutsideSealedClass() +public object GammaFirstObject : GammaOutsideSealedClass() -sealed class GammaOutsideSealedClass { +public sealed class GammaOutsideSealedClass { - object GammaSecondObject : GammaOutsideSealedClass() + public object GammaSecondObject : GammaOutsideSealedClass() @GenSealedEnum(generateEnum = true) - companion object + public companion object } -object GammaThirdObject : GammaOutsideSealedClass() +public object GammaThirdObject : GammaOutsideSealedClass() -object GammaFourthObject : GammaOutsideSealedClass() +public object GammaFourthObject : GammaOutsideSealedClass() -@Language("kotlin") -val gammaOutsideSealedClassGenerated = """ +public val gammaOutsideSealedClassGenerated: String = """ package com.livefront.sealedenum.compilation.location import com.livefront.sealedenum.EnumForSealedEnumProvider @@ -405,17 +401,16 @@ public fun GammaOutsideSealedClass.Companion.valueOf(name: String): GammaOutside """.trimIndent() -sealed class DeltaOutsideSealedClass { - object DeltaObject : DeltaOutsideSealedClass() +public sealed class DeltaOutsideSealedClass { + public object DeltaObject : DeltaOutsideSealedClass() @GenSealedEnum(generateEnum = true) - companion object + public companion object } -object DeltaObject : DeltaOutsideSealedClass() +public object DeltaObject : DeltaOutsideSealedClass() -@Language("kotlin") -val deltaOutsideSealedClassGenerated = """ +public val deltaOutsideSealedClassGenerated: String = """ package com.livefront.sealedenum.compilation.location import com.livefront.sealedenum.EnumForSealedEnumProvider diff --git a/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/location/SplitAcrossFilesSealedClass.kt b/processing-tests/common/src/commonMain/kotlin/com/livefront/sealedenum/compilation/location/SplitAcrossFilesSealedClass.kt similarity index 96% rename from processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/location/SplitAcrossFilesSealedClass.kt rename to processing-tests/common/src/commonMain/kotlin/com/livefront/sealedenum/compilation/location/SplitAcrossFilesSealedClass.kt index a71f68bb..cf110a44 100644 --- a/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/location/SplitAcrossFilesSealedClass.kt +++ b/processing-tests/common/src/commonMain/kotlin/com/livefront/sealedenum/compilation/location/SplitAcrossFilesSealedClass.kt @@ -1,16 +1,14 @@ package com.livefront.sealedenum.compilation.location import com.livefront.sealedenum.GenSealedEnum -import org.intellij.lang.annotations.Language -sealed class SplitAcrossFilesSealedClass { +public sealed class SplitAcrossFilesSealedClass { @GenSealedEnum(generateEnum = true) - companion object + public companion object } -@Language("kotlin") -val splitAcrossFilesSealedClassGenerated = """ +public val splitAcrossFilesSealedClassGenerated: String = """ package com.livefront.sealedenum.compilation.location import com.livefront.sealedenum.EnumForSealedEnumProvider diff --git a/processing-tests/common/src/commonMain/kotlin/com/livefront/sealedenum/compilation/location/SplitAcrossFilesSubclassA.kt b/processing-tests/common/src/commonMain/kotlin/com/livefront/sealedenum/compilation/location/SplitAcrossFilesSubclassA.kt new file mode 100644 index 00000000..f71deb2c --- /dev/null +++ b/processing-tests/common/src/commonMain/kotlin/com/livefront/sealedenum/compilation/location/SplitAcrossFilesSubclassA.kt @@ -0,0 +1,3 @@ +package com.livefront.sealedenum.compilation.location + +public object SplitAcrossFilesSubclassA : SplitAcrossFilesSealedClass() diff --git a/processing-tests/common/src/commonMain/kotlin/com/livefront/sealedenum/compilation/location/SplitAcrossFilesSubclassB.kt b/processing-tests/common/src/commonMain/kotlin/com/livefront/sealedenum/compilation/location/SplitAcrossFilesSubclassB.kt new file mode 100644 index 00000000..ee90e9b6 --- /dev/null +++ b/processing-tests/common/src/commonMain/kotlin/com/livefront/sealedenum/compilation/location/SplitAcrossFilesSubclassB.kt @@ -0,0 +1,3 @@ +package com.livefront.sealedenum.compilation.location + +public object SplitAcrossFilesSubclassB : SplitAcrossFilesSealedClass() diff --git a/processing-tests/common/src/commonMain/kotlin/com/livefront/sealedenum/compilation/location/SplitAcrossFilesSubclassC.kt b/processing-tests/common/src/commonMain/kotlin/com/livefront/sealedenum/compilation/location/SplitAcrossFilesSubclassC.kt new file mode 100644 index 00000000..b7cdff42 --- /dev/null +++ b/processing-tests/common/src/commonMain/kotlin/com/livefront/sealedenum/compilation/location/SplitAcrossFilesSubclassC.kt @@ -0,0 +1,3 @@ +package com.livefront.sealedenum.compilation.location + +public object SplitAcrossFilesSubclassC : SplitAcrossFilesSealedClass() diff --git a/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/traversal/TraversalOrder.kt b/processing-tests/common/src/commonMain/kotlin/com/livefront/sealedenum/compilation/traversal/TraversalOrder.kt similarity index 96% rename from processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/traversal/TraversalOrder.kt rename to processing-tests/common/src/commonMain/kotlin/com/livefront/sealedenum/compilation/traversal/TraversalOrder.kt index e7665f50..c6f59189 100644 --- a/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/traversal/TraversalOrder.kt +++ b/processing-tests/common/src/commonMain/kotlin/com/livefront/sealedenum/compilation/traversal/TraversalOrder.kt @@ -4,65 +4,63 @@ package com.livefront.sealedenum.compilation.traversal import com.livefront.sealedenum.GenSealedEnum import com.livefront.sealedenum.TreeTraversalOrder -import org.intellij.lang.annotations.Language -sealed class Tree { +public sealed class Tree { - object A : Tree() + public object A : Tree() - sealed class B : Tree() { + public sealed class B : Tree() { - sealed class C : B() { + public sealed class C : B() { - object D : C() + public object D : C() - object E : C() + public object E : C() - sealed class F : C() { + public sealed class F : C() { - object G : F() + public object G : F() - object H : F() + public object H : F() - object I : F() + public object I : F() } - object J : C() + public object J : C() } } - object K : Tree() + public object K : Tree() - sealed class L : Tree() { + public sealed class L : Tree() { - sealed class M : L() { + public sealed class M : L() { - object N : M() + public object N : M() - object O : M() + public object O : M() } - sealed class P : L() { + public sealed class P : L() { - object Q : P() + public object Q : P() - object R : P() + public object R : P() } - object S : L() + public object S : L() } - object T : Tree() + public object T : Tree() @GenSealedEnum(traversalOrder = TreeTraversalOrder.PRE_ORDER, generateEnum = true) @GenSealedEnum(traversalOrder = TreeTraversalOrder.IN_ORDER, generateEnum = true) @GenSealedEnum(traversalOrder = TreeTraversalOrder.POST_ORDER, generateEnum = true) @GenSealedEnum(traversalOrder = TreeTraversalOrder.LEVEL_ORDER, generateEnum = true) - companion object + public companion object } -@Language("kotlin") -val treeGenerated = """ +public val treeGenerated: String = """ package com.livefront.sealedenum.compilation.traversal import com.livefront.sealedenum.EnumForSealedEnumProvider diff --git a/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/usecases/EnvironmentsSealedEnum.kt b/processing-tests/common/src/commonMain/kotlin/com/livefront/sealedenum/compilation/usecases/EnvironmentsSealedEnum.kt similarity index 90% rename from processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/usecases/EnvironmentsSealedEnum.kt rename to processing-tests/common/src/commonMain/kotlin/com/livefront/sealedenum/compilation/usecases/EnvironmentsSealedEnum.kt index 5bbd74e1..f2238abb 100644 --- a/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/usecases/EnvironmentsSealedEnum.kt +++ b/processing-tests/common/src/commonMain/kotlin/com/livefront/sealedenum/compilation/usecases/EnvironmentsSealedEnum.kt @@ -1,42 +1,40 @@ package com.livefront.sealedenum.compilation.usecases import com.livefront.sealedenum.GenSealedEnum -import org.intellij.lang.annotations.Language -interface Uri { - val scheme: String - val authority: String - val path: String +public interface Uri { + public val scheme: String + public val authority: String + public val path: String } -sealed class Environments( +public sealed class Environments( override val scheme: String, override val authority: String, override val path: String ) : Uri { - sealed class Http( + public sealed class Http( override val authority: String, override val path: String ) : Environments("http", authority, path) { - object Livefront : Http("www.livefront.com", "/") - object Google : Http("www.google.com", "/") + public object Livefront : Http("www.livefront.com", "/") + public object Google : Http("www.google.com", "/") } - sealed class Https( + public sealed class Https( override val authority: String, override val path: String ) : Environments("https", authority, path) { - object Livefront : Https("www.livefront.com", "/") - object Google : Https("www.google.com", "/") + public object Livefront : Https("www.livefront.com", "/") + public object Google : Https("www.google.com", "/") } @GenSealedEnum(generateEnum = true) - companion object + public companion object } -@Language("kotlin") -val environmentsGenerated = """ +public val environmentsGenerated: String = """ package com.livefront.sealedenum.compilation.usecases import com.livefront.sealedenum.EnumForSealedEnumProvider diff --git a/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/usecases/Flag.kt b/processing-tests/common/src/commonMain/kotlin/com/livefront/sealedenum/compilation/usecases/Flag.kt similarity index 93% rename from processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/usecases/Flag.kt rename to processing-tests/common/src/commonMain/kotlin/com/livefront/sealedenum/compilation/usecases/Flag.kt index a5a325e1..115b99f9 100644 --- a/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/usecases/Flag.kt +++ b/processing-tests/common/src/commonMain/kotlin/com/livefront/sealedenum/compilation/usecases/Flag.kt @@ -1,20 +1,18 @@ package com.livefront.sealedenum.compilation.usecases import com.livefront.sealedenum.GenSealedEnum -import org.intellij.lang.annotations.Language -sealed class Flag { - val i: Int = 1 shl ordinal - object FirstFlag : Flag() +public sealed class Flag { + public val i: Int = 1 shl ordinal + public object FirstFlag : Flag() - object SecondFlag : Flag() + public object SecondFlag : Flag() @GenSealedEnum(generateEnum = true) - companion object + public companion object } -@Language("kotlin") -val flagGenerated = """ +public val flagGenerated: String = """ package com.livefront.sealedenum.compilation.usecases import com.livefront.sealedenum.EnumForSealedEnumProvider diff --git a/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/usecases/MultiInterfaceFlag.kt b/processing-tests/common/src/commonMain/kotlin/com/livefront/sealedenum/compilation/usecases/MultiInterfaceFlag.kt similarity index 91% rename from processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/usecases/MultiInterfaceFlag.kt rename to processing-tests/common/src/commonMain/kotlin/com/livefront/sealedenum/compilation/usecases/MultiInterfaceFlag.kt index 527f1f3b..d184f518 100644 --- a/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/usecases/MultiInterfaceFlag.kt +++ b/processing-tests/common/src/commonMain/kotlin/com/livefront/sealedenum/compilation/usecases/MultiInterfaceFlag.kt @@ -1,21 +1,19 @@ package com.livefront.sealedenum.compilation.usecases import com.livefront.sealedenum.GenSealedEnum -import org.intellij.lang.annotations.Language -sealed interface MultiInterfaceFlag { - sealed interface FirstInterface : MultiInterfaceFlag - sealed interface SecondInterface : MultiInterfaceFlag - object FirstFlag : FirstInterface - object SecondFlag : SecondInterface - object BothFlags : FirstInterface, SecondInterface +public sealed interface MultiInterfaceFlag { + public sealed interface FirstInterface : MultiInterfaceFlag + public sealed interface SecondInterface : MultiInterfaceFlag + public object FirstFlag : FirstInterface + public object SecondFlag : SecondInterface + public object BothFlags : FirstInterface, SecondInterface @GenSealedEnum(generateEnum = true) - companion object + public companion object } -@Language("kotlin") -val multiInterfaceFlagGenerated = """ +public val multiInterfaceFlagGenerated: String = """ package com.livefront.sealedenum.compilation.usecases import com.livefront.sealedenum.EnumForSealedEnumProvider diff --git a/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/visibility/VisibilitySealedClass.kt b/processing-tests/common/src/commonMain/kotlin/com/livefront/sealedenum/compilation/visibility/VisibilitySealedClass.kt similarity index 97% rename from processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/visibility/VisibilitySealedClass.kt rename to processing-tests/common/src/commonMain/kotlin/com/livefront/sealedenum/compilation/visibility/VisibilitySealedClass.kt index 51cf04bd..edb4bd42 100644 --- a/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/visibility/VisibilitySealedClass.kt +++ b/processing-tests/common/src/commonMain/kotlin/com/livefront/sealedenum/compilation/visibility/VisibilitySealedClass.kt @@ -1,9 +1,8 @@ package com.livefront.sealedenum.compilation.visibility import com.livefront.sealedenum.GenSealedEnum -import org.intellij.lang.annotations.Language -sealed class InternalObjectsSealedClass { +public sealed class InternalObjectsSealedClass { internal object FirstObject : InternalObjectsSealedClass() internal object SecondObject : InternalObjectsSealedClass() @@ -13,11 +12,10 @@ sealed class InternalObjectsSealedClass { } @GenSealedEnum(generateEnum = true) - companion object + public companion object } -@Language("kotlin") -val internalObjectsSealedClassGenerated = """ +public val internalObjectsSealedClassGenerated: String = """ package com.livefront.sealedenum.compilation.visibility import com.livefront.sealedenum.EnumForSealedEnumProvider @@ -155,8 +153,7 @@ internal sealed class InternalSealedClass { companion object } -@Language("kotlin") -val internalSealedClassGenerated = """ +public val internalSealedClassGenerated: String = """ package com.livefront.sealedenum.compilation.visibility import com.livefront.sealedenum.EnumForSealedEnumProvider @@ -272,8 +269,8 @@ internal fun InternalSealedClass.Companion.valueOf(name: String): InternalSealed """.trimIndent() -sealed class InternalCompanionSealedClass { - object FirstObject : InternalCompanionSealedClass() +public sealed class InternalCompanionSealedClass { + public object FirstObject : InternalCompanionSealedClass() internal object SecondObject : InternalCompanionSealedClass() @@ -281,8 +278,7 @@ sealed class InternalCompanionSealedClass { internal companion object } -@Language("kotlin") -val internalCompanionSealedClassGenerated = """ +public val internalCompanionSealedClassGenerated: String = """ package com.livefront.sealedenum.compilation.visibility import com.livefront.sealedenum.EnumForSealedEnumProvider @@ -410,8 +406,7 @@ internal sealed class InternalSealedAndCompanionSealedClass { internal companion object } -@Language("kotlin") -val internalSealedAndCompanionSealedClassGenerated = """ +public val internalSealedAndCompanionSealedClassGenerated: String = """ package com.livefront.sealedenum.compilation.visibility import com.livefront.sealedenum.EnumForSealedEnumProvider diff --git a/processing-tests/common/src/commonTest/kotlin/com/livefront/sealedenum/compilation/basic/EmptySealedClassTests.kt b/processing-tests/common/src/commonTest/kotlin/com/livefront/sealedenum/compilation/basic/EmptySealedClassTests.kt new file mode 100644 index 00000000..400fdf82 --- /dev/null +++ b/processing-tests/common/src/commonTest/kotlin/com/livefront/sealedenum/compilation/basic/EmptySealedClassTests.kt @@ -0,0 +1,24 @@ +package com.livefront.sealedenum.compilation.basic + +import kotlin.test.Test +import kotlin.test.assertEquals + +class EmptySealedClassTests { + @Test + fun empty_sealed_class() { + assertEquals(emptyList(), EmptySealedClass.values) + } + + @Test + fun empty_enum_for_sealed_class() { + assertEquals( + EmptySealedClass.values.map(EmptySealedClass::enum), + enumValues().toList() + ) + } + + @Test + fun correct_enum_class() { + assertEquals(EmptySealedClassEnum::class, EmptySealedClass.sealedEnum.enumClass) + } +} diff --git a/processing-tests/common/src/commonTest/kotlin/com/livefront/sealedenum/compilation/basic/EmptySealedInterfaceTests.kt b/processing-tests/common/src/commonTest/kotlin/com/livefront/sealedenum/compilation/basic/EmptySealedInterfaceTests.kt new file mode 100644 index 00000000..e4038b07 --- /dev/null +++ b/processing-tests/common/src/commonTest/kotlin/com/livefront/sealedenum/compilation/basic/EmptySealedInterfaceTests.kt @@ -0,0 +1,24 @@ +package com.livefront.sealedenum.compilation.basic + +import kotlin.test.Test +import kotlin.test.assertEquals + +class EmptySealedInterfaceTests { + @Test + fun empty_sealed_interface() { + assertEquals(emptyList(), EmptySealedInterface.values) + } + + @Test + fun empty_enum_for_sealed_interface() { + assertEquals( + EmptySealedInterface.values.map(EmptySealedInterface::enum), + enumValues().toList() + ) + } + + @Test + fun correct_enum_class() { + assertEquals(EmptySealedInterfaceEnum::class, EmptySealedInterface.sealedEnum.enumClass) + } +} diff --git a/processing-tests/common/src/commonTest/kotlin/com/livefront/sealedenum/compilation/basic/OneObjectSealedClassTests.kt b/processing-tests/common/src/commonTest/kotlin/com/livefront/sealedenum/compilation/basic/OneObjectSealedClassTests.kt new file mode 100644 index 00000000..6e144911 --- /dev/null +++ b/processing-tests/common/src/commonTest/kotlin/com/livefront/sealedenum/compilation/basic/OneObjectSealedClassTests.kt @@ -0,0 +1,32 @@ +package com.livefront.sealedenum.compilation.basic + +import kotlin.test.Test +import kotlin.test.assertEquals + +class OneObjectSealedClassTests { + @Test + fun one_object_sealed_class() { + assertEquals(listOf(OneObjectSealedClass.FirstObject), OneObjectSealedClass.values) + } + + @Test + fun one_enum_for_sealed_class() { + assertEquals( + listOf(OneObjectSealedClassEnum.OneObjectSealedClass_FirstObject), + enumValues().toList() + ) + } + + @Test + fun one_enum_for_sealed_class_with_mapping() { + assertEquals( + OneObjectSealedClass.values.map(OneObjectSealedClass::enum), + enumValues().toList() + ) + } + + @Test + fun correct_enum_class() { + assertEquals(OneObjectSealedClassEnum::class, OneObjectSealedClass.sealedEnum.enumClass) + } +} diff --git a/processing-tests/common/src/commonTest/kotlin/com/livefront/sealedenum/compilation/basic/OneObjectSealedInterfaceTests.kt b/processing-tests/common/src/commonTest/kotlin/com/livefront/sealedenum/compilation/basic/OneObjectSealedInterfaceTests.kt new file mode 100644 index 00000000..ed320868 --- /dev/null +++ b/processing-tests/common/src/commonTest/kotlin/com/livefront/sealedenum/compilation/basic/OneObjectSealedInterfaceTests.kt @@ -0,0 +1,32 @@ +package com.livefront.sealedenum.compilation.basic + +import kotlin.test.Test +import kotlin.test.assertEquals + +class OneObjectSealedInterfaceTests { + @Test + fun one_object_sealed_interface() { + assertEquals(listOf(OneObjectSealedInterface.FirstObject), OneObjectSealedInterface.values) + } + + @Test + fun one_enum_for_sealed_interface() { + assertEquals( + listOf(OneObjectSealedInterfaceEnum.OneObjectSealedInterface_FirstObject), + enumValues().toList() + ) + } + + @Test + fun one_enum_for_sealed_interface_with_mapping() { + assertEquals( + OneObjectSealedInterface.values.map(OneObjectSealedInterface::enum), + enumValues().toList() + ) + } + + @Test + fun correct_enum_class() { + assertEquals(OneObjectSealedInterfaceEnum::class, OneObjectSealedInterface.sealedEnum.enumClass) + } +} diff --git a/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/basic/TwoObjectSealedClassTests.kt b/processing-tests/common/src/commonTest/kotlin/com/livefront/sealedenum/compilation/basic/TwoObjectSealedClassTests.kt similarity index 52% rename from processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/basic/TwoObjectSealedClassTests.kt rename to processing-tests/common/src/commonTest/kotlin/com/livefront/sealedenum/compilation/basic/TwoObjectSealedClassTests.kt index 9608ff5b..7eaae86d 100644 --- a/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/basic/TwoObjectSealedClassTests.kt +++ b/processing-tests/common/src/commonTest/kotlin/com/livefront/sealedenum/compilation/basic/TwoObjectSealedClassTests.kt @@ -1,15 +1,11 @@ package com.livefront.sealedenum.compilation.basic -import com.livefront.sealedenum.testing.assertCompiles -import com.livefront.sealedenum.testing.assertGeneratedFileMatches -import com.livefront.sealedenum.testing.compile -import com.livefront.sealedenum.testing.getCommonSourceFile -import org.junit.jupiter.api.Assertions.assertEquals -import org.junit.jupiter.api.Test +import kotlin.test.Test +import kotlin.test.assertEquals class TwoObjectSealedClassTests { @Test - fun `two objects sealed class`() { + fun two_objects_sealed_class() { assertEquals( listOf(TwoObjectSealedClass.FirstObject, TwoObjectSealedClass.SecondObject), TwoObjectSealedClassSealedEnum.values @@ -17,7 +13,7 @@ class TwoObjectSealedClassTests { } @Test - fun `two enums for sealed class`() { + fun two_enums_for_sealed_class() { assertEquals( listOf( TwoObjectSealedClassEnum.TwoObjectSealedClass_FirstObject, @@ -28,7 +24,7 @@ class TwoObjectSealedClassTests { } @Test - fun `two enums for sealed class with mapping`() { + fun two_enums_for_sealed_class_with_mapping() { assertEquals( TwoObjectSealedClass.values.map(TwoObjectSealedClass::enum), enumValues().toList() @@ -36,15 +32,7 @@ class TwoObjectSealedClassTests { } @Test - fun `correct enum class`() { + fun correct_enum_class() { assertEquals(TwoObjectSealedClassEnum::class, TwoObjectSealedClassSealedEnum.enumClass) } - - @Test - fun `compilation generates correct code`() { - val result = compile(getCommonSourceFile("compilation", "basic", "TwoObjectSealedClass.kt")) - - assertCompiles(result) - assertGeneratedFileMatches("TwoObjectSealedClass_SealedEnum.kt", twoObjectSealedClassGenerated, result) - } } diff --git a/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/basic/TwoObjectSealedInterfaceTests.kt b/processing-tests/common/src/commonTest/kotlin/com/livefront/sealedenum/compilation/basic/TwoObjectSealedInterfaceTests.kt similarity index 51% rename from processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/basic/TwoObjectSealedInterfaceTests.kt rename to processing-tests/common/src/commonTest/kotlin/com/livefront/sealedenum/compilation/basic/TwoObjectSealedInterfaceTests.kt index b828f2de..6e5ccee4 100644 --- a/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/basic/TwoObjectSealedInterfaceTests.kt +++ b/processing-tests/common/src/commonTest/kotlin/com/livefront/sealedenum/compilation/basic/TwoObjectSealedInterfaceTests.kt @@ -1,15 +1,11 @@ package com.livefront.sealedenum.compilation.basic -import com.livefront.sealedenum.testing.assertCompiles -import com.livefront.sealedenum.testing.assertGeneratedFileMatches -import com.livefront.sealedenum.testing.compile -import com.livefront.sealedenum.testing.getCommonSourceFile -import org.junit.jupiter.api.Assertions.assertEquals -import org.junit.jupiter.api.Test +import kotlin.test.Test +import kotlin.test.assertEquals class TwoObjectSealedInterfaceTests { @Test - fun `two objects sealed interface`() { + fun two_objects_sealed_interface() { assertEquals( listOf(TwoObjectSealedInterface.FirstObject, TwoObjectSealedInterface.SecondObject), TwoObjectSealedInterface.values @@ -17,7 +13,7 @@ class TwoObjectSealedInterfaceTests { } @Test - fun `two enums for sealed interface`() { + fun two_enums_for_sealed_interface() { assertEquals( listOf( TwoObjectSealedInterfaceEnum.TwoObjectSealedInterface_FirstObject, @@ -28,7 +24,7 @@ class TwoObjectSealedInterfaceTests { } @Test - fun `two enums for sealed interface with mapping`() { + fun two_enums_for_sealed_interface_with_mapping() { assertEquals( TwoObjectSealedInterface.values.map(TwoObjectSealedInterface::enum), enumValues().toList() @@ -36,19 +32,7 @@ class TwoObjectSealedInterfaceTests { } @Test - fun `correct enum class`() { + fun correct_enum_class() { assertEquals(TwoObjectSealedInterfaceEnum::class, TwoObjectSealedInterface.sealedEnum.enumClass) } - - @Test - fun `compilation generates correct code`() { - val result = compile(getCommonSourceFile("compilation", "basic", "TwoObjectSealedInterface.kt")) - - assertCompiles(result) - assertGeneratedFileMatches( - "TwoObjectSealedInterface_SealedEnum.kt", - twoObjectSealedInterfaceGenerated, - result - ) - } } diff --git a/processing-tests/common/src/commonTest/kotlin/com/livefront/sealedenum/compilation/generics/GenericSealedClassTests.kt b/processing-tests/common/src/commonTest/kotlin/com/livefront/sealedenum/compilation/generics/GenericSealedClassTests.kt new file mode 100644 index 00000000..0b2e4012 --- /dev/null +++ b/processing-tests/common/src/commonTest/kotlin/com/livefront/sealedenum/compilation/generics/GenericSealedClassTests.kt @@ -0,0 +1,50 @@ +package com.livefront.sealedenum.compilation.generics + +import kotlin.test.Test +import kotlin.test.assertEquals + +class GenericSealedClassTests { + @Test + fun one_type_parameter_sealed_class() { + assertEquals( + listOf( + OneTypeParameterSealedClass.FirstObject, + OneTypeParameterSealedClass.SecondObject, + OneTypeParameterSealedClass.ThirdObject + ), + OneTypeParameterSealedClass.values + ) + } + + @Test + fun two_type_parameter_sealed_class() { + assertEquals( + listOf( + TwoTypeParameterSealedClass.FirstObject, + TwoTypeParameterSealedClass.SecondObject + ), + TwoTypeParameterSealedClass.values + ) + } + + @Test + fun limited_type_parameter_sealed_class() { + assertEquals( + listOf( + LimitedTypeParameterSealedClass.FirstObject, + LimitedTypeParameterSealedClass.SecondObject + ), + LimitedTypeParameterSealedClass.values + ) + } + + @Test + fun multiple_bounds_sealed_class() { + assertEquals( + listOf( + MultipleBoundsSealedClass.FirstObject + ), + MultipleBoundsSealedClass.values + ) + } +} diff --git a/processing-tests/common/src/commonTest/kotlin/com/livefront/sealedenum/compilation/generics/SealedEnumWithAbstractBaseClassesTests.kt b/processing-tests/common/src/commonTest/kotlin/com/livefront/sealedenum/compilation/generics/SealedEnumWithAbstractBaseClassesTests.kt new file mode 100644 index 00000000..73dd5af8 --- /dev/null +++ b/processing-tests/common/src/commonTest/kotlin/com/livefront/sealedenum/compilation/generics/SealedEnumWithAbstractBaseClassesTests.kt @@ -0,0 +1,35 @@ +package com.livefront.sealedenum.compilation.generics + +import kotlin.test.Test +import kotlin.test.assertEquals + +class SealedEnumWithAbstractBaseClassesTests { + @Test + fun enum_implements_correct_interfaces_with_type_arguments() { + // Check for compilation + val emptyValues1: Array>> = + SealedEnumWithAbstractBaseClassesEnum.values() + val emptyValues2: Array> = SealedEnumWithAbstractBaseClassesEnum.values() + + assertEquals( + emptyList>>(), + emptyValues1.toList() + ) + + assertEquals( + emptyList>(), + emptyValues2.toList() + ) + } + + @Test + fun covariant_type_enum_implements_correct_interfaces_with_type_arguments() { + val emptyValues: Array>> = + SealedEnumWithAbstractBaseClassesCovariantTypeEnum.values() + + assertEquals( + emptyList>>(), + emptyValues.toList() + ) + } +} diff --git a/processing-tests/common/src/commonTest/kotlin/com/livefront/sealedenum/compilation/generics/SealedEnumWithInterfacesTests.kt b/processing-tests/common/src/commonTest/kotlin/com/livefront/sealedenum/compilation/generics/SealedEnumWithInterfacesTests.kt new file mode 100644 index 00000000..343eb743 --- /dev/null +++ b/processing-tests/common/src/commonTest/kotlin/com/livefront/sealedenum/compilation/generics/SealedEnumWithInterfacesTests.kt @@ -0,0 +1,91 @@ +package com.livefront.sealedenum.compilation.generics + +import kotlin.test.Test +import kotlin.test.assertEquals +import kotlin.test.assertFalse +import kotlin.test.assertTrue + +class SealedEnumWithInterfacesTests { + @Test + fun empty_sealed_enum_implements_interface() { + // Check for compilation + val emptyValues: List = EmptySealedClassWithInterface.values + + assertEquals( + emptyList(), + emptyValues + ) + } + + @Test + fun empty_enum_implements_interface() { + // Check for compilation + val emptyValues: Array = EmptySealedClassWithInterfaceEnum.values() + + assertEquals( + emptyList(), + emptyValues.toList() + ) + } + + @Test + fun single_object_sealed_enum_implements_interface() { + // Check for compilation + val oneObjectValues: List = OneObjectSealedClassWithInterface.values + + assertEquals( + listOf(OneObjectSealedClassWithInterface.FirstObject), + oneObjectValues + ) + } + + @Test + fun single_object_enum_implements_interface() { + val oneObjectValues: Array = OneObjectSealedClassWithInterfaceEnum.values() + + assertEquals( + listOf(OneObjectSealedClassWithInterfaceEnum.OneObjectSealedClassWithInterface_FirstObject), + oneObjectValues.toList() + ) + } + + @Test + fun two_object_sealed_enum_implements_generic_interface() { + // Check for compilation + val twoObjectValues: List> = + TwoObjectSealedClassWithGenericInterface.values + + assertEquals( + listOf( + TwoObjectSealedClassWithGenericInterface.FirstObject, + TwoObjectSealedClassWithGenericInterface.SecondObject + ), + twoObjectValues + ) + } + + @Test + fun two_object_enum_implements_generic_interface() { + val twoObjectValues: Array> = + TwoObjectSealedClassWithGenericInterfaceEnum.values() + + assertEquals( + listOf( + TwoObjectSealedClassWithGenericInterfaceEnum.TwoObjectSealedClassWithGenericInterface_FirstObject, + TwoObjectSealedClassWithGenericInterfaceEnum.TwoObjectSealedClassWithGenericInterface_SecondObject + ), + twoObjectValues.toList() + ) + } + + @Test + fun enum_delegates_to_sealed_class() { + val enumValue = SealedClassWithGetterInterfaceEnum.SealedClassWithGetterInterface_FirstObject + + assertFalse(hasGetBeenCalled) + + assertEquals("First", enumValue.get()) + + assertTrue(hasGetBeenCalled) + } +} diff --git a/processing-tests/common/src/commonTest/kotlin/com/livefront/sealedenum/compilation/hierarchy/SealedClassHierarchyTests.kt b/processing-tests/common/src/commonTest/kotlin/com/livefront/sealedenum/compilation/hierarchy/SealedClassHierarchyTests.kt new file mode 100644 index 00000000..e4d75e58 --- /dev/null +++ b/processing-tests/common/src/commonTest/kotlin/com/livefront/sealedenum/compilation/hierarchy/SealedClassHierarchyTests.kt @@ -0,0 +1,149 @@ +package com.livefront.sealedenum.compilation.hierarchy + +import kotlin.test.Test +import kotlin.test.assertEquals + +class SealedClassHierarchyTests { + @Test + fun first_hierarchy_class_A_values() { + assertEquals(listOf(FirstClassHierarchy.A.B.C), FirstClassHierarchy.A.values) + } + + @Test + fun first_hierarchy_class_A_ordinal_of_A_B_C() { + assertEquals(0, (FirstClassHierarchy.A.B.C as FirstClassHierarchy.A).ordinal) + } + + @Test + fun first_hierarchy_class_B_values() { + assertEquals(listOf(FirstClassHierarchy.A.B.C), FirstClassHierarchy.A.B.values) + } + + @Test + fun first_hierarchy_class_B_ordinal() { + assertEquals(0, (FirstClassHierarchy.A.B.C as FirstClassHierarchy.A.B).ordinal) + } + + @Test + fun second_hierarchy_class_Z_values() { + assertEquals( + listOf( + SecondClassHierarchy.Z.Y, + SecondClassHierarchy.Z.X.W, + SecondClassHierarchy.Z.X.V, + SecondClassHierarchy.Z.X.U.T, + SecondClassHierarchy.Z.X.S.R, + SecondClassHierarchy.Z.Q.P, + SecondClassHierarchy.Z.O + ), + SecondClassHierarchy.Z.values + ) + } + + @Test + fun second_hierarchy_class_Z_ordinal_of_Z_Y() { + assertEquals(0, (SecondClassHierarchy.Z.Y as SecondClassHierarchy.Z).ordinal) + } + + @Test + fun second_hierarchy_class_Z_ordinal_of_Z_X_W() { + assertEquals(1, (SecondClassHierarchy.Z.X.W as SecondClassHierarchy.Z).ordinal) + } + + @Test + fun second_hierarchy_class_Z_ordinal_of_Z_X_V() { + assertEquals(2, (SecondClassHierarchy.Z.X.V as SecondClassHierarchy.Z).ordinal) + } + + @Test + fun second_hierarchy_class_Z_ordinal_of_Z_X_U_T() { + assertEquals(3, (SecondClassHierarchy.Z.X.U.T as SecondClassHierarchy.Z).ordinal) + } + + @Test + fun second_hierarchy_class_Z_ordinal_of_Z_X_S_R() { + assertEquals(4, (SecondClassHierarchy.Z.X.S.R as SecondClassHierarchy.Z).ordinal) + } + + @Test + fun second_hierarchy_class_Z_ordinal_of_Z_Q_P() { + assertEquals(5, (SecondClassHierarchy.Z.Q.P as SecondClassHierarchy.Z).ordinal) + } + + @Test + fun second_hierarchy_class_Z_ordinal_of_Z_O() { + assertEquals(6, (SecondClassHierarchy.Z.O as SecondClassHierarchy.Z).ordinal) + } + + @Test + fun second_hierarchy_class_X_values() { + assertEquals( + listOf( + SecondClassHierarchy.Z.X.W, + SecondClassHierarchy.Z.X.V, + SecondClassHierarchy.Z.X.U.T, + SecondClassHierarchy.Z.X.S.R + ), + SecondClassHierarchy.Z.X.values + ) + } + + @Test + fun second_hierarchy_class_X_ordinal_of_Z_X_W() { + assertEquals(0, (SecondClassHierarchy.Z.X.W as SecondClassHierarchy.Z.X).ordinal) + } + + @Test + fun second_hierarchy_class_X_ordinal_of_Z_X_V() { + assertEquals(1, (SecondClassHierarchy.Z.X.V as SecondClassHierarchy.Z.X).ordinal) + } + + @Test + fun second_hierarchy_class_X_ordinal_of_Z_X_U_T() { + assertEquals(2, (SecondClassHierarchy.Z.X.U.T as SecondClassHierarchy.Z.X).ordinal) + } + + @Test + fun second_hierarchy_class_X_ordinal_of_Z_X_S_R() { + assertEquals(3, (SecondClassHierarchy.Z.X.S.R as SecondClassHierarchy.Z.X).ordinal) + } + + @Test + fun second_hierarchy_class_U_values() { + assertEquals( + listOf(SecondClassHierarchy.Z.X.U.T), + SecondClassHierarchy.Z.X.U.values + ) + } + + @Test + fun second_hierarchy_class_U_ordinal_of_Z_X_U_T() { + assertEquals(0, (SecondClassHierarchy.Z.X.U.T as SecondClassHierarchy.Z.X.U).ordinal) + } + + @Test + fun second_hierarchy_class_S_values() { + assertEquals( + listOf(SecondClassHierarchy.Z.X.S.R), + SecondClassHierarchy.Z.X.S.values + ) + } + + @Test + fun second_hierarchy_class_S_ordinal_of_Z_X_S_R() { + assertEquals(0, (SecondClassHierarchy.Z.X.S.R as SecondClassHierarchy.Z.X.S).ordinal) + } + + @Test + fun second_hierarchy_class_Q_values() { + assertEquals( + listOf(SecondClassHierarchy.Z.Q.P), + SecondClassHierarchy.Z.Q.values + ) + } + + @Test + fun second_hierarchy_class_Q_ordinal_of_Z_Q_P() { + assertEquals(0, (SecondClassHierarchy.Z.Q.P as SecondClassHierarchy.Z.Q).ordinal) + } +} diff --git a/processing-tests/common/src/commonTest/kotlin/com/livefront/sealedenum/compilation/hierarchy/SealedInterfaceHierarchyTests.kt b/processing-tests/common/src/commonTest/kotlin/com/livefront/sealedenum/compilation/hierarchy/SealedInterfaceHierarchyTests.kt new file mode 100644 index 00000000..51a93278 --- /dev/null +++ b/processing-tests/common/src/commonTest/kotlin/com/livefront/sealedenum/compilation/hierarchy/SealedInterfaceHierarchyTests.kt @@ -0,0 +1,149 @@ +package com.livefront.sealedenum.compilation.hierarchy + +import kotlin.test.Test +import kotlin.test.assertEquals + +class SealedInterfaceHierarchyTests { + @Test + fun first_hierarchy_class_A_values() { + assertEquals(listOf(FirstInterfaceHierarchy.A.B.C), FirstInterfaceHierarchy.A.values) + } + + @Test + fun first_hierarchy_class_A_ordinal_of_A_B_C() { + assertEquals(0, (FirstInterfaceHierarchy.A.B.C as FirstInterfaceHierarchy.A).ordinal) + } + + @Test + fun first_hierarchy_class_B_values() { + assertEquals(listOf(FirstInterfaceHierarchy.A.B.C), FirstInterfaceHierarchy.A.B.values) + } + + @Test + fun first_hierarchy_class_B_ordinal() { + assertEquals(0, (FirstInterfaceHierarchy.A.B.C as FirstInterfaceHierarchy.A.B).ordinal) + } + + @Test + fun second_hierarchy_class_A_values() { + assertEquals( + listOf( + SecondInterfaceHierarchy.A.B, + SecondInterfaceHierarchy.A.C.D, + SecondInterfaceHierarchy.A.C.E, + SecondInterfaceHierarchy.A.C.F.G, + SecondInterfaceHierarchy.A.C.H.I, + SecondInterfaceHierarchy.A.J.K, + SecondInterfaceHierarchy.A.L + ), + SecondInterfaceHierarchy.A.values + ) + } + + @Test + fun second_hierarchy_class_A_ordinal_of_A_B() { + assertEquals(0, (SecondInterfaceHierarchy.A.B as SecondInterfaceHierarchy.A).ordinal) + } + + @Test + fun second_hierarchy_class_A_ordinal_of_A_C_D() { + assertEquals(1, (SecondInterfaceHierarchy.A.C.D as SecondInterfaceHierarchy.A).ordinal) + } + + @Test + fun second_hierarchy_class_A_ordinal_of_A_C_E() { + assertEquals(2, (SecondInterfaceHierarchy.A.C.E as SecondInterfaceHierarchy.A).ordinal) + } + + @Test + fun second_hierarchy_class_A_ordinal_of_A_C_F_G() { + assertEquals(3, (SecondInterfaceHierarchy.A.C.F.G as SecondInterfaceHierarchy.A).ordinal) + } + + @Test + fun second_hierarchy_class_A_ordinal_of_A_C_H_I() { + assertEquals(4, (SecondInterfaceHierarchy.A.C.H.I as SecondInterfaceHierarchy.A).ordinal) + } + + @Test + fun second_hierarchy_class_A_ordinal_of_A_J_K() { + assertEquals(5, (SecondInterfaceHierarchy.A.J.K as SecondInterfaceHierarchy.A).ordinal) + } + + @Test + fun second_hierarchy_class_A_ordinal_of_A_L() { + assertEquals(6, (SecondInterfaceHierarchy.A.L as SecondInterfaceHierarchy.A).ordinal) + } + + @Test + fun second_hierarchy_class_C_values() { + assertEquals( + listOf( + SecondInterfaceHierarchy.A.C.D, + SecondInterfaceHierarchy.A.C.E, + SecondInterfaceHierarchy.A.C.F.G, + SecondInterfaceHierarchy.A.C.H.I + ), + SecondInterfaceHierarchy.A.C.values + ) + } + + @Test + fun second_hierarchy_class_C_ordinal_of_A_C_D() { + assertEquals(0, (SecondInterfaceHierarchy.A.C.D as SecondInterfaceHierarchy.A.C).ordinal) + } + + @Test + fun second_hierarchy_class_C_ordinal_of_A_C_E() { + assertEquals(1, (SecondInterfaceHierarchy.A.C.E as SecondInterfaceHierarchy.A.C).ordinal) + } + + @Test + fun second_hierarchy_class_C_ordinal_of_A_C_F_G() { + assertEquals(2, (SecondInterfaceHierarchy.A.C.F.G as SecondInterfaceHierarchy.A.C).ordinal) + } + + @Test + fun second_hierarchy_class_C_ordinal_of_A_C_H_I() { + assertEquals(3, (SecondInterfaceHierarchy.A.C.H.I as SecondInterfaceHierarchy.A.C).ordinal) + } + + @Test + fun second_hierarchy_class_F_values() { + assertEquals( + listOf(SecondInterfaceHierarchy.A.C.F.G), + SecondInterfaceHierarchy.A.C.F.values + ) + } + + @Test + fun second_hierarchy_class_F_ordinal_of_A_L() { + assertEquals(0, (SecondInterfaceHierarchy.A.C.F.G as SecondInterfaceHierarchy.A.C.F).ordinal) + } + + @Test + fun second_hierarchy_class_H_values() { + assertEquals( + listOf(SecondInterfaceHierarchy.A.C.H.I), + SecondInterfaceHierarchy.A.C.H.values + ) + } + + @Test + fun second_hierarchy_class_H_ordinal_of_A_C_H_I() { + assertEquals(0, (SecondInterfaceHierarchy.A.C.H.I as SecondInterfaceHierarchy.A.C.H).ordinal) + } + + @Test + fun second_hierarchy_class_J_values() { + assertEquals( + listOf(SecondInterfaceHierarchy.A.J.K), + SecondInterfaceHierarchy.A.J.values + ) + } + + @Test + fun second_hierarchy_class_J_ordinal_of_A_J_K() { + assertEquals(0, (SecondInterfaceHierarchy.A.J.K as SecondInterfaceHierarchy.A.J).ordinal) + } +} diff --git a/processing-tests/common/src/commonTest/kotlin/com/livefront/sealedenum/compilation/location/NestedClassTests.kt b/processing-tests/common/src/commonTest/kotlin/com/livefront/sealedenum/compilation/location/NestedClassTests.kt new file mode 100644 index 00000000..b89c89fc --- /dev/null +++ b/processing-tests/common/src/commonTest/kotlin/com/livefront/sealedenum/compilation/location/NestedClassTests.kt @@ -0,0 +1,28 @@ +package com.livefront.sealedenum.compilation.location + +import kotlin.test.Test +import kotlin.test.assertEquals + +class NestedClassTests { + @Test + fun inside_one_class() { + assertEquals( + listOf( + OuterClass.InsideOneClassSealedClass.FirstObject, + OuterClass.InsideOneClassSealedClass.SecondObject + ), + OuterClass.InsideOneClassSealedClass.values + ) + } + + @Test + fun inside_two_classes() { + assertEquals( + listOf( + FirstOuterClass.SecondOuterClass.InsideTwoClassesSealedClass.FirstObject, + FirstOuterClass.SecondOuterClass.InsideTwoClassesSealedClass.SecondObject + ), + FirstOuterClass.SecondOuterClass.InsideTwoClassesSealedClass.values + ) + } +} diff --git a/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/location/OutsideSealedClassTests.kt b/processing-tests/common/src/commonTest/kotlin/com/livefront/sealedenum/compilation/location/OutsideSealedClassTests.kt similarity index 56% rename from processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/location/OutsideSealedClassTests.kt rename to processing-tests/common/src/commonTest/kotlin/com/livefront/sealedenum/compilation/location/OutsideSealedClassTests.kt index d4994a7d..594a4746 100644 --- a/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/location/OutsideSealedClassTests.kt +++ b/processing-tests/common/src/commonTest/kotlin/com/livefront/sealedenum/compilation/location/OutsideSealedClassTests.kt @@ -1,21 +1,16 @@ package com.livefront.sealedenum.compilation.location -import com.livefront.sealedenum.testing.assertCompiles -import com.livefront.sealedenum.testing.assertGeneratedFileMatches -import com.livefront.sealedenum.testing.compile -import com.livefront.sealedenum.testing.getCommonSourceFile -import org.junit.jupiter.api.Assertions.assertEquals -import org.junit.jupiter.api.Test +import kotlin.test.Test +import kotlin.test.assertEquals class OutsideSealedClassTests { - @Test - fun `one object outside sealed class`() { + fun one_object_outside_sealed_class() { assertEquals(listOf(AlphaFirstObject), AlphaOutsideSealedClass.values) } @Test - fun `one enum outside sealed class`() { + fun one_enum_outside_sealed_class() { assertEquals( listOf(AlphaOutsideSealedClassEnum.AlphaFirstObject), enumValues().toList() @@ -23,7 +18,7 @@ class OutsideSealedClassTests { } @Test - fun `one enum outside sealed class with mapping`() { + fun one_enum_outside_sealed_class_with_mapping() { assertEquals( AlphaOutsideSealedClass.values.map(AlphaOutsideSealedClass::enum), enumValues().toList() @@ -31,15 +26,7 @@ class OutsideSealedClassTests { } @Test - fun `compilation for alpha outside sealed class generates correct code`() { - val result = compile(getCommonSourceFile("compilation", "location", "OutsideSealedClass.kt")) - - assertCompiles(result) - assertGeneratedFileMatches("AlphaOutsideSealedClass_SealedEnum.kt", alphaOutsideSealedClassGenerated, result) - } - - @Test - fun `two objects outside sealed class`() { + fun two_objects_outside_sealed_class() { assertEquals( listOf( BetaFirstObject, @@ -52,7 +39,7 @@ class OutsideSealedClassTests { } @Test - fun `two enums outside sealed class`() { + fun two_enums_outside_sealed_class() { assertEquals( listOf( BetaOutsideSealedClassEnum.BetaFirstObject, @@ -65,7 +52,7 @@ class OutsideSealedClassTests { } @Test - fun `two enums outside sealed class with mapping`() { + fun two_enums_outside_sealed_class_with_mapping() { assertEquals( BetaOutsideSealedClass.values.map(BetaOutsideSealedClass::enum), enumValues().toList() @@ -73,15 +60,7 @@ class OutsideSealedClassTests { } @Test - fun `compilation for beta outside sealed class generates correct code`() { - val result = compile(getCommonSourceFile("compilation", "location", "OutsideSealedClass.kt")) - - assertCompiles(result) - assertGeneratedFileMatches("BetaOutsideSealedClass_SealedEnum.kt", betaOutsideSealedClassGenerated, result) - } - - @Test - fun `outside object ordering`() { + fun outside_object_ordering() { assertEquals( listOf( GammaOutsideSealedClass.GammaSecondObject, @@ -94,7 +73,7 @@ class OutsideSealedClassTests { } @Test - fun `outside enum ordering`() { + fun outside_enum_ordering() { assertEquals( listOf( GammaOutsideSealedClassEnum.GammaOutsideSealedClass_GammaSecondObject, @@ -107,7 +86,7 @@ class OutsideSealedClassTests { } @Test - fun `outside enum ordering with mapping`() { + fun outside_enum_ordering_with_mapping() { assertEquals( GammaOutsideSealedClass.values.map(GammaOutsideSealedClass::enum), enumValues().toList() @@ -115,15 +94,7 @@ class OutsideSealedClassTests { } @Test - fun `compilation for gamma outside sealed class generates correct code`() { - val result = compile(getCommonSourceFile("compilation", "location", "OutsideSealedClass.kt")) - - assertCompiles(result) - assertGeneratedFileMatches("GammaOutsideSealedClass_SealedEnum.kt", gammaOutsideSealedClassGenerated, result) - } - - @Test - fun `duplicate name objects`() { + fun duplicate_name_objects() { assertEquals( listOf(DeltaOutsideSealedClass.DeltaObject, DeltaObject), DeltaOutsideSealedClass.values @@ -131,7 +102,7 @@ class OutsideSealedClassTests { } @Test - fun `duplicate name enums`() { + fun duplicate_name_enums() { assertEquals( listOf( DeltaOutsideSealedClassEnum.DeltaOutsideSealedClass_DeltaObject, @@ -142,18 +113,10 @@ class OutsideSealedClassTests { } @Test - fun `duplicate name enums with mapping`() { + fun duplicate_name_enums_with_mapping() { assertEquals( DeltaOutsideSealedClass.values.map(DeltaOutsideSealedClass::enum), enumValues().toList() ) } - - @Test - fun `compilation for delta outside sealed class generates correct code`() { - val result = compile(getCommonSourceFile("compilation", "location", "OutsideSealedClass.kt")) - - assertCompiles(result) - assertGeneratedFileMatches("DeltaOutsideSealedClass_SealedEnum.kt", deltaOutsideSealedClassGenerated, result) - } } diff --git a/processing-tests/common/src/commonTest/kotlin/com/livefront/sealedenum/compilation/location/SplitAcrossFilesSealedClassTests.kt b/processing-tests/common/src/commonTest/kotlin/com/livefront/sealedenum/compilation/location/SplitAcrossFilesSealedClassTests.kt new file mode 100644 index 00000000..e0c4c861 --- /dev/null +++ b/processing-tests/common/src/commonTest/kotlin/com/livefront/sealedenum/compilation/location/SplitAcrossFilesSealedClassTests.kt @@ -0,0 +1,26 @@ +package com.livefront.sealedenum.compilation.location + +import kotlin.test.Test +import kotlin.test.assertEquals + +class SplitAcrossFilesSealedClassTests { + @Test + fun object_split_across_files() { + assertEquals( + listOf( + SplitAcrossFilesSubclassA, + SplitAcrossFilesSubclassB, + SplitAcrossFilesSubclassC + ), + SplitAcrossFilesSealedClass.values + ) + } + + @Test + fun enum_for_objects_split_across_files() { + assertEquals( + SplitAcrossFilesSealedClass.values.map(SplitAcrossFilesSealedClass::enum), + enumValues().toList() + ) + } +} diff --git a/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/traversal/TraversalOrderTests.kt b/processing-tests/common/src/commonTest/kotlin/com/livefront/sealedenum/compilation/traversal/TraversalOrderTests.kt similarity index 84% rename from processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/traversal/TraversalOrderTests.kt rename to processing-tests/common/src/commonTest/kotlin/com/livefront/sealedenum/compilation/traversal/TraversalOrderTests.kt index 61110ea5..cc3f9c61 100644 --- a/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/traversal/TraversalOrderTests.kt +++ b/processing-tests/common/src/commonTest/kotlin/com/livefront/sealedenum/compilation/traversal/TraversalOrderTests.kt @@ -1,16 +1,11 @@ package com.livefront.sealedenum.compilation.traversal -import com.livefront.sealedenum.testing.assertCompiles -import com.livefront.sealedenum.testing.assertGeneratedFileMatches -import com.livefront.sealedenum.testing.compile -import com.livefront.sealedenum.testing.getCommonSourceFile -import org.junit.jupiter.api.Assertions.assertEquals -import org.junit.jupiter.api.Test +import kotlin.test.Test +import kotlin.test.assertEquals class TraversalOrderTests { - @Test - fun `pre order objects`() { + fun pre_order_objects() { assertEquals( listOf( Tree.A, @@ -33,7 +28,7 @@ class TraversalOrderTests { } @Test - fun `pre order objects in sealed enum`() { + fun pre_order_objects_in_sealed_enum() { assertEquals( Tree.preOrderValues, TreePreOrderSealedEnum.values @@ -41,7 +36,7 @@ class TraversalOrderTests { } @Test - fun `pre order enum`() { + fun pre_order_enum() { assertEquals( listOf( TreePreOrderEnum.Tree_A, @@ -64,7 +59,7 @@ class TraversalOrderTests { } @Test - fun `pre order enum mapping`() { + fun pre_order_enum_mapping() { assertEquals( Tree.preOrderValues.map(Tree::preOrderEnum), enumValues().toList() @@ -72,7 +67,7 @@ class TraversalOrderTests { } @Test - fun `in order objects`() { + fun in_order_objects() { assertEquals( listOf( Tree.A, @@ -95,7 +90,7 @@ class TraversalOrderTests { } @Test - fun `in order objects in sealed enum`() { + fun in_order_objects_in_sealed_enum() { assertEquals( Tree.inOrderValues, TreeInOrderSealedEnum.values @@ -103,7 +98,7 @@ class TraversalOrderTests { } @Test - fun `in order enum`() { + fun in_order_enum() { assertEquals( listOf( TreeInOrderEnum.Tree_A, @@ -126,7 +121,7 @@ class TraversalOrderTests { } @Test - fun `in order enum mapping`() { + fun in_order_enum_mapping() { assertEquals( Tree.inOrderValues.map(Tree::inOrderEnum), enumValues().toList() @@ -134,7 +129,7 @@ class TraversalOrderTests { } @Test - fun `post order objects`() { + fun post_order_objects() { assertEquals( listOf( Tree.B.C.F.G, @@ -157,7 +152,7 @@ class TraversalOrderTests { } @Test - fun `post order objects in sealed enum`() { + fun post_order_objects_in_sealed_enum() { assertEquals( Tree.postOrderValues, TreePostOrderSealedEnum.values @@ -165,7 +160,7 @@ class TraversalOrderTests { } @Test - fun `post order enum`() { + fun post_order_enum() { assertEquals( listOf( TreePostOrderEnum.Tree_B_C_F_G, @@ -188,7 +183,7 @@ class TraversalOrderTests { } @Test - fun `post order enum mapping`() { + fun post_order_enum_mapping() { assertEquals( Tree.postOrderValues.map(Tree::postOrderEnum), enumValues().toList() @@ -196,7 +191,7 @@ class TraversalOrderTests { } @Test - fun `level order objects`() { + fun level_order_objects() { assertEquals( listOf( Tree.A, @@ -219,7 +214,7 @@ class TraversalOrderTests { } @Test - fun `level order objects in sealed enum`() { + fun level_order_objects_in_sealed_enum() { assertEquals( Tree.levelOrderValues, TreeLevelOrderSealedEnum.values @@ -227,7 +222,7 @@ class TraversalOrderTests { } @Test - fun `level order enum`() { + fun level_order_enum() { assertEquals( listOf( TreeLevelOrderEnum.Tree_A, @@ -250,18 +245,10 @@ class TraversalOrderTests { } @Test - fun `level order enum with mapping`() { + fun level_order_enum_with_mapping() { assertEquals( Tree.levelOrderValues.map(Tree::levelOrderEnum), enumValues().toList() ) } - - @Test - fun `compilation generates correct code`() { - val result = compile(getCommonSourceFile("compilation", "traversal", "TraversalOrder.kt")) - - assertCompiles(result) - assertGeneratedFileMatches("Tree_SealedEnum.kt", treeGenerated, result) - } } diff --git a/processing-tests/common/src/commonTest/kotlin/com/livefront/sealedenum/compilation/usecases/FlagTests.kt b/processing-tests/common/src/commonTest/kotlin/com/livefront/sealedenum/compilation/usecases/FlagTests.kt new file mode 100644 index 00000000..c7d98046 --- /dev/null +++ b/processing-tests/common/src/commonTest/kotlin/com/livefront/sealedenum/compilation/usecases/FlagTests.kt @@ -0,0 +1,38 @@ +package com.livefront.sealedenum.compilation.usecases + +import kotlin.test.Test +import kotlin.test.assertEquals + +class FlagTests { + @Test + fun two_objects_sealed_class() { + assertEquals( + listOf(Flag.FirstFlag, Flag.SecondFlag), + FlagSealedEnum.values + ) + } + + @Test + fun two_enums_for_sealed_class() { + assertEquals( + listOf( + FlagEnum.Flag_FirstFlag, + FlagEnum.Flag_SecondFlag + ), + enumValues().toList() + ) + } + + @Test + fun two_enums_for_sealed_class_with_mapping() { + assertEquals( + Flag.values.map(Flag::enum), + enumValues().toList() + ) + } + + @Test + fun correct_enum_class() { + assertEquals(FlagEnum::class, FlagSealedEnum.enumClass) + } +} diff --git a/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/usecases/MultiInterfaceFlagTests.kt b/processing-tests/common/src/commonTest/kotlin/com/livefront/sealedenum/compilation/usecases/MultiInterfaceFlagTests.kt similarity index 53% rename from processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/usecases/MultiInterfaceFlagTests.kt rename to processing-tests/common/src/commonTest/kotlin/com/livefront/sealedenum/compilation/usecases/MultiInterfaceFlagTests.kt index 38d665b6..b25e90a1 100644 --- a/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/usecases/MultiInterfaceFlagTests.kt +++ b/processing-tests/common/src/commonTest/kotlin/com/livefront/sealedenum/compilation/usecases/MultiInterfaceFlagTests.kt @@ -1,15 +1,11 @@ package com.livefront.sealedenum.compilation.usecases -import com.livefront.sealedenum.testing.assertCompiles -import com.livefront.sealedenum.testing.assertGeneratedFileMatches -import com.livefront.sealedenum.testing.compile -import com.livefront.sealedenum.testing.getCommonSourceFile -import org.junit.jupiter.api.Assertions.assertEquals -import org.junit.jupiter.api.Test +import kotlin.test.Test +import kotlin.test.assertEquals class MultiInterfaceFlagTests { @Test - fun `three objects sealed interface`() { + fun three_objects_sealed_interface() { assertEquals( listOf(MultiInterfaceFlag.BothFlags, MultiInterfaceFlag.FirstFlag, MultiInterfaceFlag.SecondFlag), MultiInterfaceFlag.values @@ -17,7 +13,7 @@ class MultiInterfaceFlagTests { } @Test - fun `three enums for sealed class`() { + fun three_enums_for_sealed_class() { assertEquals( listOf( MultiInterfaceFlagEnum.MultiInterfaceFlag_BothFlags, @@ -29,7 +25,7 @@ class MultiInterfaceFlagTests { } @Test - fun `three enums for sealed interface with mapping`() { + fun three_enums_for_sealed_interface_with_mapping() { assertEquals( MultiInterfaceFlag.values.map(MultiInterfaceFlag::enum), enumValues().toList() @@ -37,15 +33,7 @@ class MultiInterfaceFlagTests { } @Test - fun `correct enum class`() { + fun correct_enum_class() { assertEquals(MultiInterfaceFlagEnum::class, MultiInterfaceFlagSealedEnum.enumClass) } - - @Test - fun `compilation generates correct code`() { - val result = compile(getCommonSourceFile("compilation", "usecases", "MultiInterfaceFlag.kt")) - - assertCompiles(result) - assertGeneratedFileMatches("MultiInterfaceFlag_SealedEnum.kt", multiInterfaceFlagGenerated, result) - } } diff --git a/processing-tests/common/src/commonTest/kotlin/com/livefront/sealedenum/compilation/visibility/VisibilitySealedClassTests.kt b/processing-tests/common/src/commonTest/kotlin/com/livefront/sealedenum/compilation/visibility/VisibilitySealedClassTests.kt new file mode 100644 index 00000000..f976835f --- /dev/null +++ b/processing-tests/common/src/commonTest/kotlin/com/livefront/sealedenum/compilation/visibility/VisibilitySealedClassTests.kt @@ -0,0 +1,152 @@ +package com.livefront.sealedenum.compilation.visibility + +import com.livefront.sealedenum.SealedEnum +import kotlin.test.Test +import kotlin.test.assertEquals + +/** + * Verifies that generated [SealedEnum] implementations, extension properties and methods have valid visibilities. + */ +class VisibilitySealedClassTests { + @Test + fun internal_objects_values_are_correct() { + assertEquals( + listOf( + InternalObjectsSealedClass.FirstObject, + InternalObjectsSealedClass.SecondObject, + InternalObjectsSealedClass.InnerSealedClass.ThirdObject + ), + InternalObjectsSealedClass.values + ) + } + + @Test + fun internal_objects_enums_values_are_correct() { + assertEquals( + listOf( + InternalObjectsSealedClassEnum.InternalObjectsSealedClass_FirstObject, + InternalObjectsSealedClassEnum.InternalObjectsSealedClass_SecondObject, + InternalObjectsSealedClassEnum.InternalObjectsSealedClass_InnerSealedClass_ThirdObject + ), + enumValues().toList() + ) + } + + @Test + fun internal_objects_enums_values_are_correct_with_mapping() { + assertEquals( + InternalObjectsSealedClass.values.map(InternalObjectsSealedClass::enum), + enumValues().toList() + ) + } + + @Test + fun internal_objects_correct_enum_class() { + assertEquals(InternalObjectsSealedClassEnum::class, InternalObjectsSealedClass.sealedEnum.enumClass) + } + + @Test + fun internal_sealed_class_values_are_correct() { + assertEquals( + listOf(InternalSealedClass.FirstObject, InternalSealedClass.SecondObject), + InternalSealedClass.values + ) + } + + @Test + fun internal_seald_class_enums_values_are_correct() { + assertEquals( + listOf( + InternalSealedClassEnum.InternalSealedClass_FirstObject, + InternalSealedClassEnum.InternalSealedClass_SecondObject + ), + enumValues().toList() + ) + } + + @Test + fun internal_sealed_class_enums_values_are_correct_with_mapping() { + assertEquals( + InternalSealedClass.values.map(InternalSealedClass::enum), + enumValues().toList() + ) + } + + @Test + fun internal_sealed_class_correct_enum_class() { + assertEquals(InternalSealedClassEnum::class, InternalSealedClass.sealedEnum.enumClass) + } + + @Test + fun internal_companion_object_internal_values_are_correct() { + assertEquals( + listOf(InternalCompanionSealedClass.FirstObject, InternalCompanionSealedClass.SecondObject), + InternalCompanionSealedClass.values + ) + } + + @Test + fun internal_companion_object_enums_values_are_correct() { + assertEquals( + listOf( + InternalCompanionSealedClassEnum.InternalCompanionSealedClass_FirstObject, + InternalCompanionSealedClassEnum.InternalCompanionSealedClass_SecondObject + ), + enumValues().toList() + ) + } + + @Test + fun internal_companion_object_enums_values_are_correct_with_mapping() { + assertEquals( + InternalCompanionSealedClass.values.map(InternalCompanionSealedClass::enum), + enumValues().toList() + ) + } + + @Test + fun internal_companion_object_correct_enum_class() { + assertEquals( + InternalCompanionSealedClassEnum::class, + InternalCompanionSealedClass.sealedEnum.enumClass + ) + } + + @Test + fun internal_sealed_class_and_companion_object_values_are_correct() { + assertEquals( + listOf( + InternalSealedAndCompanionSealedClass.FirstObject, + InternalSealedAndCompanionSealedClass.SecondObject + ), + InternalSealedAndCompanionSealedClass.values + ) + } + + @Test + fun internal_sealed_class_and_companion_object_enums_values_are_correct() { + assertEquals( + listOf( + InternalSealedAndCompanionSealedClassEnum.InternalSealedAndCompanionSealedClass_FirstObject, + InternalSealedAndCompanionSealedClassEnum.InternalSealedAndCompanionSealedClass_SecondObject + ), + enumValues().toList() + ) + } + + @Test + fun internal_sealed_class_and_companion_object_enums_values_are_correct_with_mapping() { + assertEquals( + InternalSealedAndCompanionSealedClass.values.map(InternalSealedAndCompanionSealedClass::enum), + enumValues().toList() + ) + } + + @Test + fun internal_sealed_class_and_companion_object_correct_enum_class() { + assertEquals( + InternalSealedAndCompanionSealedClassEnum::class, + InternalSealedAndCompanionSealedClass.sealedEnum.enumClass + ) + } +} diff --git a/processing-tests/common/src/commonTest/kotlin/com/livefront/sealedenum/testing/ProcessingType.kt b/processing-tests/common/src/commonTest/kotlin/com/livefront/sealedenum/testing/ProcessingType.kt new file mode 100644 index 00000000..dbf56fbc --- /dev/null +++ b/processing-tests/common/src/commonTest/kotlin/com/livefront/sealedenum/testing/ProcessingType.kt @@ -0,0 +1,13 @@ +package com.livefront.sealedenum.testing + +import kotlin.jvm.JvmStatic + +enum class ProcessingType { + AnnotationProcessing, KotlinSymbolProcessing; + companion object +} + +object ProcessingTypeGetter { + @JvmStatic + fun isKSP(): Boolean = ProcessingType.currentType == ProcessingType.KotlinSymbolProcessing +} diff --git a/processing-tests/common/test/java/com/livefront/sealedenum/compilation/visibility/JavaPrivateInterfaceOuterClass.java b/processing-tests/common/src/jvmMain/java/com/livefront/sealedenum/compilation/visibility/JavaPrivateInterfaceOuterClass.java similarity index 100% rename from processing-tests/common/test/java/com/livefront/sealedenum/compilation/visibility/JavaPrivateInterfaceOuterClass.java rename to processing-tests/common/src/jvmMain/java/com/livefront/sealedenum/compilation/visibility/JavaPrivateInterfaceOuterClass.java diff --git a/processing-tests/common/test/java/com/livefront/sealedenum/compilation/visibility/JavaPrivateInterfaceSubclass.java b/processing-tests/common/src/jvmMain/java/com/livefront/sealedenum/compilation/visibility/JavaPrivateInterfaceSubclass.java similarity index 100% rename from processing-tests/common/test/java/com/livefront/sealedenum/compilation/visibility/JavaPrivateInterfaceSubclass.java rename to processing-tests/common/src/jvmMain/java/com/livefront/sealedenum/compilation/visibility/JavaPrivateInterfaceSubclass.java diff --git a/processing-tests/common/test/java/com/livefront/sealedenum/compilation/visibility/JavaProtectedInterfaceBaseClass.java b/processing-tests/common/src/jvmMain/java/com/livefront/sealedenum/compilation/visibility/JavaProtectedInterfaceBaseClass.java similarity index 100% rename from processing-tests/common/test/java/com/livefront/sealedenum/compilation/visibility/JavaProtectedInterfaceBaseClass.java rename to processing-tests/common/src/jvmMain/java/com/livefront/sealedenum/compilation/visibility/JavaProtectedInterfaceBaseClass.java diff --git a/processing-tests/common/test/java/com/livefront/sealedenum/compilation/visibility/JavaProtectedInterfaceSubclass.java b/processing-tests/common/src/jvmMain/java/com/livefront/sealedenum/compilation/visibility/JavaProtectedInterfaceSubclass.java similarity index 100% rename from processing-tests/common/test/java/com/livefront/sealedenum/compilation/visibility/JavaProtectedInterfaceSubclass.java rename to processing-tests/common/src/jvmMain/java/com/livefront/sealedenum/compilation/visibility/JavaProtectedInterfaceSubclass.java diff --git a/processing-tests/common/test/java/com/livefront/sealedenum/compilation/visibility/subpackage/JavaProtectedInterfaceBaseClass.java b/processing-tests/common/src/jvmMain/java/com/livefront/sealedenum/compilation/visibility/subpackage/JavaProtectedInterfaceBaseClass.java similarity index 100% rename from processing-tests/common/test/java/com/livefront/sealedenum/compilation/visibility/subpackage/JavaProtectedInterfaceBaseClass.java rename to processing-tests/common/src/jvmMain/java/com/livefront/sealedenum/compilation/visibility/subpackage/JavaProtectedInterfaceBaseClass.java diff --git a/processing-tests/common/test/java/com/livefront/sealedenum/compilation/visibility/subpackage/JavaProtectedInterfaceSubclass.java b/processing-tests/common/src/jvmMain/java/com/livefront/sealedenum/compilation/visibility/subpackage/JavaProtectedInterfaceSubclass.java similarity index 100% rename from processing-tests/common/test/java/com/livefront/sealedenum/compilation/visibility/subpackage/JavaProtectedInterfaceSubclass.java rename to processing-tests/common/src/jvmMain/java/com/livefront/sealedenum/compilation/visibility/subpackage/JavaProtectedInterfaceSubclass.java diff --git a/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/visibility/PrivateInterfaceSealedClass.kt b/processing-tests/common/src/jvmMain/kotlin/com/livefront/sealedenum/compilation/visibility/PrivateInterfaceSealedClass.kt similarity index 95% rename from processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/visibility/PrivateInterfaceSealedClass.kt rename to processing-tests/common/src/jvmMain/kotlin/com/livefront/sealedenum/compilation/visibility/PrivateInterfaceSealedClass.kt index 6be43861..3d05a437 100644 --- a/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/visibility/PrivateInterfaceSealedClass.kt +++ b/processing-tests/common/src/jvmMain/kotlin/com/livefront/sealedenum/compilation/visibility/PrivateInterfaceSealedClass.kt @@ -3,21 +3,21 @@ package com.livefront.sealedenum.compilation.visibility import com.livefront.sealedenum.GenSealedEnum import org.intellij.lang.annotations.Language -sealed class PrivateInterfaceSealedClass : +public sealed class PrivateInterfaceSealedClass : JavaPrivateInterfaceSubclass(JavaPrivateInterfaceOuterClass()), PrivateInterface { - object FirstObject : PrivateInterfaceSealedClass() + public object FirstObject : PrivateInterfaceSealedClass() - object SecondObject : PrivateInterfaceSealedClass() + public object SecondObject : PrivateInterfaceSealedClass() @GenSealedEnum(generateEnum = true) - companion object + public companion object } private interface PrivateInterface @Language("kotlin") -val privateInterfaceSealedClassGenerated = """ +public val privateInterfaceSealedClassGenerated: String = """ package com.livefront.sealedenum.compilation.visibility import com.livefront.sealedenum.EnumForSealedEnumProvider diff --git a/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/visibility/ProtectedInterfaceSealedClass.kt b/processing-tests/common/src/jvmMain/kotlin/com/livefront/sealedenum/compilation/visibility/ProtectedInterfaceSealedClass.kt similarity index 94% rename from processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/visibility/ProtectedInterfaceSealedClass.kt rename to processing-tests/common/src/jvmMain/kotlin/com/livefront/sealedenum/compilation/visibility/ProtectedInterfaceSealedClass.kt index 280fa7cf..6f58b84f 100644 --- a/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/visibility/ProtectedInterfaceSealedClass.kt +++ b/processing-tests/common/src/jvmMain/kotlin/com/livefront/sealedenum/compilation/visibility/ProtectedInterfaceSealedClass.kt @@ -5,24 +5,25 @@ package com.livefront.sealedenum.compilation.visibility import com.livefront.sealedenum.GenSealedEnum import org.intellij.lang.annotations.Language -open class ProtectedInterfaceOuterClass { +public open class ProtectedInterfaceOuterClass { protected interface ProtectedInterface - sealed class ProtectedInterfaceSealedClass : - com.livefront.sealedenum.compilation.visibility.JavaProtectedInterfaceSubclass(), ProtectedInterface { + public sealed class ProtectedInterfaceSealedClass : + JavaProtectedInterfaceSubclass(), ProtectedInterface { - object FirstObject : ProtectedInterfaceSealedClass() + public object FirstObject : ProtectedInterfaceSealedClass() - object SecondObject : ProtectedInterfaceSealedClass() + public object SecondObject : ProtectedInterfaceSealedClass() @GenSealedEnum(generateEnum = true) - companion object + public companion object } } +@Suppress("MaxLineLength") @Language("kotlin") -val protectedInterfaceSealedClassGenerated = """ +public val protectedInterfaceSealedClassGenerated: String = """ package com.livefront.sealedenum.compilation.visibility import com.livefront.sealedenum.EnumForSealedEnumProvider diff --git a/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/visibility/ProtectedInterfaceSealedClassWithDifferentPackageBaseClass.kt b/processing-tests/common/src/jvmMain/kotlin/com/livefront/sealedenum/compilation/visibility/ProtectedInterfaceSealedClassWithDifferentPackageBaseClass.kt similarity index 95% rename from processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/visibility/ProtectedInterfaceSealedClassWithDifferentPackageBaseClass.kt rename to processing-tests/common/src/jvmMain/kotlin/com/livefront/sealedenum/compilation/visibility/ProtectedInterfaceSealedClassWithDifferentPackageBaseClass.kt index 6b7da9de..18e9ad36 100644 --- a/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/visibility/ProtectedInterfaceSealedClassWithDifferentPackageBaseClass.kt +++ b/processing-tests/common/src/jvmMain/kotlin/com/livefront/sealedenum/compilation/visibility/ProtectedInterfaceSealedClassWithDifferentPackageBaseClass.kt @@ -5,25 +5,26 @@ package com.livefront.sealedenum.compilation.visibility import com.livefront.sealedenum.GenSealedEnum import org.intellij.lang.annotations.Language -open class ProtectedInterfaceOuterClassWithDifferentPackageBaseClass { +public open class ProtectedInterfaceOuterClassWithDifferentPackageBaseClass { protected interface ProtectedInterface - sealed class ProtectedInterfaceSealedClass : + public sealed class ProtectedInterfaceSealedClass : com.livefront.sealedenum.compilation.visibility.subpackage.JavaProtectedInterfaceSubclass(), ProtectedInterface { - object FirstObject : ProtectedInterfaceSealedClass() + public object FirstObject : ProtectedInterfaceSealedClass() - object SecondObject : ProtectedInterfaceSealedClass() + public object SecondObject : ProtectedInterfaceSealedClass() @GenSealedEnum(generateEnum = true) - companion object + public companion object } } +@Suppress("MaxLineLength") @Language("kotlin") -val protectedInterfaceSealedClassWithDifferentPackageBaseClassGenerated = """ +public val protectedInterfaceSealedClassWithDifferentPackageBaseClassGenerated: String = """ package com.livefront.sealedenum.compilation.visibility import com.livefront.sealedenum.EnumForSealedEnumProvider diff --git a/processing-tests/common/src/jvmTest/kotlin/com/livefront/sealedenum/compilation/basic/EmptySealedClassCompilationTests.kt b/processing-tests/common/src/jvmTest/kotlin/com/livefront/sealedenum/compilation/basic/EmptySealedClassCompilationTests.kt new file mode 100644 index 00000000..5ee1ac60 --- /dev/null +++ b/processing-tests/common/src/jvmTest/kotlin/com/livefront/sealedenum/compilation/basic/EmptySealedClassCompilationTests.kt @@ -0,0 +1,30 @@ +package com.livefront.sealedenum.compilation.basic + +import com.livefront.sealedenum.testing.PlatformSourceType +import com.livefront.sealedenum.testing.SharableProcessingSourceType +import com.livefront.sealedenum.testing.assertCompiles +import com.livefront.sealedenum.testing.assertGeneratedFileMatches +import com.livefront.sealedenum.testing.compile +import com.livefront.sealedenum.testing.getSourceFile +import org.junit.jupiter.api.Test + +/** + * @see EmptySealedClassTests + */ +class EmptySealedClassCompilationTests { + @Test + fun `compilation generates correct code`() { + val result = compile( + getSourceFile( + SharableProcessingSourceType.COMMMON, + PlatformSourceType.COMMON, + "compilation", + "basic", + "EmptySealedClass.kt" + ) + ) + + assertCompiles(result) + assertGeneratedFileMatches("EmptySealedClass_SealedEnum.kt", emptySealedClassGenerated, result) + } +} diff --git a/processing-tests/common/src/jvmTest/kotlin/com/livefront/sealedenum/compilation/basic/EmptySealedInterfaceCompilationTests.kt b/processing-tests/common/src/jvmTest/kotlin/com/livefront/sealedenum/compilation/basic/EmptySealedInterfaceCompilationTests.kt new file mode 100644 index 00000000..4f8d33c1 --- /dev/null +++ b/processing-tests/common/src/jvmTest/kotlin/com/livefront/sealedenum/compilation/basic/EmptySealedInterfaceCompilationTests.kt @@ -0,0 +1,30 @@ +package com.livefront.sealedenum.compilation.basic + +import com.livefront.sealedenum.testing.PlatformSourceType +import com.livefront.sealedenum.testing.SharableProcessingSourceType +import com.livefront.sealedenum.testing.assertCompiles +import com.livefront.sealedenum.testing.assertGeneratedFileMatches +import com.livefront.sealedenum.testing.compile +import com.livefront.sealedenum.testing.getSourceFile +import org.junit.jupiter.api.Test + +/** + * @see EmptySealedInterfaceTests + */ +class EmptySealedInterfaceCompilationTests { + @Test + fun `compilation generates correct code`() { + val result = compile( + getSourceFile( + SharableProcessingSourceType.COMMMON, + PlatformSourceType.COMMON, + "compilation", + "basic", + "EmptySealedInterface.kt" + ) + ) + + assertCompiles(result) + assertGeneratedFileMatches("EmptySealedInterface_SealedEnum.kt", emptySealedInterfaceGenerated, result) + } +} diff --git a/processing-tests/common/src/jvmTest/kotlin/com/livefront/sealedenum/compilation/basic/OneObjectSealedClassCompilationTests.kt b/processing-tests/common/src/jvmTest/kotlin/com/livefront/sealedenum/compilation/basic/OneObjectSealedClassCompilationTests.kt new file mode 100644 index 00000000..924a5d78 --- /dev/null +++ b/processing-tests/common/src/jvmTest/kotlin/com/livefront/sealedenum/compilation/basic/OneObjectSealedClassCompilationTests.kt @@ -0,0 +1,30 @@ +package com.livefront.sealedenum.compilation.basic + +import com.livefront.sealedenum.testing.PlatformSourceType +import com.livefront.sealedenum.testing.SharableProcessingSourceType +import com.livefront.sealedenum.testing.assertCompiles +import com.livefront.sealedenum.testing.assertGeneratedFileMatches +import com.livefront.sealedenum.testing.compile +import com.livefront.sealedenum.testing.getSourceFile +import org.junit.jupiter.api.Test + +/** + * @see OneObjectSealedClassTests + */ +class OneObjectSealedClassCompilationTests { + @Test + fun `compilation generates correct code`() { + val result = compile( + getSourceFile( + SharableProcessingSourceType.COMMMON, + PlatformSourceType.COMMON, + "compilation", + "basic", + "OneObjectSealedClass.kt" + ) + ) + + assertCompiles(result) + assertGeneratedFileMatches("OneObjectSealedClass_SealedEnum.kt", oneObjectSealedClassGenerated, result) + } +} diff --git a/processing-tests/common/src/jvmTest/kotlin/com/livefront/sealedenum/compilation/basic/OneObjectSealedInterfaceCompilationTests.kt b/processing-tests/common/src/jvmTest/kotlin/com/livefront/sealedenum/compilation/basic/OneObjectSealedInterfaceCompilationTests.kt new file mode 100644 index 00000000..daee3c9f --- /dev/null +++ b/processing-tests/common/src/jvmTest/kotlin/com/livefront/sealedenum/compilation/basic/OneObjectSealedInterfaceCompilationTests.kt @@ -0,0 +1,34 @@ +package com.livefront.sealedenum.compilation.basic + +import com.livefront.sealedenum.testing.PlatformSourceType +import com.livefront.sealedenum.testing.SharableProcessingSourceType +import com.livefront.sealedenum.testing.assertCompiles +import com.livefront.sealedenum.testing.assertGeneratedFileMatches +import com.livefront.sealedenum.testing.compile +import com.livefront.sealedenum.testing.getSourceFile +import org.junit.jupiter.api.Test + +/** + * @see OneObjectSealedInterfaceTests + */ +class OneObjectSealedInterfaceCompilationTests { + @Test + fun `compilation generates correct code`() { + val result = compile( + getSourceFile( + SharableProcessingSourceType.COMMMON, + PlatformSourceType.COMMON, + "compilation", + "basic", + "OneObjectSealedInterface.kt" + ) + ) + + assertCompiles(result) + assertGeneratedFileMatches( + "OneObjectSealedInterface_SealedEnum.kt", + oneObjectSealedInterfaceGenerated, + result + ) + } +} diff --git a/processing-tests/common/src/jvmTest/kotlin/com/livefront/sealedenum/compilation/basic/TwoObjectSealedClassCompilationTests.kt b/processing-tests/common/src/jvmTest/kotlin/com/livefront/sealedenum/compilation/basic/TwoObjectSealedClassCompilationTests.kt new file mode 100644 index 00000000..dc09aac1 --- /dev/null +++ b/processing-tests/common/src/jvmTest/kotlin/com/livefront/sealedenum/compilation/basic/TwoObjectSealedClassCompilationTests.kt @@ -0,0 +1,30 @@ +package com.livefront.sealedenum.compilation.basic + +import com.livefront.sealedenum.testing.PlatformSourceType +import com.livefront.sealedenum.testing.SharableProcessingSourceType +import com.livefront.sealedenum.testing.assertCompiles +import com.livefront.sealedenum.testing.assertGeneratedFileMatches +import com.livefront.sealedenum.testing.compile +import com.livefront.sealedenum.testing.getSourceFile +import org.junit.jupiter.api.Test + +/** + * @see TwoObjectSealedClassTests + */ +class TwoObjectSealedClassCompilationTests { + @Test + fun `compilation generates correct code`() { + val result = compile( + getSourceFile( + SharableProcessingSourceType.COMMMON, + PlatformSourceType.COMMON, + "compilation", + "basic", + "TwoObjectSealedClass.kt" + ) + ) + + assertCompiles(result) + assertGeneratedFileMatches("TwoObjectSealedClass_SealedEnum.kt", twoObjectSealedClassGenerated, result) + } +} diff --git a/processing-tests/common/src/jvmTest/kotlin/com/livefront/sealedenum/compilation/basic/TwoObjectSealedInterfaceCompilationTests.kt b/processing-tests/common/src/jvmTest/kotlin/com/livefront/sealedenum/compilation/basic/TwoObjectSealedInterfaceCompilationTests.kt new file mode 100644 index 00000000..7ee34838 --- /dev/null +++ b/processing-tests/common/src/jvmTest/kotlin/com/livefront/sealedenum/compilation/basic/TwoObjectSealedInterfaceCompilationTests.kt @@ -0,0 +1,34 @@ +package com.livefront.sealedenum.compilation.basic + +import com.livefront.sealedenum.testing.PlatformSourceType +import com.livefront.sealedenum.testing.SharableProcessingSourceType +import com.livefront.sealedenum.testing.assertCompiles +import com.livefront.sealedenum.testing.assertGeneratedFileMatches +import com.livefront.sealedenum.testing.compile +import com.livefront.sealedenum.testing.getSourceFile +import org.junit.jupiter.api.Test + +/** + * @see TwoObjectSealedInterfaceTests + */ +class TwoObjectSealedInterfaceCompilationTests { + @Test + fun `compilation generates correct code`() { + val result = compile( + getSourceFile( + SharableProcessingSourceType.COMMMON, + PlatformSourceType.COMMON, + "compilation", + "basic", + "TwoObjectSealedInterface.kt" + ) + ) + + assertCompiles(result) + assertGeneratedFileMatches( + "TwoObjectSealedInterface_SealedEnum.kt", + twoObjectSealedInterfaceGenerated, + result + ) + } +} diff --git a/processing-tests/common/src/jvmTest/kotlin/com/livefront/sealedenum/compilation/generics/GenericSealedClassCompilationTests.kt b/processing-tests/common/src/jvmTest/kotlin/com/livefront/sealedenum/compilation/generics/GenericSealedClassCompilationTests.kt new file mode 100644 index 00000000..d35b0b65 --- /dev/null +++ b/processing-tests/common/src/jvmTest/kotlin/com/livefront/sealedenum/compilation/generics/GenericSealedClassCompilationTests.kt @@ -0,0 +1,94 @@ +package com.livefront.sealedenum.compilation.generics + +import com.livefront.sealedenum.testing.PlatformSourceType +import com.livefront.sealedenum.testing.SharableProcessingSourceType +import com.livefront.sealedenum.testing.assertCompiles +import com.livefront.sealedenum.testing.assertGeneratedFileMatches +import com.livefront.sealedenum.testing.compile +import com.livefront.sealedenum.testing.getSourceFile +import org.junit.jupiter.api.Test + +/** + * @see GenericSealedClassTests + */ +class GenericSealedClassCompilationTests { + @Test + fun `compilation for one type parameter generates correct code`() { + val result = compile( + getSourceFile( + SharableProcessingSourceType.COMMMON, + PlatformSourceType.COMMON, + "compilation", + "generics", + "GenericSealedClass.kt" + ) + ) + + assertCompiles(result) + assertGeneratedFileMatches( + "OneTypeParameterSealedClass_SealedEnum.kt", + oneTypeParameterSealedClassGenerated, + result + ) + } + + @Test + fun `compilation for two type parameter generates correct code`() { + val result = compile( + getSourceFile( + SharableProcessingSourceType.COMMMON, + PlatformSourceType.COMMON, + "compilation", + "generics", + "GenericSealedClass.kt" + ) + ) + + assertCompiles(result) + assertGeneratedFileMatches( + "TwoTypeParameterSealedClass_SealedEnum.kt", + twoTypeParameterSealedClassGenerated, + result + ) + } + + @Test + fun `compilation for limited type parameter generates correct code`() { + val result = compile( + getSourceFile( + SharableProcessingSourceType.COMMMON, + PlatformSourceType.COMMON, + "compilation", + "generics", + "GenericSealedClass.kt" + ) + ) + + assertCompiles(result) + assertGeneratedFileMatches( + "LimitedTypeParameterSealedClass_SealedEnum.kt", + limitedTypeParameterSealedClassGenerated, + result + ) + } + + @Test + fun `compilation for multiple bounds sealed class generates correct code`() { + val result = compile( + getSourceFile( + SharableProcessingSourceType.COMMMON, + PlatformSourceType.COMMON, + "compilation", + "generics", + "GenericSealedClass.kt" + ) + ) + + assertCompiles(result) + assertGeneratedFileMatches( + "MultipleBoundsSealedClass_SealedEnum.kt", + multipleBoundsSealedClassGenerated, + result + ) + } +} diff --git a/processing-tests/common/src/jvmTest/kotlin/com/livefront/sealedenum/compilation/generics/SealedEnumWithAbstractBaseClassesCompilationTests.kt b/processing-tests/common/src/jvmTest/kotlin/com/livefront/sealedenum/compilation/generics/SealedEnumWithAbstractBaseClassesCompilationTests.kt new file mode 100644 index 00000000..13c27d56 --- /dev/null +++ b/processing-tests/common/src/jvmTest/kotlin/com/livefront/sealedenum/compilation/generics/SealedEnumWithAbstractBaseClassesCompilationTests.kt @@ -0,0 +1,54 @@ +package com.livefront.sealedenum.compilation.generics + +import com.livefront.sealedenum.testing.PlatformSourceType +import com.livefront.sealedenum.testing.SharableProcessingSourceType +import com.livefront.sealedenum.testing.assertCompiles +import com.livefront.sealedenum.testing.assertGeneratedFileMatches +import com.livefront.sealedenum.testing.compile +import com.livefront.sealedenum.testing.getSourceFile +import org.junit.jupiter.api.Test + +/** + * @see SealedEnumWithAbstractBaseClassesTests + */ +class SealedEnumWithAbstractBaseClassesCompilationTests { + @Test + fun `compilation for invariant type generates correct code`() { + val result = compile( + getSourceFile( + SharableProcessingSourceType.COMMMON, + PlatformSourceType.COMMON, + "compilation", + "generics", + "SealedEnumWithAbstractBaseClasses.kt" + ) + ) + + assertCompiles(result) + assertGeneratedFileMatches( + "SealedEnumWithAbstractBaseClasses_SealedEnum.kt", + sealedEnumWithAbstractBaseClassesGenerated, + result + ) + } + + @Test + fun `compilation for covariant type generates correct code`() { + val result = compile( + getSourceFile( + SharableProcessingSourceType.COMMMON, + PlatformSourceType.COMMON, + "compilation", + "generics", + "SealedEnumWithAbstractBaseClasses.kt" + ) + ) + + assertCompiles(result) + assertGeneratedFileMatches( + "SealedEnumWithAbstractBaseClassesCovariantType_SealedEnum.kt", + sealedEnumWithAbstractBaseClassesCovariantTypeGenerated, + result + ) + } +} diff --git a/processing-tests/common/src/jvmTest/kotlin/com/livefront/sealedenum/compilation/generics/SealedEnumWithInterfacesCompilationTests.kt b/processing-tests/common/src/jvmTest/kotlin/com/livefront/sealedenum/compilation/generics/SealedEnumWithInterfacesCompilationTests.kt new file mode 100644 index 00000000..5cb42b87 --- /dev/null +++ b/processing-tests/common/src/jvmTest/kotlin/com/livefront/sealedenum/compilation/generics/SealedEnumWithInterfacesCompilationTests.kt @@ -0,0 +1,94 @@ +package com.livefront.sealedenum.compilation.generics + +import com.livefront.sealedenum.testing.PlatformSourceType +import com.livefront.sealedenum.testing.SharableProcessingSourceType +import com.livefront.sealedenum.testing.assertCompiles +import com.livefront.sealedenum.testing.assertGeneratedFileMatches +import com.livefront.sealedenum.testing.compile +import com.livefront.sealedenum.testing.getSourceFile +import org.junit.jupiter.api.Test + +/** + * @see SealedEnumWithInterfacesTests + */ +class SealedEnumWithInterfacesCompilationTests { + @Test + fun `compilation for empty sealed class generates correct code`() { + val result = compile( + getSourceFile( + SharableProcessingSourceType.COMMMON, + PlatformSourceType.COMMON, + "compilation", + "generics", + "SealedEnumWithInterfaces.kt" + ) + ) + + assertCompiles(result) + assertGeneratedFileMatches( + "EmptySealedClassWithInterface_SealedEnum.kt", + emptySealedClassWithInterfaceGenerated, + result + ) + } + + @Test + fun `compilation for one object sealed class generates correct code`() { + val result = compile( + getSourceFile( + SharableProcessingSourceType.COMMMON, + PlatformSourceType.COMMON, + "compilation", + "generics", + "SealedEnumWithInterfaces.kt" + ) + ) + + assertCompiles(result) + assertGeneratedFileMatches( + "OneObjectSealedClassWithInterface_SealedEnum.kt", + oneObjectSealedClassWithInterfaceGenerated, + result + ) + } + + @Test + fun `compilation for two object sealed class generates correct code`() { + val result = compile( + getSourceFile( + SharableProcessingSourceType.COMMMON, + PlatformSourceType.COMMON, + "compilation", + "generics", + "SealedEnumWithInterfaces.kt" + ) + ) + + assertCompiles(result) + assertGeneratedFileMatches( + "TwoObjectSealedClassWithGenericInterface_SealedEnum.kt", + twoObjectSealedClassWithGenericInterfaceGenerated, + result + ) + } + + @Test + fun `compilation for sealed class with getter interface generates correct code`() { + val result = compile( + getSourceFile( + SharableProcessingSourceType.COMMMON, + PlatformSourceType.COMMON, + "compilation", + "generics", + "SealedEnumWithInterfaces.kt" + ) + ) + + assertCompiles(result) + assertGeneratedFileMatches( + "SealedClassWithGetterInterface_SealedEnum.kt", + sealedClassWithGetterInterface, + result + ) + } +} diff --git a/processing-tests/common/src/jvmTest/kotlin/com/livefront/sealedenum/compilation/hierarchy/SealedClassHierarchyCompilationTests.kt b/processing-tests/common/src/jvmTest/kotlin/com/livefront/sealedenum/compilation/hierarchy/SealedClassHierarchyCompilationTests.kt new file mode 100644 index 00000000..205d18b7 --- /dev/null +++ b/processing-tests/common/src/jvmTest/kotlin/com/livefront/sealedenum/compilation/hierarchy/SealedClassHierarchyCompilationTests.kt @@ -0,0 +1,154 @@ +package com.livefront.sealedenum.compilation.hierarchy + +import com.livefront.sealedenum.testing.PlatformSourceType +import com.livefront.sealedenum.testing.SharableProcessingSourceType +import com.livefront.sealedenum.testing.assertCompiles +import com.livefront.sealedenum.testing.assertGeneratedFileMatches +import com.livefront.sealedenum.testing.compile +import com.livefront.sealedenum.testing.getSourceFile +import org.junit.jupiter.api.Test + +/** + * @see SealedClassHierarchyTests + */ +class SealedClassHierarchyCompilationTests { + @Test + fun `compilation for first hierarchy A generates correct code`() { + val result = compile( + getSourceFile( + SharableProcessingSourceType.COMMMON, + PlatformSourceType.COMMON, + "compilation", + "hierarchy", + "SealedClassHierarchy.kt" + ) + ) + + assertCompiles(result) + assertGeneratedFileMatches( + "FirstClassHierarchy.A_SealedEnum.kt", + firstClassHierarchyAGenerated, + result + ) + } + + @Test + fun `compilation for first hierarchy B generates correct code`() { + val result = compile( + getSourceFile( + SharableProcessingSourceType.COMMMON, + PlatformSourceType.COMMON, + "compilation", + "hierarchy", + "SealedClassHierarchy.kt" + ) + ) + + assertCompiles(result) + assertGeneratedFileMatches( + "FirstClassHierarchy.A.B_SealedEnum.kt", + firstClassHierarchyBGenerated, + result + ) + } + + @Test + fun `compilation for second hierarchy Z generates correct code`() { + val result = compile( + getSourceFile( + SharableProcessingSourceType.COMMMON, + PlatformSourceType.COMMON, + "compilation", + "hierarchy", + "SealedClassHierarchy.kt" + ) + ) + + assertCompiles(result) + assertGeneratedFileMatches( + "SecondClassHierarchy.Z_SealedEnum.kt", + secondClassHierarchyZGenerated, + result + ) + } + + @Test + fun `compilation for second hierarchy X generates correct code`() { + val result = compile( + getSourceFile( + SharableProcessingSourceType.COMMMON, + PlatformSourceType.COMMON, + "compilation", + "hierarchy", + "SealedClassHierarchy.kt" + ) + ) + + assertCompiles(result) + assertGeneratedFileMatches( + "SecondClassHierarchy.Z.X_SealedEnum.kt", + secondClassHierarchyZXGenerated, + result + ) + } + + @Test + fun `compilation for second hierarchy U generates correct code`() { + val result = compile( + getSourceFile( + SharableProcessingSourceType.COMMMON, + PlatformSourceType.COMMON, + "compilation", + "hierarchy", + "SealedClassHierarchy.kt" + ) + ) + + assertCompiles(result) + assertGeneratedFileMatches( + "SecondClassHierarchy.Z.X.U_SealedEnum.kt", + secondClassHierarchyZXUGenerated, + result + ) + } + + @Test + fun `compilation for second hierarchy S generates correct code`() { + val result = compile( + getSourceFile( + SharableProcessingSourceType.COMMMON, + PlatformSourceType.COMMON, + "compilation", + "hierarchy", + "SealedClassHierarchy.kt" + ) + ) + + assertCompiles(result) + assertGeneratedFileMatches( + "SecondClassHierarchy.Z.X.S_SealedEnum.kt", + secondClassHierarchyZXSGenerated, + result + ) + } + + @Test + fun `compilation for second hierarchy Q generates correct code`() { + val result = compile( + getSourceFile( + SharableProcessingSourceType.COMMMON, + PlatformSourceType.COMMON, + "compilation", + "hierarchy", + "SealedClassHierarchy.kt" + ) + ) + + assertCompiles(result) + assertGeneratedFileMatches( + "SecondClassHierarchy.Z.Q_SealedEnum.kt", + secondClassHierarchyZQGenerated, + result + ) + } +} diff --git a/processing-tests/common/src/jvmTest/kotlin/com/livefront/sealedenum/compilation/hierarchy/SealedInterfaceHierarchyCompilationTests.kt b/processing-tests/common/src/jvmTest/kotlin/com/livefront/sealedenum/compilation/hierarchy/SealedInterfaceHierarchyCompilationTests.kt new file mode 100644 index 00000000..4cdf5c19 --- /dev/null +++ b/processing-tests/common/src/jvmTest/kotlin/com/livefront/sealedenum/compilation/hierarchy/SealedInterfaceHierarchyCompilationTests.kt @@ -0,0 +1,154 @@ +package com.livefront.sealedenum.compilation.hierarchy + +import com.livefront.sealedenum.testing.PlatformSourceType +import com.livefront.sealedenum.testing.SharableProcessingSourceType +import com.livefront.sealedenum.testing.assertCompiles +import com.livefront.sealedenum.testing.assertGeneratedFileMatches +import com.livefront.sealedenum.testing.compile +import com.livefront.sealedenum.testing.getSourceFile +import org.junit.jupiter.api.Test + +/** + * @see SealedInterfaceHierarchyTests + */ +class SealedInterfaceHierarchyCompilationTests { + @Test + fun `compilation for first hierarchy A generates correct code`() { + val result = compile( + getSourceFile( + SharableProcessingSourceType.COMMMON, + PlatformSourceType.COMMON, + "compilation", + "hierarchy", + "SealedInterfaceHierarchy.kt" + ) + ) + + assertCompiles(result) + assertGeneratedFileMatches( + "FirstInterfaceHierarchy.A_SealedEnum.kt", + firstInterfaceHierarchyAGenerated, + result + ) + } + + @Test + fun `compilation for first hierarchy B generates correct code`() { + val result = compile( + getSourceFile( + SharableProcessingSourceType.COMMMON, + PlatformSourceType.COMMON, + "compilation", + "hierarchy", + "SealedInterfaceHierarchy.kt" + ) + ) + + assertCompiles(result) + assertGeneratedFileMatches( + "FirstInterfaceHierarchy.A.B_SealedEnum.kt", + firstInterfaceHierarchyBGenerated, + result + ) + } + + @Test + fun `compilation for second hierarchy A generates correct code`() { + val result = compile( + getSourceFile( + SharableProcessingSourceType.COMMMON, + PlatformSourceType.COMMON, + "compilation", + "hierarchy", + "SealedInterfaceHierarchy.kt" + ) + ) + + assertCompiles(result) + assertGeneratedFileMatches( + "SecondInterfaceHierarchy.A_SealedEnum.kt", + secondInterfaceHierarchyAGenerated, + result + ) + } + + @Test + fun `compilation for second hierarchy C generates correct code`() { + val result = compile( + getSourceFile( + SharableProcessingSourceType.COMMMON, + PlatformSourceType.COMMON, + "compilation", + "hierarchy", + "SealedInterfaceHierarchy.kt" + ) + ) + + assertCompiles(result) + assertGeneratedFileMatches( + "SecondInterfaceHierarchy.A.C_SealedEnum.kt", + secondInterfaceHierarchyACGenerated, + result + ) + } + + @Test + fun `compilation for second hierarchy F generates correct code`() { + val result = compile( + getSourceFile( + SharableProcessingSourceType.COMMMON, + PlatformSourceType.COMMON, + "compilation", + "hierarchy", + "SealedInterfaceHierarchy.kt" + ) + ) + + assertCompiles(result) + assertGeneratedFileMatches( + "SecondInterfaceHierarchy.A.C.F_SealedEnum.kt", + secondInterfaceHierarchyACFGenerated, + result + ) + } + + @Test + fun `compilation for second hierarchy H generates correct code`() { + val result = compile( + getSourceFile( + SharableProcessingSourceType.COMMMON, + PlatformSourceType.COMMON, + "compilation", + "hierarchy", + "SealedInterfaceHierarchy.kt" + ) + ) + + assertCompiles(result) + assertGeneratedFileMatches( + "SecondInterfaceHierarchy.A.C.H_SealedEnum.kt", + secondInterfaceHierarchyACHGenerated, + result + ) + } + + @Test + fun `compilation for second hierarchy J generates correct code`() { + val result = compile( + getSourceFile( + SharableProcessingSourceType.COMMMON, + PlatformSourceType.COMMON, + "compilation", + "hierarchy", + "SealedInterfaceHierarchy.kt" + ) + ) + + assertCompiles(result) + assertGeneratedFileMatches( + "SecondInterfaceHierarchy.A.J_SealedEnum.kt", + secondInterfaceHierarchyAJGenerated, + result + ) + } +} diff --git a/processing-tests/common/src/jvmTest/kotlin/com/livefront/sealedenum/compilation/location/NestedClassCompilationTests.kt b/processing-tests/common/src/jvmTest/kotlin/com/livefront/sealedenum/compilation/location/NestedClassCompilationTests.kt new file mode 100644 index 00000000..179c2d1f --- /dev/null +++ b/processing-tests/common/src/jvmTest/kotlin/com/livefront/sealedenum/compilation/location/NestedClassCompilationTests.kt @@ -0,0 +1,54 @@ +package com.livefront.sealedenum.compilation.location + +import com.livefront.sealedenum.testing.PlatformSourceType +import com.livefront.sealedenum.testing.SharableProcessingSourceType +import com.livefront.sealedenum.testing.assertCompiles +import com.livefront.sealedenum.testing.assertGeneratedFileMatches +import com.livefront.sealedenum.testing.compile +import com.livefront.sealedenum.testing.getSourceFile +import org.junit.jupiter.api.Test + +/** + * @see NestedClassTests + */ +class NestedClassCompilationTests { + @Test + fun `compilation for inside one class generates correct code`() { + val result = compile( + getSourceFile( + SharableProcessingSourceType.COMMMON, + PlatformSourceType.COMMON, + "compilation", + "location", + "NestedClass.kt" + ) + ) + + assertCompiles(result) + assertGeneratedFileMatches( + "OuterClass.InsideOneClassSealedClass_SealedEnum.kt", + insideOneClassSealedClassGenerated, + result + ) + } + + @Test + fun `compilation for inside two classes generates correct code`() { + val result = compile( + getSourceFile( + SharableProcessingSourceType.COMMMON, + PlatformSourceType.COMMON, + "compilation", + "location", + "NestedClass.kt" + ) + ) + + assertCompiles(result) + assertGeneratedFileMatches( + "FirstOuterClass.SecondOuterClass.InsideTwoClassesSealedClass_SealedEnum.kt", + insideTwoClassesSealedClassGenerated, + result + ) + } +} diff --git a/processing-tests/common/src/jvmTest/kotlin/com/livefront/sealedenum/compilation/location/OutsideSealedClassCompilationTests.kt b/processing-tests/common/src/jvmTest/kotlin/com/livefront/sealedenum/compilation/location/OutsideSealedClassCompilationTests.kt new file mode 100644 index 00000000..d68005c7 --- /dev/null +++ b/processing-tests/common/src/jvmTest/kotlin/com/livefront/sealedenum/compilation/location/OutsideSealedClassCompilationTests.kt @@ -0,0 +1,75 @@ +package com.livefront.sealedenum.compilation.location + +import com.livefront.sealedenum.testing.PlatformSourceType +import com.livefront.sealedenum.testing.SharableProcessingSourceType +import com.livefront.sealedenum.testing.assertCompiles +import com.livefront.sealedenum.testing.assertGeneratedFileMatches +import com.livefront.sealedenum.testing.compile +import com.livefront.sealedenum.testing.getSourceFile +import org.junit.jupiter.api.Test + +class OutsideSealedClassCompilationTests { + @Test + fun `compilation for alpha outside sealed class generates correct code`() { + val result = compile( + getSourceFile( + SharableProcessingSourceType.COMMMON, + PlatformSourceType.COMMON, + "compilation", + "location", + "OutsideSealedClass.kt" + ) + ) + + assertCompiles(result) + assertGeneratedFileMatches("AlphaOutsideSealedClass_SealedEnum.kt", alphaOutsideSealedClassGenerated, result) + } + + @Test + fun `compilation for beta outside sealed class generates correct code`() { + val result = compile( + getSourceFile( + SharableProcessingSourceType.COMMMON, + PlatformSourceType.COMMON, + "compilation", + "location", + "OutsideSealedClass.kt" + ) + ) + + assertCompiles(result) + assertGeneratedFileMatches("BetaOutsideSealedClass_SealedEnum.kt", betaOutsideSealedClassGenerated, result) + } + + @Test + fun `compilation for gamma outside sealed class generates correct code`() { + val result = compile( + getSourceFile( + SharableProcessingSourceType.COMMMON, + PlatformSourceType.COMMON, + "compilation", + "location", + "OutsideSealedClass.kt" + ) + ) + + assertCompiles(result) + assertGeneratedFileMatches("GammaOutsideSealedClass_SealedEnum.kt", gammaOutsideSealedClassGenerated, result) + } + + @Test + fun `compilation for delta outside sealed class generates correct code`() { + val result = compile( + getSourceFile( + SharableProcessingSourceType.COMMMON, + PlatformSourceType.COMMON, + "compilation", + "location", + "OutsideSealedClass.kt" + ) + ) + + assertCompiles(result) + assertGeneratedFileMatches("DeltaOutsideSealedClass_SealedEnum.kt", deltaOutsideSealedClassGenerated, result) + } +} diff --git a/processing-tests/common/src/jvmTest/kotlin/com/livefront/sealedenum/compilation/location/SplitAcrossFilesSealedClassCompilationTests.kt b/processing-tests/common/src/jvmTest/kotlin/com/livefront/sealedenum/compilation/location/SplitAcrossFilesSealedClassCompilationTests.kt new file mode 100644 index 00000000..9193e336 --- /dev/null +++ b/processing-tests/common/src/jvmTest/kotlin/com/livefront/sealedenum/compilation/location/SplitAcrossFilesSealedClassCompilationTests.kt @@ -0,0 +1,52 @@ +package com.livefront.sealedenum.compilation.location + +import com.livefront.sealedenum.testing.PlatformSourceType +import com.livefront.sealedenum.testing.SharableProcessingSourceType +import com.livefront.sealedenum.testing.assertCompiles +import com.livefront.sealedenum.testing.assertGeneratedFileMatches +import com.livefront.sealedenum.testing.compile +import com.livefront.sealedenum.testing.getSourceFile +import org.junit.jupiter.api.Test + +class SplitAcrossFilesSealedClassCompilationTests { + @Test + fun `compilation for objects split across files generates correct code`() { + val result = compile( + getSourceFile( + SharableProcessingSourceType.COMMMON, + PlatformSourceType.COMMON, + "compilation", + "location", + "SplitAcrossFilesSealedClass.kt" + ), + getSourceFile( + SharableProcessingSourceType.COMMMON, + PlatformSourceType.COMMON, + "compilation", + "location", + "SplitAcrossFilesSubclassA.kt" + ), + getSourceFile( + SharableProcessingSourceType.COMMMON, + PlatformSourceType.COMMON, + "compilation", + "location", + "SplitAcrossFilesSubclassB.kt" + ), + getSourceFile( + SharableProcessingSourceType.COMMMON, + PlatformSourceType.COMMON, + "compilation", + "location", + "SplitAcrossFilesSubclassC.kt" + ) + ) + + assertCompiles(result) + assertGeneratedFileMatches( + "SplitAcrossFilesSealedClass_SealedEnum.kt", + splitAcrossFilesSealedClassGenerated, + result + ) + } +} diff --git a/processing-tests/common/src/jvmTest/kotlin/com/livefront/sealedenum/compilation/traversal/TraversalOrderCompilationTests.kt b/processing-tests/common/src/jvmTest/kotlin/com/livefront/sealedenum/compilation/traversal/TraversalOrderCompilationTests.kt new file mode 100644 index 00000000..a2b9e83b --- /dev/null +++ b/processing-tests/common/src/jvmTest/kotlin/com/livefront/sealedenum/compilation/traversal/TraversalOrderCompilationTests.kt @@ -0,0 +1,30 @@ +package com.livefront.sealedenum.compilation.traversal + +import com.livefront.sealedenum.testing.PlatformSourceType +import com.livefront.sealedenum.testing.SharableProcessingSourceType +import com.livefront.sealedenum.testing.assertCompiles +import com.livefront.sealedenum.testing.assertGeneratedFileMatches +import com.livefront.sealedenum.testing.compile +import com.livefront.sealedenum.testing.getSourceFile +import org.junit.jupiter.api.Test + +/** + * @see TraversalOrderTests + */ +class TraversalOrderCompilationTests { + @Test + fun `compilation generates correct code`() { + val result = compile( + getSourceFile( + SharableProcessingSourceType.COMMMON, + PlatformSourceType.COMMON, + "compilation", + "traversal", + "TraversalOrder.kt" + ) + ) + + assertCompiles(result) + assertGeneratedFileMatches("Tree_SealedEnum.kt", treeGenerated, result) + } +} diff --git a/processing-tests/common/src/jvmTest/kotlin/com/livefront/sealedenum/compilation/usecases/EnvironmentsSealedEnumCompilationTests.kt b/processing-tests/common/src/jvmTest/kotlin/com/livefront/sealedenum/compilation/usecases/EnvironmentsSealedEnumCompilationTests.kt new file mode 100644 index 00000000..51d6e742 --- /dev/null +++ b/processing-tests/common/src/jvmTest/kotlin/com/livefront/sealedenum/compilation/usecases/EnvironmentsSealedEnumCompilationTests.kt @@ -0,0 +1,27 @@ +package com.livefront.sealedenum.compilation.usecases + +import com.livefront.sealedenum.testing.PlatformSourceType +import com.livefront.sealedenum.testing.SharableProcessingSourceType +import com.livefront.sealedenum.testing.assertCompiles +import com.livefront.sealedenum.testing.assertGeneratedFileMatches +import com.livefront.sealedenum.testing.compile +import com.livefront.sealedenum.testing.getSourceFile +import org.junit.jupiter.api.Test + +class EnvironmentsSealedEnumCompilationTests { + @Test + fun `compilation generates correct code`() { + val result = compile( + getSourceFile( + SharableProcessingSourceType.COMMMON, + PlatformSourceType.COMMON, + "compilation", + "usecases", + "EnvironmentsSealedEnum.kt" + ) + ) + + assertCompiles(result) + assertGeneratedFileMatches("Environments_SealedEnum.kt", environmentsGenerated, result) + } +} diff --git a/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/usecases/EnvironmentsSealedEnumTests.kt b/processing-tests/common/src/jvmTest/kotlin/com/livefront/sealedenum/compilation/usecases/EnvironmentsSealedEnumTests.kt similarity index 77% rename from processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/usecases/EnvironmentsSealedEnumTests.kt rename to processing-tests/common/src/jvmTest/kotlin/com/livefront/sealedenum/compilation/usecases/EnvironmentsSealedEnumTests.kt index 348c67e6..6791fb67 100644 --- a/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/usecases/EnvironmentsSealedEnumTests.kt +++ b/processing-tests/common/src/jvmTest/kotlin/com/livefront/sealedenum/compilation/usecases/EnvironmentsSealedEnumTests.kt @@ -1,9 +1,5 @@ package com.livefront.sealedenum.compilation.usecases -import com.livefront.sealedenum.testing.assertCompiles -import com.livefront.sealedenum.testing.assertGeneratedFileMatches -import com.livefront.sealedenum.testing.compile -import com.livefront.sealedenum.testing.getCommonSourceFile import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.Test @@ -64,12 +60,4 @@ class EnvironmentsSealedEnumTests { environmentManager.currentEnvironment.sealedObject ) } - - @Test - fun `compilation generates correct code`() { - val result = compile(getCommonSourceFile("compilation", "usecases", "EnvironmentsSealedEnum.kt")) - - assertCompiles(result) - assertGeneratedFileMatches("Environments_SealedEnum.kt", environmentsGenerated, result) - } } diff --git a/processing-tests/common/src/jvmTest/kotlin/com/livefront/sealedenum/compilation/usecases/FlagCompilationTests.kt b/processing-tests/common/src/jvmTest/kotlin/com/livefront/sealedenum/compilation/usecases/FlagCompilationTests.kt new file mode 100644 index 00000000..1ea64987 --- /dev/null +++ b/processing-tests/common/src/jvmTest/kotlin/com/livefront/sealedenum/compilation/usecases/FlagCompilationTests.kt @@ -0,0 +1,27 @@ +package com.livefront.sealedenum.compilation.usecases + +import com.livefront.sealedenum.testing.PlatformSourceType +import com.livefront.sealedenum.testing.SharableProcessingSourceType +import com.livefront.sealedenum.testing.assertCompiles +import com.livefront.sealedenum.testing.assertGeneratedFileMatches +import com.livefront.sealedenum.testing.compile +import com.livefront.sealedenum.testing.getSourceFile +import org.junit.jupiter.api.Test + +class FlagCompilationTests { + @Test + fun `compilation generates correct code`() { + val result = compile( + getSourceFile( + SharableProcessingSourceType.COMMMON, + PlatformSourceType.COMMON, + "compilation", + "usecases", + "Flag.kt" + ) + ) + + assertCompiles(result) + assertGeneratedFileMatches("Flag_SealedEnum.kt", flagGenerated, result) + } +} diff --git a/processing-tests/common/src/jvmTest/kotlin/com/livefront/sealedenum/compilation/usecases/MultiInterfaceFlagCompilationTests.kt b/processing-tests/common/src/jvmTest/kotlin/com/livefront/sealedenum/compilation/usecases/MultiInterfaceFlagCompilationTests.kt new file mode 100644 index 00000000..c6114ad2 --- /dev/null +++ b/processing-tests/common/src/jvmTest/kotlin/com/livefront/sealedenum/compilation/usecases/MultiInterfaceFlagCompilationTests.kt @@ -0,0 +1,27 @@ +package com.livefront.sealedenum.compilation.usecases + +import com.livefront.sealedenum.testing.PlatformSourceType +import com.livefront.sealedenum.testing.SharableProcessingSourceType +import com.livefront.sealedenum.testing.assertCompiles +import com.livefront.sealedenum.testing.assertGeneratedFileMatches +import com.livefront.sealedenum.testing.compile +import com.livefront.sealedenum.testing.getSourceFile +import org.junit.jupiter.api.Test + +class MultiInterfaceFlagCompilationTests { + @Test + fun `compilation generates correct code`() { + val result = compile( + getSourceFile( + SharableProcessingSourceType.COMMMON, + PlatformSourceType.COMMON, + "compilation", + "usecases", + "MultiInterfaceFlag.kt" + ) + ) + + assertCompiles(result) + assertGeneratedFileMatches("MultiInterfaceFlag_SealedEnum.kt", multiInterfaceFlagGenerated, result) + } +} diff --git a/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/visibility/PrivateInterfaceSealedClassTests.kt b/processing-tests/common/src/jvmTest/kotlin/com/livefront/sealedenum/compilation/visibility/PrivateInterfaceSealedClassTests.kt similarity index 80% rename from processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/visibility/PrivateInterfaceSealedClassTests.kt rename to processing-tests/common/src/jvmTest/kotlin/com/livefront/sealedenum/compilation/visibility/PrivateInterfaceSealedClassTests.kt index 2cea3166..d7f828b6 100644 --- a/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/visibility/PrivateInterfaceSealedClassTests.kt +++ b/processing-tests/common/src/jvmTest/kotlin/com/livefront/sealedenum/compilation/visibility/PrivateInterfaceSealedClassTests.kt @@ -1,9 +1,11 @@ package com.livefront.sealedenum.compilation.visibility +import com.livefront.sealedenum.testing.PlatformSourceType +import com.livefront.sealedenum.testing.SharableProcessingSourceType import com.livefront.sealedenum.testing.assertCompiles import com.livefront.sealedenum.testing.assertGeneratedFileMatches import com.livefront.sealedenum.testing.compile -import com.livefront.sealedenum.testing.getCommonSourceFile +import com.livefront.sealedenum.testing.getSourceFile import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.Test @@ -50,7 +52,13 @@ class PrivateInterfaceSealedClassTests { @Test fun `compilation generates correct code`() { val result = compile( - getCommonSourceFile("compilation", "visibility", "PrivateInterfaceSealedClass.kt") + getSourceFile( + SharableProcessingSourceType.COMMMON, + PlatformSourceType.JVM, + "compilation", + "visibility", + "PrivateInterfaceSealedClass.kt" + ) ) assertCompiles(result) diff --git a/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/visibility/ProtectedInterfaceSealedClassTests.kt b/processing-tests/common/src/jvmTest/kotlin/com/livefront/sealedenum/compilation/visibility/ProtectedInterfaceSealedClassTests.kt similarity index 87% rename from processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/visibility/ProtectedInterfaceSealedClassTests.kt rename to processing-tests/common/src/jvmTest/kotlin/com/livefront/sealedenum/compilation/visibility/ProtectedInterfaceSealedClassTests.kt index 3ead0bcc..ac9cf6b5 100644 --- a/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/visibility/ProtectedInterfaceSealedClassTests.kt +++ b/processing-tests/common/src/jvmTest/kotlin/com/livefront/sealedenum/compilation/visibility/ProtectedInterfaceSealedClassTests.kt @@ -1,9 +1,11 @@ package com.livefront.sealedenum.compilation.visibility +import com.livefront.sealedenum.testing.PlatformSourceType +import com.livefront.sealedenum.testing.SharableProcessingSourceType import com.livefront.sealedenum.testing.assertCompiles import com.livefront.sealedenum.testing.assertGeneratedFileMatches import com.livefront.sealedenum.testing.compile -import com.livefront.sealedenum.testing.getCommonSourceFile +import com.livefront.sealedenum.testing.getSourceFile import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.Assertions.assertTrue import org.junit.jupiter.api.Test @@ -69,7 +71,13 @@ class ProtectedInterfaceSealedClassTests { @DisabledIf("com.livefront.sealedenum.testing.ProcessingTypeGetter#isKSP") fun `compilation generates correct code`() { val result = compile( - getCommonSourceFile("compilation", "visibility", "ProtectedInterfaceSealedClass.kt") + getSourceFile( + SharableProcessingSourceType.COMMMON, + PlatformSourceType.JVM, + "compilation", + "visibility", + "ProtectedInterfaceSealedClass.kt" + ) ) assertCompiles(result) diff --git a/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/visibility/ProtectedInterfaceSealedClassWithDifferentPackageBaseClassTests.kt b/processing-tests/common/src/jvmTest/kotlin/com/livefront/sealedenum/compilation/visibility/ProtectedInterfaceSealedClassWithDifferentPackageBaseClassTests.kt similarity index 90% rename from processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/visibility/ProtectedInterfaceSealedClassWithDifferentPackageBaseClassTests.kt rename to processing-tests/common/src/jvmTest/kotlin/com/livefront/sealedenum/compilation/visibility/ProtectedInterfaceSealedClassWithDifferentPackageBaseClassTests.kt index 7a57a0f9..b113e93d 100644 --- a/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/visibility/ProtectedInterfaceSealedClassWithDifferentPackageBaseClassTests.kt +++ b/processing-tests/common/src/jvmTest/kotlin/com/livefront/sealedenum/compilation/visibility/ProtectedInterfaceSealedClassWithDifferentPackageBaseClassTests.kt @@ -1,9 +1,11 @@ package com.livefront.sealedenum.compilation.visibility +import com.livefront.sealedenum.testing.PlatformSourceType +import com.livefront.sealedenum.testing.SharableProcessingSourceType import com.livefront.sealedenum.testing.assertCompiles import com.livefront.sealedenum.testing.assertGeneratedFileMatches import com.livefront.sealedenum.testing.compile -import com.livefront.sealedenum.testing.getCommonSourceFile +import com.livefront.sealedenum.testing.getSourceFile import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.Test @@ -52,7 +54,9 @@ class ProtectedInterfaceSealedClassWithDifferentPackageBaseClassTests { @Test fun `compilation generates correct code`() { val result = compile( - getCommonSourceFile( + getSourceFile( + SharableProcessingSourceType.COMMMON, + PlatformSourceType.JVM, "compilation", "visibility", "ProtectedInterfaceSealedClassWithDifferentPackageBaseClass.kt" diff --git a/processing-tests/common/src/jvmTest/kotlin/com/livefront/sealedenum/compilation/visibility/VisibilitySealedClassCompilationTests.kt b/processing-tests/common/src/jvmTest/kotlin/com/livefront/sealedenum/compilation/visibility/VisibilitySealedClassCompilationTests.kt new file mode 100644 index 00000000..a93a67e7 --- /dev/null +++ b/processing-tests/common/src/jvmTest/kotlin/com/livefront/sealedenum/compilation/visibility/VisibilitySealedClassCompilationTests.kt @@ -0,0 +1,87 @@ +package com.livefront.sealedenum.compilation.visibility + +import com.livefront.sealedenum.testing.PlatformSourceType +import com.livefront.sealedenum.testing.SharableProcessingSourceType +import com.livefront.sealedenum.testing.assertCompiles +import com.livefront.sealedenum.testing.assertGeneratedFileMatches +import com.livefront.sealedenum.testing.compile +import com.livefront.sealedenum.testing.getSourceFile +import org.junit.jupiter.api.Test + +class VisibilitySealedClassCompilationTests { + @Test + fun `internal objects compilation generates correct code`() { + val result = compile( + getSourceFile( + SharableProcessingSourceType.COMMMON, + PlatformSourceType.COMMON, + "compilation", + "visibility", + "VisibilitySealedClass.kt" + ) + ) + + assertCompiles(result) + assertGeneratedFileMatches( + "InternalObjectsSealedClass_SealedEnum.kt", + internalObjectsSealedClassGenerated, + result + ) + } + + @Test + fun `internal sealed class generates correct code`() { + val result = compile( + getSourceFile( + SharableProcessingSourceType.COMMMON, + PlatformSourceType.COMMON, + "compilation", + "visibility", + "VisibilitySealedClass.kt" + ) + ) + + assertCompiles(result) + assertGeneratedFileMatches("InternalSealedClass_SealedEnum.kt", internalSealedClassGenerated, result) + } + + @Test + fun `internal companion compilation generates correct code`() { + val result = compile( + getSourceFile( + SharableProcessingSourceType.COMMMON, + PlatformSourceType.COMMON, + "compilation", + "visibility", + "VisibilitySealedClass.kt" + ) + ) + + assertCompiles(result) + assertGeneratedFileMatches( + "InternalCompanionSealedClass_SealedEnum.kt", + internalCompanionSealedClassGenerated, + result + ) + } + + @Test + fun `internal sealed class and companion compilation generates correct code`() { + val result = compile( + getSourceFile( + SharableProcessingSourceType.COMMMON, + PlatformSourceType.COMMON, + "compilation", + "visibility", + "VisibilitySealedClass.kt" + ) + ) + + assertCompiles(result) + assertGeneratedFileMatches( + "InternalSealedAndCompanionSealedClass_SealedEnum.kt", + internalSealedAndCompanionSealedClassGenerated, + result + ) + } +} diff --git a/processing-tests/common/src/jvmTest/kotlin/com/livefront/sealedenum/compilation/visibility/VisibilitySealedClassVisibilityTests.kt b/processing-tests/common/src/jvmTest/kotlin/com/livefront/sealedenum/compilation/visibility/VisibilitySealedClassVisibilityTests.kt new file mode 100644 index 00000000..0b1d2b8c --- /dev/null +++ b/processing-tests/common/src/jvmTest/kotlin/com/livefront/sealedenum/compilation/visibility/VisibilitySealedClassVisibilityTests.kt @@ -0,0 +1,39 @@ +package com.livefront.sealedenum.compilation.visibility + +import org.junit.jupiter.api.Assertions.assertEquals +import org.junit.jupiter.api.Test +import kotlin.reflect.KVisibility + +class VisibilitySealedClassVisibilityTests { + @Test + fun `internal objects sealed enum class has correct visibility`() { + assertEquals( + KVisibility.PUBLIC, + InternalObjectsSealedClassSealedEnum::class.visibility + ) + } + + @Test + fun `internal sealed class sealed enum class has correct visibility`() { + kotlin.test.assertEquals( + KVisibility.INTERNAL, + InternalSealedClassSealedEnum::class.visibility + ) + } + + @Test + fun `internal companion object sealed enum class has correct visibility`() { + kotlin.test.assertEquals( + KVisibility.PUBLIC, + InternalCompanionSealedClassSealedEnum::class.visibility + ) + } + + @Test + fun `internal sealed class and companion object sealed enum class has correct visibility`() { + kotlin.test.assertEquals( + KVisibility.INTERNAL, + InternalSealedAndCompanionSealedClassSealedEnum::class.visibility + ) + } +} diff --git a/processing-tests/common/test/kotlin/com/livefront/sealedenum/errors/AnnotationErrors.kt b/processing-tests/common/src/jvmTest/kotlin/com/livefront/sealedenum/errors/AnnotationErrors.kt similarity index 100% rename from processing-tests/common/test/kotlin/com/livefront/sealedenum/errors/AnnotationErrors.kt rename to processing-tests/common/src/jvmTest/kotlin/com/livefront/sealedenum/errors/AnnotationErrors.kt diff --git a/processing-tests/common/test/kotlin/com/livefront/sealedenum/errors/NonObjectErrors.kt b/processing-tests/common/src/jvmTest/kotlin/com/livefront/sealedenum/errors/NonObjectErrors.kt similarity index 100% rename from processing-tests/common/test/kotlin/com/livefront/sealedenum/errors/NonObjectErrors.kt rename to processing-tests/common/src/jvmTest/kotlin/com/livefront/sealedenum/errors/NonObjectErrors.kt diff --git a/processing-tests/common/test/kotlin/com/livefront/sealedenum/testing/CompilationAssertions.kt b/processing-tests/common/src/jvmTest/kotlin/com/livefront/sealedenum/testing/CompilationAssertions.kt similarity index 100% rename from processing-tests/common/test/kotlin/com/livefront/sealedenum/testing/CompilationAssertions.kt rename to processing-tests/common/src/jvmTest/kotlin/com/livefront/sealedenum/testing/CompilationAssertions.kt diff --git a/processing-tests/common/src/jvmTest/kotlin/com/livefront/sealedenum/testing/PathsUtils.kt b/processing-tests/common/src/jvmTest/kotlin/com/livefront/sealedenum/testing/PathsUtils.kt new file mode 100644 index 00000000..c9311cb6 --- /dev/null +++ b/processing-tests/common/src/jvmTest/kotlin/com/livefront/sealedenum/testing/PathsUtils.kt @@ -0,0 +1,72 @@ +package com.livefront.sealedenum.testing + +import com.tschuchort.compiletesting.SourceFile +import java.nio.file.Paths + +/** + * Returns the [SourceFile] for the given [paths] calculated relative to [com.livefront.sealedenum] in the test + * folder, subject to the given [SharableProcessingSourceType] and [PlatformSourceType] + */ +internal fun getSourceFile( + sharableProcessingSourceType: SharableProcessingSourceType, + platformSourceType: PlatformSourceType, + vararg paths: String +): SourceFile { + val relativePaths = when (sharableProcessingSourceType) { + SharableProcessingSourceType.COMMMON -> arrayOf("..", "common") + SharableProcessingSourceType.KSP_COMMON -> arrayOf("..", "ksp-common-tests") + SharableProcessingSourceType.UNIQUE -> emptyArray() + } + arrayOf( + "src", + when (platformSourceType) { + PlatformSourceType.COMMON -> "commonMain" + PlatformSourceType.JVM -> "jvmMain" + }, + if (paths.last().endsWith(".java")) "java" else "kotlin", + "com", + "livefront", + "sealedenum", + ) + paths + + return SourceFile.fromPath( + Paths.get( + relativePaths.first(), + *relativePaths.drop(1).toTypedArray() + ).toFile() + ) +} + +/** + * The location of test code, since some is shared between different processing types. + */ +enum class SharableProcessingSourceType { + /** + * Source files common to all types of processing + */ + COMMMON, + + /** + * Source files common to ksp processing + */ + KSP_COMMON, + + /** + * Source files unique to the current tests + */ + UNIQUE +} + +/** + * The platform for the test code. + */ +enum class PlatformSourceType { + /** + * Test common source files + */ + COMMON, + + /** + * Test jvm source files + */ + JVM +} diff --git a/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/basic/EmptySealedClassTests.kt b/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/basic/EmptySealedClassTests.kt deleted file mode 100644 index ae5513ed..00000000 --- a/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/basic/EmptySealedClassTests.kt +++ /dev/null @@ -1,36 +0,0 @@ -package com.livefront.sealedenum.compilation.basic - -import com.livefront.sealedenum.testing.assertCompiles -import com.livefront.sealedenum.testing.assertGeneratedFileMatches -import com.livefront.sealedenum.testing.compile -import com.livefront.sealedenum.testing.getCommonSourceFile -import org.junit.jupiter.api.Assertions.assertEquals -import org.junit.jupiter.api.Test - -class EmptySealedClassTests { - @Test - fun `empty sealed class`() { - assertEquals(emptyList(), EmptySealedClass.values) - } - - @Test - fun `empty enum for sealed class`() { - assertEquals( - EmptySealedClass.values.map(EmptySealedClass::enum), - enumValues().toList() - ) - } - - @Test - fun `correct enum class`() { - assertEquals(EmptySealedClassEnum::class, EmptySealedClass.sealedEnum.enumClass) - } - - @Test - fun `compilation generates correct code`() { - val result = compile(getCommonSourceFile("compilation", "basic", "EmptySealedClass.kt")) - - assertCompiles(result) - assertGeneratedFileMatches("EmptySealedClass_SealedEnum.kt", emptySealedClassGenerated, result) - } -} diff --git a/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/basic/EmptySealedInterfaceTests.kt b/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/basic/EmptySealedInterfaceTests.kt deleted file mode 100644 index fb603c69..00000000 --- a/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/basic/EmptySealedInterfaceTests.kt +++ /dev/null @@ -1,36 +0,0 @@ -package com.livefront.sealedenum.compilation.basic - -import com.livefront.sealedenum.testing.assertCompiles -import com.livefront.sealedenum.testing.assertGeneratedFileMatches -import com.livefront.sealedenum.testing.compile -import com.livefront.sealedenum.testing.getCommonSourceFile -import org.junit.jupiter.api.Assertions.assertEquals -import org.junit.jupiter.api.Test - -class EmptySealedInterfaceTests { - @Test - fun `empty sealed interface`() { - assertEquals(emptyList(), EmptySealedInterface.values) - } - - @Test - fun `empty enum for sealed interface`() { - assertEquals( - EmptySealedInterface.values.map(EmptySealedInterface::enum), - enumValues().toList() - ) - } - - @Test - fun `correct enum class`() { - assertEquals(EmptySealedInterfaceEnum::class, EmptySealedInterface.sealedEnum.enumClass) - } - - @Test - fun `compilation generates correct code`() { - val result = compile(getCommonSourceFile("compilation", "basic", "EmptySealedInterface.kt")) - - assertCompiles(result) - assertGeneratedFileMatches("EmptySealedInterface_SealedEnum.kt", emptySealedInterfaceGenerated, result) - } -} diff --git a/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/basic/OneObjectSealedClassTests.kt b/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/basic/OneObjectSealedClassTests.kt deleted file mode 100644 index d4baf3ec..00000000 --- a/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/basic/OneObjectSealedClassTests.kt +++ /dev/null @@ -1,44 +0,0 @@ -package com.livefront.sealedenum.compilation.basic - -import com.livefront.sealedenum.testing.assertCompiles -import com.livefront.sealedenum.testing.assertGeneratedFileMatches -import com.livefront.sealedenum.testing.compile -import com.livefront.sealedenum.testing.getCommonSourceFile -import org.junit.jupiter.api.Assertions.assertEquals -import org.junit.jupiter.api.Test - -class OneObjectSealedClassTests { - @Test - fun `one object sealed class`() { - assertEquals(listOf(OneObjectSealedClass.FirstObject), OneObjectSealedClass.values) - } - - @Test - fun `one enum for sealed class`() { - assertEquals( - listOf(OneObjectSealedClassEnum.OneObjectSealedClass_FirstObject), - enumValues().toList() - ) - } - - @Test - fun `one enum for sealed class with mapping`() { - assertEquals( - OneObjectSealedClass.values.map(OneObjectSealedClass::enum), - enumValues().toList() - ) - } - - @Test - fun `correct enum class`() { - assertEquals(OneObjectSealedClassEnum::class, OneObjectSealedClass.sealedEnum.enumClass) - } - - @Test - fun `compilation generates correct code`() { - val result = compile(getCommonSourceFile("compilation", "basic", "OneObjectSealedClass.kt")) - - assertCompiles(result) - assertGeneratedFileMatches("OneObjectSealedClass_SealedEnum.kt", oneObjectSealedClassGenerated, result) - } -} diff --git a/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/basic/OneObjectSealedInterfaceTests.kt b/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/basic/OneObjectSealedInterfaceTests.kt deleted file mode 100644 index 6cb9d3ad..00000000 --- a/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/basic/OneObjectSealedInterfaceTests.kt +++ /dev/null @@ -1,48 +0,0 @@ -package com.livefront.sealedenum.compilation.basic - -import com.livefront.sealedenum.testing.assertCompiles -import com.livefront.sealedenum.testing.assertGeneratedFileMatches -import com.livefront.sealedenum.testing.compile -import com.livefront.sealedenum.testing.getCommonSourceFile -import org.junit.jupiter.api.Assertions.assertEquals -import org.junit.jupiter.api.Test - -class OneObjectSealedInterfaceTests { - @Test - fun `one object sealed interface`() { - assertEquals(listOf(OneObjectSealedInterface.FirstObject), OneObjectSealedInterface.values) - } - - @Test - fun `one enum for sealed interface`() { - assertEquals( - listOf(OneObjectSealedInterfaceEnum.OneObjectSealedInterface_FirstObject), - enumValues().toList() - ) - } - - @Test - fun `one enum for sealed interface with mapping`() { - assertEquals( - OneObjectSealedInterface.values.map(OneObjectSealedInterface::enum), - enumValues().toList() - ) - } - - @Test - fun `correct enum class`() { - assertEquals(OneObjectSealedInterfaceEnum::class, OneObjectSealedInterface.sealedEnum.enumClass) - } - - @Test - fun `compilation generates correct code`() { - val result = compile(getCommonSourceFile("compilation", "basic", "OneObjectSealedInterface.kt")) - - assertCompiles(result) - assertGeneratedFileMatches( - "OneObjectSealedInterface_SealedEnum.kt", - oneObjectSealedInterfaceGenerated, - result - ) - } -} diff --git a/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/generics/GenericSealedClassTests.kt b/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/generics/GenericSealedClassTests.kt deleted file mode 100644 index 99789c84..00000000 --- a/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/generics/GenericSealedClassTests.kt +++ /dev/null @@ -1,103 +0,0 @@ -package com.livefront.sealedenum.compilation.generics - -import com.livefront.sealedenum.testing.assertCompiles -import com.livefront.sealedenum.testing.assertGeneratedFileMatches -import com.livefront.sealedenum.testing.compile -import com.livefront.sealedenum.testing.getCommonSourceFile -import org.junit.jupiter.api.Assertions.assertEquals -import org.junit.jupiter.api.Test - -class GenericSealedClassTests { - - @Test - fun `one type parameter sealed class`() { - assertEquals( - listOf( - OneTypeParameterSealedClass.FirstObject, - OneTypeParameterSealedClass.SecondObject, - OneTypeParameterSealedClass.ThirdObject - ), - OneTypeParameterSealedClass.values - ) - } - - @Test - fun `compilation for one type parameter generates correct code`() { - val result = compile(getCommonSourceFile("compilation", "generics", "GenericSealedClass.kt")) - - assertCompiles(result) - assertGeneratedFileMatches( - "OneTypeParameterSealedClass_SealedEnum.kt", - oneTypeParameterSealedClassGenerated, - result - ) - } - - @Test - fun `two type parameter sealed class`() { - assertEquals( - listOf( - TwoTypeParameterSealedClass.FirstObject, - TwoTypeParameterSealedClass.SecondObject - ), - TwoTypeParameterSealedClass.values - ) - } - - @Test - fun `compilation for two type parameter generates correct code`() { - val result = compile(getCommonSourceFile("compilation", "generics", "GenericSealedClass.kt")) - - assertCompiles(result) - assertGeneratedFileMatches( - "TwoTypeParameterSealedClass_SealedEnum.kt", - twoTypeParameterSealedClassGenerated, - result - ) - } - - @Test - fun `limited type parameter sealed class`() { - assertEquals( - listOf( - LimitedTypeParameterSealedClass.FirstObject, - LimitedTypeParameterSealedClass.SecondObject - ), - LimitedTypeParameterSealedClass.values - ) - } - - @Test - fun `compilation for limited type parameter generates correct code`() { - val result = compile(getCommonSourceFile("compilation", "generics", "GenericSealedClass.kt")) - - assertCompiles(result) - assertGeneratedFileMatches( - "LimitedTypeParameterSealedClass_SealedEnum.kt", - limitedTypeParameterSealedClassGenerated, - result - ) - } - - @Test - fun `multiple bounds sealed class`() { - assertEquals( - listOf( - MultipleBoundsSealedClass.FirstObject - ), - MultipleBoundsSealedClass.values - ) - } - - @Test - fun `compilation for multiple bounds sealed class generates correct code`() { - val result = compile(getCommonSourceFile("compilation", "generics", "GenericSealedClass.kt")) - - assertCompiles(result) - assertGeneratedFileMatches( - "MultipleBoundsSealedClass_SealedEnum.kt", - multipleBoundsSealedClassGenerated, - result - ) - } -} diff --git a/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/generics/SealedEnumWithAbstractBaseClassesTests.kt b/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/generics/SealedEnumWithAbstractBaseClassesTests.kt deleted file mode 100644 index dee8cb8d..00000000 --- a/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/generics/SealedEnumWithAbstractBaseClassesTests.kt +++ /dev/null @@ -1,108 +0,0 @@ -package com.livefront.sealedenum.compilation.generics - -import com.livefront.sealedenum.testing.assertCompiles -import com.livefront.sealedenum.testing.assertGeneratedFileMatches -import com.livefront.sealedenum.testing.compile -import com.livefront.sealedenum.testing.getCommonSourceFile -import org.junit.jupiter.api.Assertions.assertEquals -import org.junit.jupiter.api.Assertions.assertTrue -import org.junit.jupiter.api.Test -import kotlin.reflect.KTypeProjection -import kotlin.reflect.full.createType -import kotlin.reflect.full.isSubtypeOf - -class SealedEnumWithAbstractBaseClassesTests { - @Test - fun `enum implements correct interfaces with type arguments`() { - assertTrue( - SealedEnumWithAbstractBaseClassesEnum::class.createType().isSubtypeOf( - BaseClassInterface1::class.createType( - arguments = listOf( - KTypeProjection.invariant( - BaseClassInterface1::class.createType( - arguments = listOf( - KTypeProjection.invariant(Any::class.createType(nullable = true)) - ) - ) - ) - ) - ) - ) - ) - - assertTrue( - SealedEnumWithAbstractBaseClassesEnum::class.createType().isSubtypeOf( - BaseClassInterface2::class.createType( - arguments = listOf( - KTypeProjection.invariant(String::class.createType()) - ) - ) - ) - ) - - // Check for compilation - val emptyValues1: Array>> = SealedEnumWithAbstractBaseClassesEnum.values() - val emptyValues2: Array> = SealedEnumWithAbstractBaseClassesEnum.values() - - assertEquals( - emptyList>(), - emptyValues1.toList() - ) - - assertEquals( - emptyList>(), - emptyValues2.toList() - ) - } - - @Test - fun `compilation for invariant type generates correct code`() { - val result = compile(getCommonSourceFile("compilation", "generics", "SealedEnumWithAbstractBaseClasses.kt")) - - assertCompiles(result) - assertGeneratedFileMatches( - "SealedEnumWithAbstractBaseClasses_SealedEnum.kt", - sealedEnumWithAbstractBaseClassesGenerated, - result - ) - } - - @Test - fun `covariant type enum implements correct interfaces with type arguments`() { - assertTrue( - SealedEnumWithAbstractBaseClassesCovariantTypeEnum::class.createType().isSubtypeOf( - BaseClassInterface3::class.createType( - arguments = listOf( - KTypeProjection.covariant( - BaseClassInterface3::class.createType( - arguments = listOf( - KTypeProjection.covariant(Any::class.createType(nullable = true)) - ) - ) - ) - ) - ) - ) - ) - - val emptyValues: Array>> = - SealedEnumWithAbstractBaseClassesCovariantTypeEnum.values() - - assertEquals( - emptyList>>(), - emptyValues.toList() - ) - } - - @Test - fun `compilation for covariant type generates correct code`() { - val result = compile(getCommonSourceFile("compilation", "generics", "SealedEnumWithAbstractBaseClasses.kt")) - - assertCompiles(result) - assertGeneratedFileMatches( - "SealedEnumWithAbstractBaseClassesCovariantType_SealedEnum.kt", - sealedEnumWithAbstractBaseClassesCovariantTypeGenerated, - result - ) - } -} diff --git a/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/generics/SealedEnumWithInterfacesTests.kt b/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/generics/SealedEnumWithInterfacesTests.kt deleted file mode 100644 index aaf9920d..00000000 --- a/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/generics/SealedEnumWithInterfacesTests.kt +++ /dev/null @@ -1,201 +0,0 @@ -package com.livefront.sealedenum.compilation.generics - -import com.livefront.sealedenum.SealedEnum -import com.livefront.sealedenum.testing.assertCompiles -import com.livefront.sealedenum.testing.assertGeneratedFileMatches -import com.livefront.sealedenum.testing.compile -import com.livefront.sealedenum.testing.getCommonSourceFile -import org.junit.jupiter.api.Assertions.assertEquals -import org.junit.jupiter.api.Assertions.assertFalse -import org.junit.jupiter.api.Assertions.assertTrue -import org.junit.jupiter.api.Test -import kotlin.reflect.KTypeProjection -import kotlin.reflect.full.createType -import kotlin.reflect.full.isSubclassOf -import kotlin.reflect.full.isSubtypeOf - -class SealedEnumWithInterfacesTests { - - @Test - fun `empty sealed enum implements interface`() { - assertTrue( - EmptySealedClassWithInterfaceSealedEnum::class.createType().isSubtypeOf( - SealedEnum::class.createType( - arguments = listOf( - KTypeProjection.invariant(EmptySealedClassWithInterface::class.createType()) - ) - ) - ) - ) - - // Check for compilation - val emptyValues: List = EmptySealedClassWithInterface.values - - assertEquals( - emptyList(), - emptyValues - ) - } - - @Test - fun `empty enum implements interface`() { - assertTrue(EmptySealedClassWithInterfaceEnum::class.isSubclassOf(TestInterface::class)) - - // Check for compilation - val emptyValues: Array = EmptySealedClassWithInterfaceEnum.values() - - assertEquals( - emptyList(), - emptyValues.toList() - ) - } - - @Test - fun `compilation for empty sealed class generates correct code`() { - val result = compile(getCommonSourceFile("compilation", "generics", "SealedEnumWithInterfaces.kt")) - - assertCompiles(result) - assertGeneratedFileMatches( - "EmptySealedClassWithInterface_SealedEnum.kt", - emptySealedClassWithInterfaceGenerated, - result - ) - } - - @Test - fun `single object sealed enum implements interface`() { - assertTrue( - OneObjectSealedClassWithInterfaceSealedEnum::class.createType().isSubtypeOf( - SealedEnum::class.createType( - arguments = listOf( - KTypeProjection.invariant(OneObjectSealedClassWithInterface::class.createType()) - ) - ) - ) - ) - - // Check for compilation - val oneObjectValues: List = OneObjectSealedClassWithInterface.values - - assertEquals( - listOf(OneObjectSealedClassWithInterface.FirstObject), - oneObjectValues - ) - } - - @Test - fun `single object enum implements interface`() { - assertTrue(OneObjectSealedClassWithInterfaceEnum::class.isSubclassOf(TestInterface::class)) - - val oneObjectValues: Array = OneObjectSealedClassWithInterfaceEnum.values() - - assertEquals( - listOf(OneObjectSealedClassWithInterfaceEnum.OneObjectSealedClassWithInterface_FirstObject), - oneObjectValues.toList() - ) - } - - @Test - fun `compilation for one object sealed class generates correct code`() { - val result = compile(getCommonSourceFile("compilation", "generics", "SealedEnumWithInterfaces.kt")) - - assertCompiles(result) - assertGeneratedFileMatches( - "OneObjectSealedClassWithInterface_SealedEnum.kt", - oneObjectSealedClassWithInterfaceGenerated, - result - ) - } - - @Test - fun `two object sealed enum implements generic interface`() { - assertTrue( - TwoObjectSealedClassWithGenericInterfaceSealedEnum::class.createType().isSubtypeOf( - SealedEnum::class.createType( - arguments = listOf( - KTypeProjection.invariant( - TwoObjectSealedClassWithGenericInterface::class.createType( - arguments = listOf( - KTypeProjection.invariant(TestInterface::class.createType()) - ) - ) - ) - ) - ) - ) - ) - - // Check for compilation - val twoObjectValues: List> = - TwoObjectSealedClassWithGenericInterface.values - - assertEquals( - listOf( - TwoObjectSealedClassWithGenericInterface.FirstObject, - TwoObjectSealedClassWithGenericInterface.SecondObject - ), - twoObjectValues - ) - } - - @Test - fun `two object enum implements generic interface`() { - assertTrue( - TwoObjectSealedClassWithGenericInterfaceEnum::class.createType().isSubtypeOf( - TestGenericInterface::class.createType( - arguments = listOf( - KTypeProjection.invariant(TestInterface::class.createType()) - ) - ) - ) - ) - - val twoObjectValues: Array> = - TwoObjectSealedClassWithGenericInterfaceEnum.values() - - assertEquals( - listOf( - TwoObjectSealedClassWithGenericInterfaceEnum.TwoObjectSealedClassWithGenericInterface_FirstObject, - TwoObjectSealedClassWithGenericInterfaceEnum.TwoObjectSealedClassWithGenericInterface_SecondObject - ), - twoObjectValues.toList() - ) - } - - @Test - fun `compilation for two object sealed class generates correct code`() { - val result = compile(getCommonSourceFile("compilation", "generics", "SealedEnumWithInterfaces.kt")) - - assertCompiles(result) - assertGeneratedFileMatches( - "TwoObjectSealedClassWithGenericInterface_SealedEnum.kt", - twoObjectSealedClassWithGenericInterfaceGenerated, - result - ) - } - - @Test - fun `enum delegates to sealed class`() { - val sealedObject = SealedClassWithGetterInterface.FirstObject - - val enumValue = SealedClassWithGetterInterfaceEnum.SealedClassWithGetterInterface_FirstObject - - assertFalse(sealedObject.hasGetBeenCalled) - - assertEquals("First", enumValue.get()) - - assertTrue(sealedObject.hasGetBeenCalled) - } - - @Test - fun `compilation for sealed class with getter interface generates correct code`() { - val result = compile(getCommonSourceFile("compilation", "generics", "SealedEnumWithInterfaces.kt")) - - assertCompiles(result) - assertGeneratedFileMatches( - "SealedClassWithGetterInterface_SealedEnum.kt", - sealedClassWithGetterInterface, - result - ) - } -} diff --git a/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/hierarchy/SealedClassHierarchyTests.kt b/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/hierarchy/SealedClassHierarchyTests.kt deleted file mode 100644 index 46dadb49..00000000 --- a/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/hierarchy/SealedClassHierarchyTests.kt +++ /dev/null @@ -1,238 +0,0 @@ -package com.livefront.sealedenum.compilation.hierarchy - -import com.livefront.sealedenum.testing.assertCompiles -import com.livefront.sealedenum.testing.assertGeneratedFileMatches -import com.livefront.sealedenum.testing.compile -import com.livefront.sealedenum.testing.getCommonSourceFile -import org.junit.jupiter.api.Assertions.assertEquals -import org.junit.jupiter.api.Test - -class SealedClassHierarchyTests { - - @Test - fun `first hierarchy class A values`() { - assertEquals(listOf(FirstClassHierarchy.A.B.C), FirstClassHierarchy.A.values) - } - - @Test - fun `first hierarchy class A ordinal of A_B_C`() { - assertEquals(0, (FirstClassHierarchy.A.B.C as FirstClassHierarchy.A).ordinal) - } - - @Test - fun `compilation for first hierarchy A generates correct code`() { - val result = compile(getCommonSourceFile("compilation", "hierarchy", "SealedClassHierarchy.kt")) - - assertCompiles(result) - assertGeneratedFileMatches( - "FirstClassHierarchy.A_SealedEnum.kt", - firstClassHierarchyAGenerated, - result - ) - } - - @Test - fun `first hierarchy class B values`() { - assertEquals(listOf(FirstClassHierarchy.A.B.C), FirstClassHierarchy.A.B.values) - } - - @Test - fun `first hierarchy class B ordinal`() { - assertEquals(0, (FirstClassHierarchy.A.B.C as FirstClassHierarchy.A.B).ordinal) - } - - @Test - fun `compilation for first hierarchy B generates correct code`() { - val result = compile(getCommonSourceFile("compilation", "hierarchy", "SealedClassHierarchy.kt")) - - assertCompiles(result) - assertGeneratedFileMatches( - "FirstClassHierarchy.A.B_SealedEnum.kt", - firstClassHierarchyBGenerated, - result - ) - } - - @Test - fun `second hierarchy class Z values`() { - assertEquals( - listOf( - SecondClassHierarchy.Z.Y, - SecondClassHierarchy.Z.X.W, - SecondClassHierarchy.Z.X.V, - SecondClassHierarchy.Z.X.U.T, - SecondClassHierarchy.Z.X.S.R, - SecondClassHierarchy.Z.Q.P, - SecondClassHierarchy.Z.O - ), - SecondClassHierarchy.Z.values - ) - } - - @Test - fun `second hierarchy class Z ordinal of Z_Y`() { - assertEquals(0, (SecondClassHierarchy.Z.Y as SecondClassHierarchy.Z).ordinal) - } - - @Test - fun `second hierarchy class Z ordinal of Z_X_W`() { - assertEquals(1, (SecondClassHierarchy.Z.X.W as SecondClassHierarchy.Z).ordinal) - } - - @Test - fun `second hierarchy class Z ordinal of Z_X_V`() { - assertEquals(2, (SecondClassHierarchy.Z.X.V as SecondClassHierarchy.Z).ordinal) - } - - @Test - fun `second hierarchy class Z ordinal of Z_X_U_T`() { - assertEquals(3, (SecondClassHierarchy.Z.X.U.T as SecondClassHierarchy.Z).ordinal) - } - - @Test - fun `second hierarchy class Z ordinal of Z_X_S_R`() { - assertEquals(4, (SecondClassHierarchy.Z.X.S.R as SecondClassHierarchy.Z).ordinal) - } - - @Test - fun `second hierarchy class Z ordinal of Z_Q_P`() { - assertEquals(5, (SecondClassHierarchy.Z.Q.P as SecondClassHierarchy.Z).ordinal) - } - - @Test - fun `second hierarchy class Z ordinal of Z_O`() { - assertEquals(6, (SecondClassHierarchy.Z.O as SecondClassHierarchy.Z).ordinal) - } - - @Test - fun `compilation for second hierarchy Z generates correct code`() { - val result = compile(getCommonSourceFile("compilation", "hierarchy", "SealedClassHierarchy.kt")) - - assertCompiles(result) - assertGeneratedFileMatches( - "SecondClassHierarchy.Z_SealedEnum.kt", - secondClassHierarchyZGenerated, - result - ) - } - - @Test - fun `second hierarchy class X values`() { - assertEquals( - listOf( - SecondClassHierarchy.Z.X.W, - SecondClassHierarchy.Z.X.V, - SecondClassHierarchy.Z.X.U.T, - SecondClassHierarchy.Z.X.S.R - ), - SecondClassHierarchy.Z.X.values - ) - } - - @Test - fun `second hierarchy class X ordinal of Z_X_W`() { - assertEquals(0, (SecondClassHierarchy.Z.X.W as SecondClassHierarchy.Z.X).ordinal) - } - - @Test - fun `second hierarchy class X ordinal of Z_X_V`() { - assertEquals(1, (SecondClassHierarchy.Z.X.V as SecondClassHierarchy.Z.X).ordinal) - } - - @Test - fun `second hierarchy class X ordinal of Z_X_U_T`() { - assertEquals(2, (SecondClassHierarchy.Z.X.U.T as SecondClassHierarchy.Z.X).ordinal) - } - - @Test - fun `second hierarchy class X ordinal of Z_X_S_R`() { - assertEquals(3, (SecondClassHierarchy.Z.X.S.R as SecondClassHierarchy.Z.X).ordinal) - } - - @Test - fun `compilation for second hierarchy X generates correct code`() { - val result = compile(getCommonSourceFile("compilation", "hierarchy", "SealedClassHierarchy.kt")) - - assertCompiles(result) - assertGeneratedFileMatches( - "SecondClassHierarchy.Z.X_SealedEnum.kt", - secondClassHierarchyZXGenerated, - result - ) - } - - @Test - fun `second hierarchy class U values`() { - assertEquals( - listOf(SecondClassHierarchy.Z.X.U.T), - SecondClassHierarchy.Z.X.U.values - ) - } - - @Test - fun `second hierarchy class U ordinal of Z_X_U_T`() { - assertEquals(0, (SecondClassHierarchy.Z.X.U.T as SecondClassHierarchy.Z.X.U).ordinal) - } - - @Test - fun `compilation for second hierarchy U generates correct code`() { - val result = compile(getCommonSourceFile("compilation", "hierarchy", "SealedClassHierarchy.kt")) - - assertCompiles(result) - assertGeneratedFileMatches( - "SecondClassHierarchy.Z.X.U_SealedEnum.kt", - secondClassHierarchyZXUGenerated, - result - ) - } - - @Test - fun `second hierarchy class S values`() { - assertEquals( - listOf(SecondClassHierarchy.Z.X.S.R), - SecondClassHierarchy.Z.X.S.values - ) - } - - @Test - fun `second hierarchy class S ordinal of Z_X_S_R`() { - assertEquals(0, (SecondClassHierarchy.Z.X.S.R as SecondClassHierarchy.Z.X.S).ordinal) - } - - @Test - fun `compilation for second hierarchy S generates correct code`() { - val result = compile(getCommonSourceFile("compilation", "hierarchy", "SealedClassHierarchy.kt")) - - assertCompiles(result) - assertGeneratedFileMatches( - "SecondClassHierarchy.Z.X.S_SealedEnum.kt", - secondClassHierarchyZXSGenerated, - result - ) - } - - @Test - fun `second hierarchy class Q values`() { - assertEquals( - listOf(SecondClassHierarchy.Z.Q.P), - SecondClassHierarchy.Z.Q.values - ) - } - - @Test - fun `second hierarchy class Q ordinal of Z_Q_P`() { - assertEquals(0, (SecondClassHierarchy.Z.Q.P as SecondClassHierarchy.Z.Q).ordinal) - } - - @Test - fun `compilation for second hierarchy Q generates correct code`() { - val result = compile(getCommonSourceFile("compilation", "hierarchy", "SealedClassHierarchy.kt")) - - assertCompiles(result) - assertGeneratedFileMatches( - "SecondClassHierarchy.Z.Q_SealedEnum.kt", - secondClassHierarchyZQGenerated, - result - ) - } -} diff --git a/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/hierarchy/SealedInterfaceHierarchyTests.kt b/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/hierarchy/SealedInterfaceHierarchyTests.kt deleted file mode 100644 index 3a80dce6..00000000 --- a/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/hierarchy/SealedInterfaceHierarchyTests.kt +++ /dev/null @@ -1,238 +0,0 @@ -package com.livefront.sealedenum.compilation.hierarchy - -import com.livefront.sealedenum.testing.assertCompiles -import com.livefront.sealedenum.testing.assertGeneratedFileMatches -import com.livefront.sealedenum.testing.compile -import com.livefront.sealedenum.testing.getCommonSourceFile -import org.junit.jupiter.api.Assertions.assertEquals -import org.junit.jupiter.api.Test - -class SealedInterfaceHierarchyTests { - - @Test - fun `first hierarchy class A values`() { - assertEquals(listOf(FirstInterfaceHierarchy.A.B.C), FirstInterfaceHierarchy.A.values) - } - - @Test - fun `first hierarchy class A ordinal of A_B_C`() { - assertEquals(0, (FirstInterfaceHierarchy.A.B.C as FirstInterfaceHierarchy.A).ordinal) - } - - @Test - fun `compilation for first hierarchy A generates correct code`() { - val result = compile(getCommonSourceFile("compilation", "hierarchy", "SealedInterfaceHierarchy.kt")) - - assertCompiles(result) - assertGeneratedFileMatches( - "FirstInterfaceHierarchy.A_SealedEnum.kt", - firstInterfaceHierarchyAGenerated, - result - ) - } - - @Test - fun `first hierarchy class B values`() { - assertEquals(listOf(FirstInterfaceHierarchy.A.B.C), FirstInterfaceHierarchy.A.B.values) - } - - @Test - fun `first hierarchy class B ordinal`() { - assertEquals(0, (FirstInterfaceHierarchy.A.B.C as FirstInterfaceHierarchy.A.B).ordinal) - } - - @Test - fun `compilation for first hierarchy B generates correct code`() { - val result = compile(getCommonSourceFile("compilation", "hierarchy", "SealedInterfaceHierarchy.kt")) - - assertCompiles(result) - assertGeneratedFileMatches( - "FirstInterfaceHierarchy.A.B_SealedEnum.kt", - firstInterfaceHierarchyBGenerated, - result - ) - } - - @Test - fun `second hierarchy class A values`() { - assertEquals( - listOf( - SecondInterfaceHierarchy.A.B, - SecondInterfaceHierarchy.A.C.D, - SecondInterfaceHierarchy.A.C.E, - SecondInterfaceHierarchy.A.C.F.G, - SecondInterfaceHierarchy.A.C.H.I, - SecondInterfaceHierarchy.A.J.K, - SecondInterfaceHierarchy.A.L - ), - SecondInterfaceHierarchy.A.values - ) - } - - @Test - fun `second hierarchy class A ordinal of A_B`() { - assertEquals(0, (SecondInterfaceHierarchy.A.B as SecondInterfaceHierarchy.A).ordinal) - } - - @Test - fun `second hierarchy class A ordinal of A_C_D`() { - assertEquals(1, (SecondInterfaceHierarchy.A.C.D as SecondInterfaceHierarchy.A).ordinal) - } - - @Test - fun `second hierarchy class A ordinal of A_C_E`() { - assertEquals(2, (SecondInterfaceHierarchy.A.C.E as SecondInterfaceHierarchy.A).ordinal) - } - - @Test - fun `second hierarchy class A ordinal of A_C_F_G`() { - assertEquals(3, (SecondInterfaceHierarchy.A.C.F.G as SecondInterfaceHierarchy.A).ordinal) - } - - @Test - fun `second hierarchy class A ordinal of A_C_H_I`() { - assertEquals(4, (SecondInterfaceHierarchy.A.C.H.I as SecondInterfaceHierarchy.A).ordinal) - } - - @Test - fun `second hierarchy class A ordinal of A_J_K`() { - assertEquals(5, (SecondInterfaceHierarchy.A.J.K as SecondInterfaceHierarchy.A).ordinal) - } - - @Test - fun `second hierarchy class A ordinal of A_L`() { - assertEquals(6, (SecondInterfaceHierarchy.A.L as SecondInterfaceHierarchy.A).ordinal) - } - - @Test - fun `compilation for second hierarchy A generates correct code`() { - val result = compile(getCommonSourceFile("compilation", "hierarchy", "SealedInterfaceHierarchy.kt")) - - assertCompiles(result) - assertGeneratedFileMatches( - "SecondInterfaceHierarchy.A_SealedEnum.kt", - secondInterfaceHierarchyAGenerated, - result - ) - } - - @Test - fun `second hierarchy class C values`() { - assertEquals( - listOf( - SecondInterfaceHierarchy.A.C.D, - SecondInterfaceHierarchy.A.C.E, - SecondInterfaceHierarchy.A.C.F.G, - SecondInterfaceHierarchy.A.C.H.I - ), - SecondInterfaceHierarchy.A.C.values - ) - } - - @Test - fun `second hierarchy class C ordinal of A_C_D`() { - assertEquals(0, (SecondInterfaceHierarchy.A.C.D as SecondInterfaceHierarchy.A.C).ordinal) - } - - @Test - fun `second hierarchy class C ordinal of A_C_E`() { - assertEquals(1, (SecondInterfaceHierarchy.A.C.E as SecondInterfaceHierarchy.A.C).ordinal) - } - - @Test - fun `second hierarchy class C ordinal of A_C_F_G`() { - assertEquals(2, (SecondInterfaceHierarchy.A.C.F.G as SecondInterfaceHierarchy.A.C).ordinal) - } - - @Test - fun `second hierarchy class C ordinal of A_C_H_I`() { - assertEquals(3, (SecondInterfaceHierarchy.A.C.H.I as SecondInterfaceHierarchy.A.C).ordinal) - } - - @Test - fun `compilation for second hierarchy C generates correct code`() { - val result = compile(getCommonSourceFile("compilation", "hierarchy", "SealedInterfaceHierarchy.kt")) - - assertCompiles(result) - assertGeneratedFileMatches( - "SecondInterfaceHierarchy.A.C_SealedEnum.kt", - secondInterfaceHierarchyACGenerated, - result - ) - } - - @Test - fun `second hierarchy class F values`() { - assertEquals( - listOf(SecondInterfaceHierarchy.A.C.F.G), - SecondInterfaceHierarchy.A.C.F.values - ) - } - - @Test - fun `second hierarchy class F ordinal of A_L`() { - assertEquals(0, (SecondInterfaceHierarchy.A.C.F.G as SecondInterfaceHierarchy.A.C.F).ordinal) - } - - @Test - fun `compilation for second hierarchy F generates correct code`() { - val result = compile(getCommonSourceFile("compilation", "hierarchy", "SealedInterfaceHierarchy.kt")) - - assertCompiles(result) - assertGeneratedFileMatches( - "SecondInterfaceHierarchy.A.C.F_SealedEnum.kt", - secondInterfaceHierarchyACFGenerated, - result - ) - } - - @Test - fun `second hierarchy class H values`() { - assertEquals( - listOf(SecondInterfaceHierarchy.A.C.H.I), - SecondInterfaceHierarchy.A.C.H.values - ) - } - - @Test - fun `second hierarchy class H ordinal of A_C_H_I`() { - assertEquals(0, (SecondInterfaceHierarchy.A.C.H.I as SecondInterfaceHierarchy.A.C.H).ordinal) - } - - @Test - fun `compilation for second hierarchy H generates correct code`() { - val result = compile(getCommonSourceFile("compilation", "hierarchy", "SealedInterfaceHierarchy.kt")) - - assertCompiles(result) - assertGeneratedFileMatches( - "SecondInterfaceHierarchy.A.C.H_SealedEnum.kt", - secondInterfaceHierarchyACHGenerated, - result - ) - } - - @Test - fun `second hierarchy class J values`() { - assertEquals( - listOf(SecondInterfaceHierarchy.A.J.K), - SecondInterfaceHierarchy.A.J.values - ) - } - - @Test - fun `second hierarchy class J ordinal of A_J_K`() { - assertEquals(0, (SecondInterfaceHierarchy.A.J.K as SecondInterfaceHierarchy.A.J).ordinal) - } - - @Test - fun `compilation for second hierarchy J generates correct code`() { - val result = compile(getCommonSourceFile("compilation", "hierarchy", "SealedInterfaceHierarchy.kt")) - - assertCompiles(result) - assertGeneratedFileMatches( - "SecondInterfaceHierarchy.A.J_SealedEnum.kt", - secondInterfaceHierarchyAJGenerated, - result - ) - } -} diff --git a/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/location/NestedClassTests.kt b/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/location/NestedClassTests.kt deleted file mode 100644 index c147761a..00000000 --- a/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/location/NestedClassTests.kt +++ /dev/null @@ -1,57 +0,0 @@ -package com.livefront.sealedenum.compilation.location - -import com.livefront.sealedenum.testing.assertCompiles -import com.livefront.sealedenum.testing.assertGeneratedFileMatches -import com.livefront.sealedenum.testing.compile -import com.livefront.sealedenum.testing.getCommonSourceFile -import org.junit.jupiter.api.Assertions.assertEquals -import org.junit.jupiter.api.Test - -class NestedClassTests { - - @Test - fun `inside one class`() { - assertEquals( - listOf( - OuterClass.InsideOneClassSealedClass.FirstObject, - OuterClass.InsideOneClassSealedClass.SecondObject - ), - OuterClass.InsideOneClassSealedClass.values - ) - } - - @Test - fun `compilation for inside one class generates correct code`() { - val result = compile(getCommonSourceFile("compilation", "location", "NestedClass.kt")) - - assertCompiles(result) - assertGeneratedFileMatches( - "OuterClass.InsideOneClassSealedClass_SealedEnum.kt", - insideOneClassSealedClassGenerated, - result - ) - } - - @Test - fun `inside two classes`() { - assertEquals( - listOf( - FirstOuterClass.SecondOuterClass.InsideTwoClassesSealedClass.FirstObject, - FirstOuterClass.SecondOuterClass.InsideTwoClassesSealedClass.SecondObject - ), - FirstOuterClass.SecondOuterClass.InsideTwoClassesSealedClass.values - ) - } - - @Test - fun `compilation for inside two classes generates correct code`() { - val result = compile(getCommonSourceFile("compilation", "location", "NestedClass.kt")) - - assertCompiles(result) - assertGeneratedFileMatches( - "FirstOuterClass.SecondOuterClass.InsideTwoClassesSealedClass_SealedEnum.kt", - insideTwoClassesSealedClassGenerated, - result - ) - } -} diff --git a/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/location/SplitAcrossFilesSealedClassTests.kt b/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/location/SplitAcrossFilesSealedClassTests.kt deleted file mode 100644 index bcf57e0d..00000000 --- a/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/location/SplitAcrossFilesSealedClassTests.kt +++ /dev/null @@ -1,48 +0,0 @@ -package com.livefront.sealedenum.compilation.location - -import com.livefront.sealedenum.testing.assertCompiles -import com.livefront.sealedenum.testing.assertGeneratedFileMatches -import com.livefront.sealedenum.testing.compile -import com.livefront.sealedenum.testing.getCommonSourceFile -import org.junit.jupiter.api.Assertions.assertEquals -import org.junit.jupiter.api.Test - -class SplitAcrossFilesSealedClassTests { - - @Test - fun `object split across files`() { - assertEquals( - listOf( - SplitAcrossFilesSubclassA, - SplitAcrossFilesSubclassB, - SplitAcrossFilesSubclassC - ), - SplitAcrossFilesSealedClass.values - ) - } - - @Test - fun `enum for objects split across files`() { - assertEquals( - SplitAcrossFilesSealedClass.values.map(SplitAcrossFilesSealedClass::enum), - enumValues().toList() - ) - } - - @Test - fun `compilation for objects split across files generates correct code`() { - val result = compile( - getCommonSourceFile("compilation", "location", "SplitAcrossFilesSealedClass.kt"), - getCommonSourceFile("compilation", "location", "SplitAcrossFilesSubclassA.kt"), - getCommonSourceFile("compilation", "location", "SplitAcrossFilesSubclassB.kt"), - getCommonSourceFile("compilation", "location", "SplitAcrossFilesSubclassC.kt") - ) - - assertCompiles(result) - assertGeneratedFileMatches( - "SplitAcrossFilesSealedClass_SealedEnum.kt", - splitAcrossFilesSealedClassGenerated, - result - ) - } -} diff --git a/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/location/SplitAcrossFilesSubclassA.kt b/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/location/SplitAcrossFilesSubclassA.kt deleted file mode 100644 index d42ef1bd..00000000 --- a/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/location/SplitAcrossFilesSubclassA.kt +++ /dev/null @@ -1,3 +0,0 @@ -package com.livefront.sealedenum.compilation.location - -object SplitAcrossFilesSubclassA : SplitAcrossFilesSealedClass() diff --git a/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/location/SplitAcrossFilesSubclassB.kt b/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/location/SplitAcrossFilesSubclassB.kt deleted file mode 100644 index 7453c7cb..00000000 --- a/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/location/SplitAcrossFilesSubclassB.kt +++ /dev/null @@ -1,3 +0,0 @@ -package com.livefront.sealedenum.compilation.location - -object SplitAcrossFilesSubclassB : SplitAcrossFilesSealedClass() diff --git a/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/location/SplitAcrossFilesSubclassC.kt b/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/location/SplitAcrossFilesSubclassC.kt deleted file mode 100644 index 5233abd5..00000000 --- a/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/location/SplitAcrossFilesSubclassC.kt +++ /dev/null @@ -1,3 +0,0 @@ -package com.livefront.sealedenum.compilation.location - -object SplitAcrossFilesSubclassC : SplitAcrossFilesSealedClass() diff --git a/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/usecases/FlagTests.kt b/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/usecases/FlagTests.kt deleted file mode 100644 index 0cc707c5..00000000 --- a/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/usecases/FlagTests.kt +++ /dev/null @@ -1,50 +0,0 @@ -package com.livefront.sealedenum.compilation.usecases - -import com.livefront.sealedenum.testing.assertCompiles -import com.livefront.sealedenum.testing.assertGeneratedFileMatches -import com.livefront.sealedenum.testing.compile -import com.livefront.sealedenum.testing.getCommonSourceFile -import org.junit.jupiter.api.Assertions.assertEquals -import org.junit.jupiter.api.Test - -class FlagTests { - @Test - fun `two objects sealed class`() { - assertEquals( - listOf(Flag.FirstFlag, Flag.SecondFlag), - FlagSealedEnum.values - ) - } - - @Test - fun `two enums for sealed class`() { - assertEquals( - listOf( - FlagEnum.Flag_FirstFlag, - FlagEnum.Flag_SecondFlag - ), - enumValues().toList() - ) - } - - @Test - fun `two enums for sealed class with mapping`() { - assertEquals( - Flag.values.map(Flag::enum), - enumValues().toList() - ) - } - - @Test - fun `correct enum class`() { - assertEquals(FlagEnum::class, FlagSealedEnum.enumClass) - } - - @Test - fun `compilation generates correct code`() { - val result = compile(getCommonSourceFile("compilation", "usecases", "Flag.kt")) - - assertCompiles(result) - assertGeneratedFileMatches("Flag_SealedEnum.kt", flagGenerated, result) - } -} diff --git a/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/visibility/VisibilitySealedClassTests.kt b/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/visibility/VisibilitySealedClassTests.kt deleted file mode 100644 index 8c8d9cd8..00000000 --- a/processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/visibility/VisibilitySealedClassTests.kt +++ /dev/null @@ -1,251 +0,0 @@ -package com.livefront.sealedenum.compilation.visibility - -import com.livefront.sealedenum.SealedEnum -import com.livefront.sealedenum.testing.assertCompiles -import com.livefront.sealedenum.testing.assertGeneratedFileMatches -import com.livefront.sealedenum.testing.compile -import com.livefront.sealedenum.testing.getCommonSourceFile -import org.junit.jupiter.api.Assertions.assertEquals -import org.junit.jupiter.api.Nested -import org.junit.jupiter.api.Test -import kotlin.reflect.KVisibility - -/** - * Verifies that generated [SealedEnum] implementations, extension properties and methods have valid visibilities. - */ -class VisibilitySealedClassTests { - - @Nested - inner class InternalObjects { - - @Test - fun `sealed enum class has correct visibility`() { - assertEquals( - KVisibility.PUBLIC, - InternalObjectsSealedClassSealedEnum::class.visibility - ) - } - - @Test - fun `internal objects have correct values`() { - assertEquals( - listOf( - InternalObjectsSealedClass.FirstObject, - InternalObjectsSealedClass.SecondObject, - InternalObjectsSealedClass.InnerSealedClass.ThirdObject - ), - InternalObjectsSealedClass.values - ) - } - - @Test - fun `enums values are correct`() { - assertEquals( - listOf( - InternalObjectsSealedClassEnum.InternalObjectsSealedClass_FirstObject, - InternalObjectsSealedClassEnum.InternalObjectsSealedClass_SecondObject, - InternalObjectsSealedClassEnum.InternalObjectsSealedClass_InnerSealedClass_ThirdObject - ), - enumValues().toList() - ) - } - - @Test - fun `enums values are correct with mapping`() { - assertEquals( - InternalObjectsSealedClass.values.map(InternalObjectsSealedClass::enum), - enumValues().toList() - ) - } - - @Test - fun `correct enum class`() { - assertEquals(InternalObjectsSealedClassEnum::class, InternalObjectsSealedClass.sealedEnum.enumClass) - } - - @Test - fun `compilation generates correct code`() { - val result = compile(getCommonSourceFile("compilation", "visibility", "VisibilitySealedClass.kt")) - - assertCompiles(result) - assertGeneratedFileMatches( - "InternalObjectsSealedClass_SealedEnum.kt", - internalObjectsSealedClassGenerated, - result - ) - } - } - - @Nested - inner class Internal { - - @Test - fun `sealed enum class has correct visibility`() { - assertEquals( - KVisibility.INTERNAL, - InternalSealedClassSealedEnum::class.visibility - ) - } - - @Test - fun `internal objects have correct values`() { - assertEquals( - listOf(InternalSealedClass.FirstObject, InternalSealedClass.SecondObject), - InternalSealedClass.values - ) - } - - @Test - fun `enums values are correct`() { - assertEquals( - listOf( - InternalSealedClassEnum.InternalSealedClass_FirstObject, - InternalSealedClassEnum.InternalSealedClass_SecondObject - ), - enumValues().toList() - ) - } - - @Test - fun `enums values are correct with mapping`() { - assertEquals( - InternalSealedClass.values.map(InternalSealedClass::enum), - enumValues().toList() - ) - } - - @Test - fun `correct enum class`() { - assertEquals(InternalSealedClassEnum::class, InternalSealedClass.sealedEnum.enumClass) - } - - @Test - fun `compilation generates correct code`() { - val result = compile(getCommonSourceFile("compilation", "visibility", "VisibilitySealedClass.kt")) - - assertCompiles(result) - assertGeneratedFileMatches("InternalSealedClass_SealedEnum.kt", internalSealedClassGenerated, result) - } - } - - @Nested - inner class InternalCompanion { - - @Test - fun `sealed enum class has correct visibility`() { - assertEquals( - KVisibility.PUBLIC, - InternalCompanionSealedClassSealedEnum::class.visibility - ) - } - - @Test - fun `internal objects have correct values`() { - assertEquals( - listOf(InternalCompanionSealedClass.FirstObject, InternalCompanionSealedClass.SecondObject), - InternalCompanionSealedClass.values - ) - } - - @Test - fun `enums values are correct`() { - assertEquals( - listOf( - InternalCompanionSealedClassEnum.InternalCompanionSealedClass_FirstObject, - InternalCompanionSealedClassEnum.InternalCompanionSealedClass_SecondObject - ), - enumValues().toList() - ) - } - - @Test - fun `enums values are correct with mapping`() { - assertEquals( - InternalCompanionSealedClass.values.map(InternalCompanionSealedClass::enum), - enumValues().toList() - ) - } - - @Test - fun `correct enum class`() { - assertEquals( - InternalCompanionSealedClassEnum::class, - InternalCompanionSealedClass.sealedEnum.enumClass - ) - } - - @Test - fun `compilation generates correct code`() { - val result = compile(getCommonSourceFile("compilation", "visibility", "VisibilitySealedClass.kt")) - - assertCompiles(result) - assertGeneratedFileMatches( - "InternalCompanionSealedClass_SealedEnum.kt", - internalCompanionSealedClassGenerated, - result - ) - } - } - - @Nested - inner class InternalSealedAndCompanion { - - @Test - fun `sealed enum class has correct visibility`() { - assertEquals( - KVisibility.INTERNAL, - InternalSealedAndCompanionSealedClassSealedEnum::class.visibility - ) - } - - @Test - fun `internal objects have correct values`() { - assertEquals( - listOf( - InternalSealedAndCompanionSealedClass.FirstObject, - InternalSealedAndCompanionSealedClass.SecondObject - ), - InternalSealedAndCompanionSealedClass.values - ) - } - - @Test - fun `enums values are correct`() { - assertEquals( - listOf( - InternalSealedAndCompanionSealedClassEnum.InternalSealedAndCompanionSealedClass_FirstObject, - InternalSealedAndCompanionSealedClassEnum.InternalSealedAndCompanionSealedClass_SecondObject - ), - enumValues().toList() - ) - } - - @Test - fun `enums values are correct with mapping`() { - assertEquals( - InternalSealedAndCompanionSealedClass.values.map(InternalSealedAndCompanionSealedClass::enum), - enumValues().toList() - ) - } - - @Test - fun `correct enum class`() { - assertEquals( - InternalSealedAndCompanionSealedClassEnum::class, - InternalSealedAndCompanionSealedClass.sealedEnum.enumClass - ) - } - - @Test - fun `compilation generates correct code`() { - val result = compile(getCommonSourceFile("compilation", "visibility", "VisibilitySealedClass.kt")) - - assertCompiles(result) - assertGeneratedFileMatches( - "InternalSealedAndCompanionSealedClass_SealedEnum.kt", - internalSealedAndCompanionSealedClassGenerated, - result - ) - } - } -} diff --git a/processing-tests/common/test/kotlin/com/livefront/sealedenum/testing/PathsUtils.kt b/processing-tests/common/test/kotlin/com/livefront/sealedenum/testing/PathsUtils.kt deleted file mode 100644 index 8a16681f..00000000 --- a/processing-tests/common/test/kotlin/com/livefront/sealedenum/testing/PathsUtils.kt +++ /dev/null @@ -1,37 +0,0 @@ -package com.livefront.sealedenum.testing - -import com.tschuchort.compiletesting.SourceFile -import java.nio.file.Paths - -/** - * Returns the common [SourceFile] for the given [paths] calculated relative to [com.livefront.sealedenum] in the test - * folder. - */ -internal fun getCommonSourceFile(vararg paths: String): SourceFile = SourceFile.fromPath( - Paths.get( - "..", - "common", - "test", - if (paths.last().endsWith(".java")) "java" else "kotlin", - "com", - "livefront", - "sealedenum", - *paths - ).toFile() -) - -/** - * Returns the unique [SourceFile] for the given [paths] calculated relative to [com.livefront.sealedenum] in the test - * folder. - */ -internal fun getSourceFile(vararg paths: String): SourceFile = SourceFile.fromPath( - Paths.get( - "src", - "test", - if (paths.last().endsWith(".java")) "java" else "kotlin", - "com", - "livefront", - "sealedenum", - *paths - ).toFile() -) diff --git a/processing-tests/common/test/kotlin/com/livefront/sealedenum/testing/ProcessingType.kt b/processing-tests/common/test/kotlin/com/livefront/sealedenum/testing/ProcessingType.kt deleted file mode 100644 index 59917d24..00000000 --- a/processing-tests/common/test/kotlin/com/livefront/sealedenum/testing/ProcessingType.kt +++ /dev/null @@ -1,18 +0,0 @@ -package com.livefront.sealedenum.testing - -import com.livefront.sealedenum.GenSealedEnum - -sealed class ProcessingType { - - object AnnotationProcessing : ProcessingType() - - object KotlinSymbolProcessing : ProcessingType() - - @GenSealedEnum(generateEnum = true) - companion object -} - -object ProcessingTypeGetter { - @JvmStatic - fun isKSP(): Boolean = ProcessingType.currentType is ProcessingType.KotlinSymbolProcessing -} diff --git a/processing-tests/ksp-common-tests/README.md b/processing-tests/ksp-common-tests/README.md new file mode 100644 index 00000000..59cf90a4 --- /dev/null +++ b/processing-tests/ksp-common-tests/README.md @@ -0,0 +1,7 @@ +# ksp-java-tests + +Tests that verify the KSP processor's Java-specific functionality. + +This module uses shared `commonMain`, `jvmMain`, `commonTest` and `jvmTest` code from [common/src](../common/src). + +This module exists because we want to apply `ksp` only to `commonMain` code, and we can't do that while also applying `ksp` to `jvmMain` code. diff --git a/processing-tests/ksp-common-tests/build.gradle.kts b/processing-tests/ksp-common-tests/build.gradle.kts new file mode 100644 index 00000000..c9b9069f --- /dev/null +++ b/processing-tests/ksp-common-tests/build.gradle.kts @@ -0,0 +1,69 @@ +plugins { + id("com.livefront.sealedenum.kotlin") + id("com.livefront.sealedenum.detekt") + alias(libs.plugins.ksp) +} + +/** + * Swap to `true` to allow debugging other tests that share code + */ +val disableForSharedCode = false + +kotlin { + jvm() + + js(BOTH) { + browser() + nodejs() + } + + macosX64() + iosArm32(); iosArm64(); iosX64() + watchosArm32(); watchosArm64(); watchosX86(); watchosX64() + + linuxArm64(); linuxX64() + mingwX86(); mingwX64() + + sourceSets { + val commonMain by getting { + dependencies { + implementation(projects.runtime) + project.dependencies.add("kspCommonMainMetadata", projects.ksp) + } + if (!disableForSharedCode) { + kotlin.srcDir("$rootDir/processing-tests/common/src/commonMain") + } + kotlin.srcDir("$buildDir/generated/ksp/metadata/commonMain/kotlin") + } + + val commonTest by getting { + dependencies { + implementation(kotlin("reflect")) + implementation(kotlin("test")) + } + if (!disableForSharedCode) { + kotlin.srcDir("$rootDir/processing-tests/common/src/commonTest") + } + } + } +} + +tasks { + withType>().all { + if (name != "kspCommonMainKotlinMetadata") { + dependsOn("kspCommonMainKotlinMetadata") + } + } + val detektMetadataMain by getting { + dependsOn("kspCommonMainKotlinMetadata") + } +} + +detekt { + source = files( + "src/commonMain/kotlin", + "src/commonTest/kotlin", + "$rootDir/processing-tests/common/src/commonMain/kotlin", + "$rootDir/processing-tests/common/src/commonTest/kotlin", + ) +} diff --git a/processing-tests/ksp-tests/src/test/kotlin/com/livefront/sealedenum/compilation/ksp/NestedObjectsWithSameName.kt b/processing-tests/ksp-common-tests/src/commonMain/kotlin/com/livefront/sealedenum/compilation/ksp/NestedObjectsWithSameName.kt similarity index 95% rename from processing-tests/ksp-tests/src/test/kotlin/com/livefront/sealedenum/compilation/ksp/NestedObjectsWithSameName.kt rename to processing-tests/ksp-common-tests/src/commonMain/kotlin/com/livefront/sealedenum/compilation/ksp/NestedObjectsWithSameName.kt index 586c9c3e..34966f9d 100644 --- a/processing-tests/ksp-tests/src/test/kotlin/com/livefront/sealedenum/compilation/ksp/NestedObjectsWithSameName.kt +++ b/processing-tests/ksp-common-tests/src/commonMain/kotlin/com/livefront/sealedenum/compilation/ksp/NestedObjectsWithSameName.kt @@ -1,20 +1,19 @@ package com.livefront.sealedenum.compilation.ksp import com.livefront.sealedenum.GenSealedEnum -import org.intellij.lang.annotations.Language @Suppress("UtilityClassWithPublicConstructor") -class NestedObjectsWithSameName { - companion object { - sealed class EmptySealedClass { +public class NestedObjectsWithSameName { + public companion object { + public sealed class EmptySealedClass { @GenSealedEnum(generateEnum = true) - companion object + public companion object } } } -@Language("kotlin") -val nestedObjectsWithSameNameEmptySealedClassGenerated = """ +@Suppress("MaxLineLength") +public val nestedObjectsWithSameNameEmptySealedClassGenerated: String = """ package com.livefront.sealedenum.compilation.ksp import com.livefront.sealedenum.EnumForSealedEnumProvider diff --git a/processing-tests/ksp-tests/src/test/kotlin/com/livefront/sealedenum/compilation/ksp/NestedObjectsWithSameNameTests.kt b/processing-tests/ksp-common-tests/src/commonTest/kotlin/com/livefront/sealedenum/compilation/ksp/NestedObjectsWithSameNameTests.kt similarity index 61% rename from processing-tests/ksp-tests/src/test/kotlin/com/livefront/sealedenum/compilation/ksp/NestedObjectsWithSameNameTests.kt rename to processing-tests/ksp-common-tests/src/commonTest/kotlin/com/livefront/sealedenum/compilation/ksp/NestedObjectsWithSameNameTests.kt index bbf5adff..6b8c603c 100644 --- a/processing-tests/ksp-tests/src/test/kotlin/com/livefront/sealedenum/compilation/ksp/NestedObjectsWithSameNameTests.kt +++ b/processing-tests/ksp-common-tests/src/commonTest/kotlin/com/livefront/sealedenum/compilation/ksp/NestedObjectsWithSameNameTests.kt @@ -1,11 +1,7 @@ package com.livefront.sealedenum.compilation.ksp -import com.livefront.sealedenum.testing.assertCompiles -import com.livefront.sealedenum.testing.assertGeneratedFileMatches -import com.livefront.sealedenum.testing.compile -import com.livefront.sealedenum.testing.getSourceFile -import org.junit.jupiter.api.Assertions.assertEquals -import org.junit.jupiter.api.Test +import kotlin.test.Test +import kotlin.test.assertEquals /** * Verifies that a sealed class in a companion object (or more precisely, an annotation that appears on a nested object @@ -19,7 +15,7 @@ import org.junit.jupiter.api.Test */ class NestedObjectsWithSameNameTests { @Test - fun `empty sealed class`() { + fun empty_sealed_class() { assertEquals( emptyList(), NestedObjectsWithSameName.Companion.EmptySealedClass.values @@ -27,7 +23,7 @@ class NestedObjectsWithSameNameTests { } @Test - fun `empty enum for sealed class`() { + fun empty_enum_for_sealed_class() { assertEquals( NestedObjectsWithSameName.Companion.EmptySealedClass.values.map( NestedObjectsWithSameName.Companion.EmptySealedClass::enum @@ -37,22 +33,10 @@ class NestedObjectsWithSameNameTests { } @Test - fun `correct enum class`() { + fun correct_enum_class() { assertEquals( NestedObjectsWithSameName_Companion_EmptySealedClassEnum::class, NestedObjectsWithSameName.Companion.EmptySealedClass.sealedEnum.enumClass ) } - - @Test - fun `compilation generates correct code`() { - val result = compile(getSourceFile("compilation", "ksp", "NestedObjectsWithSameName.kt")) - - assertCompiles(result) - assertGeneratedFileMatches( - "NestedObjectsWithSameName.Companion.EmptySealedClass_SealedEnum.kt", - nestedObjectsWithSameNameEmptySealedClassGenerated, - result - ) - } } diff --git a/processing-tests/ksp-tests/src/test/kotlin/com/livefront/sealedenum/testing/CurrentProcessingType.kt b/processing-tests/ksp-common-tests/src/commonTest/kotlin/com/livefront/sealedenum/testing/CurrentProcessingType.kt similarity index 100% rename from processing-tests/ksp-tests/src/test/kotlin/com/livefront/sealedenum/testing/CurrentProcessingType.kt rename to processing-tests/ksp-common-tests/src/commonTest/kotlin/com/livefront/sealedenum/testing/CurrentProcessingType.kt diff --git a/processing-tests/ksp-java-tests/README.md b/processing-tests/ksp-java-tests/README.md new file mode 100644 index 00000000..79de4d3b --- /dev/null +++ b/processing-tests/ksp-java-tests/README.md @@ -0,0 +1,7 @@ +# ksp-java-tests + +Tests that verify the KSP processor's Java-specific functionality. + +This module uses shared `commonMain`, `jvmMain`, `commonTest` and `jvmTest` code from [common/src](../common/src), and also uses shared `commonMain` and `commonTest` code from [ksp-common-tests/src](../ksp-common-tests/src). + +This module exists because we want to apply `ksp` only to `jvmMain` code, and we can't do that while also applying `ksp` to `commonMain` code. diff --git a/processing-tests/ksp-java-tests/build.gradle.kts b/processing-tests/ksp-java-tests/build.gradle.kts new file mode 100644 index 00000000..efcda2ee --- /dev/null +++ b/processing-tests/ksp-java-tests/build.gradle.kts @@ -0,0 +1,90 @@ +plugins { + id("com.livefront.sealedenum.kotlin") + id("com.livefront.sealedenum.detekt") + alias(libs.plugins.ksp) +} + +/** + * Swap to `true` to allow debugging other tests that share code + */ +val disableForSharedCode = false + +kotlin { + jvm() + + sourceSets { + val commonMain by getting { + dependencies { + implementation(projects.runtime) + } + if (!disableForSharedCode) { + kotlin.srcDir("$rootDir/processing-tests/common/src/commonMain") + kotlin.srcDir("$rootDir/processing-tests/ksp-common-tests/src/commonMain") + } + } + + val commonTest by getting { + dependencies { + implementation(kotlin("reflect")) + implementation(kotlin("test")) + } + if (!disableForSharedCode) { + kotlin.srcDir("$rootDir/processing-tests/common/src/commonTest") + kotlin.srcDir("$rootDir/processing-tests/ksp-common-tests/src/commonTest") + } + } + + val jvmMain by getting { + dependencies { + project.dependencies.add("kspJvm", projects.ksp) + } + if (!disableForSharedCode) { + kotlin.srcDir("$rootDir/processing-tests/common/src/jvmMain") + } + } + + val jvmTest by getting { + dependencies { + implementation(libs.junit.jupiter) + implementation(libs.kotlinCompileTesting.base) + implementation(libs.kotlinCompileTesting.ksp) + implementation(libs.ksp.runtime) + implementation(libs.ksp.api) + implementation(projects.ksp) + } + if (!disableForSharedCode) { + kotlin.srcDir("$rootDir/processing-tests/common/src/jvmTest") + } + } + } +} + +if (!disableForSharedCode) { + sourceSets { + main { + java { + srcDir("$rootDir/processing-tests/common/src/jvmMain/java") + } + } + test { + java { + srcDir("$rootDir/processing-tests/common/src/jvmTest/java") + } + } + } +} + +detekt { + source = files( + "src/commonMain/kotlin", + "src/commonTest/kotlin", + "src/jvmMain/kotlin", + "src/jvmTest/kotlin", + "$rootDir/processing-tests/common/src/commonMain/kotlin", + "$rootDir/processing-tests/common/src/commonTest/kotlin", + "$rootDir/processing-tests/common/src/jvmMain/java", + "$rootDir/processing-tests/common/src/jvmMain/kotlin", + "$rootDir/processing-tests/common/src/jvmTest/java", + "$rootDir/processing-tests/common/src/jvmTest/kotlin" + ) +} diff --git a/processing-tests/ksp-java-tests/src/jvmTest/kotlin/com/livefront/sealedenum/compilation/ksp/NestedObjectsWithSameNameCompilationTests.kt b/processing-tests/ksp-java-tests/src/jvmTest/kotlin/com/livefront/sealedenum/compilation/ksp/NestedObjectsWithSameNameCompilationTests.kt new file mode 100644 index 00000000..f6aecb25 --- /dev/null +++ b/processing-tests/ksp-java-tests/src/jvmTest/kotlin/com/livefront/sealedenum/compilation/ksp/NestedObjectsWithSameNameCompilationTests.kt @@ -0,0 +1,35 @@ +package com.livefront.sealedenum.compilation.ksp + +import com.livefront.sealedenum.testing.PlatformSourceType +import com.livefront.sealedenum.testing.SharableProcessingSourceType +import com.livefront.sealedenum.testing.assertCompiles +import com.livefront.sealedenum.testing.assertGeneratedFileMatches +import com.livefront.sealedenum.testing.compile +import com.livefront.sealedenum.testing.getSourceFile +import org.junit.jupiter.api.Test + +/** + * @see NestedObjectsWithSameNameTests + */ +class NestedObjectsWithSameNameCompilationTests { + + @Test + fun `compilation generates correct code`() { + val result = compile( + getSourceFile( + SharableProcessingSourceType.KSP_COMMON, + PlatformSourceType.COMMON, + "compilation", + "ksp", + "NestedObjectsWithSameName.kt" + ) + ) + + assertCompiles(result) + assertGeneratedFileMatches( + "NestedObjectsWithSameName.Companion.EmptySealedClass_SealedEnum.kt", + nestedObjectsWithSameNameEmptySealedClassGenerated, + result + ) + } +} diff --git a/processing-tests/ksp-tests/src/test/kotlin/com/livefront/sealedenum/testing/Compilation.kt b/processing-tests/ksp-java-tests/src/jvmTest/kotlin/com/livefront/sealedenum/testing/Compilation.kt similarity index 100% rename from processing-tests/ksp-tests/src/test/kotlin/com/livefront/sealedenum/testing/Compilation.kt rename to processing-tests/ksp-java-tests/src/jvmTest/kotlin/com/livefront/sealedenum/testing/Compilation.kt diff --git a/processing-tests/ksp-tests/build.gradle.kts b/processing-tests/ksp-tests/build.gradle.kts deleted file mode 100644 index 7265f7bd..00000000 --- a/processing-tests/ksp-tests/build.gradle.kts +++ /dev/null @@ -1,43 +0,0 @@ -plugins { - id("com.livefront.sealedenum.kotlin") - id("com.livefront.sealedenum.detekt") - alias(libs.plugins.ksp) -} - -/** - * Swap to `true` to allow debugging `processor-tests` - */ -val debugProcessor = false -if (!debugProcessor) { - sourceSets { - test { - java { - srcDir("$rootDir/processing-tests/common/test/java") - srcDir("$rootDir/processing-tests/common/test/kotlin") - } - } - } -} - -detekt { - source = files( - "src/main/java", - "src/test/java", - "src/main/kotlin", - "src/test/kotlin", - "$rootDir/processing-tests/common/test/java", - "$rootDir/processing-tests/common/test/kotlin" - ) -} - -dependencies { - testImplementation(libs.junit.jupiter) - testImplementation(libs.kotlinCompileTesting.base) - testImplementation(libs.kotlinCompileTesting.ksp) - testImplementation(kotlin("reflect")) - testImplementation(projects.runtime) - testImplementation(libs.ksp.runtime) - testImplementation(libs.ksp.api) - testImplementation(projects.ksp) - kspTest(projects.ksp) -} diff --git a/processing-tests/processor-tests/README.md b/processing-tests/processor-tests/README.md new file mode 100644 index 00000000..81b0cb49 --- /dev/null +++ b/processing-tests/processor-tests/README.md @@ -0,0 +1,5 @@ +# processor-tests + +Tests that verify the KAPT processor's functionality. + +This module uses shared `commonMain`, `jvmMain`, `commonTest` and `jvmTest` code from [common/src](../common/src) diff --git a/processing-tests/processor-tests/build.gradle.kts b/processing-tests/processor-tests/build.gradle.kts index e92d0935..32e88a8f 100644 --- a/processing-tests/processor-tests/build.gradle.kts +++ b/processing-tests/processor-tests/build.gradle.kts @@ -5,15 +5,67 @@ plugins { } /** - * Swap to `true` to allow debugging `ksp-tests` + * Swap to `true` to allow debugging other tests that share code */ -val debugKsp = false -if (!debugKsp) { +val disableForSharedCode = false + +kotlin { + jvm() + sourceSets { + val commonMain by getting { + dependencies { + implementation(projects.runtime) + } + if (!disableForSharedCode) { + kotlin.srcDir("$rootDir/processing-tests/common/src/commonMain") + } + } + + val commonTest by getting { + dependencies { + implementation(kotlin("reflect")) + implementation(kotlin("test")) + } + if (!disableForSharedCode) { + kotlin.srcDir("$rootDir/processing-tests/common/src/commonTest") + } + } + + val jvmMain by getting { + configurations["kapt"].dependencies.add(projects.processor) + if (!disableForSharedCode) { + kotlin.srcDir("$rootDir/processing-tests/common/src/jvmMain") + } + } + + val jvmTest by getting { + dependencies { + implementation(libs.junit.jupiter) + implementation(libs.kotlinCompileTesting.base) + implementation(projects.processor) + } + if (!disableForSharedCode) { + kotlin.srcDir("$rootDir/processing-tests/common/src/jvmTest") + } + } + } +} + +kapt { + includeCompileClasspath = false +} + +if (!disableForSharedCode) { + sourceSets { + main { + java { + srcDir("$rootDir/processing-tests/common/src/jvmMain/java") + } + } test { java { - srcDir("$rootDir/processing-tests/common/test/java") - srcDir("$rootDir/processing-tests/common/test/kotlin") + srcDir("$rootDir/processing-tests/common/src/jvmTest/java") } } } @@ -21,24 +73,19 @@ if (!debugKsp) { detekt { source = files( - "src/main/java", - "src/test/java", - "src/main/kotlin", - "src/test/kotlin", - "$rootDir/processing-tests/common/test/java", - "$rootDir/processing-tests/common/test/kotlin" + "src/commonMain/kotlin", + "src/commonTest/kotlin", + "src/jvmMain/kotlin", + "src/jvmTest/kotlin", + "$rootDir/processing-tests/common/src/commonMain/kotlin", + "$rootDir/processing-tests/common/src/commonTest/kotlin", + "$rootDir/processing-tests/common/src/jvmMain/java", + "$rootDir/processing-tests/common/src/jvmMain/kotlin", + "$rootDir/processing-tests/common/src/jvmTest/java", + "$rootDir/processing-tests/common/src/jvmTest/kotlin" ) } -dependencies { - testImplementation(libs.junit.jupiter) - testImplementation(libs.kotlinCompileTesting.base) - testImplementation(kotlin("reflect")) - testImplementation(projects.runtime) - testImplementation(projects.processor) - kaptTest(projects.processor) -} - // See https://github.com/tschuchortdev/kotlin-compile-testing#java-16-compatibility if (JavaVersion.current() >= JavaVersion.VERSION_16) { tasks.withType().all { diff --git a/processing-tests/processor-tests/src/test/kotlin/com/livefront/sealedenum/testing/CurrentProcessingType.kt b/processing-tests/processor-tests/src/commonTest/kotlin/com/livefront/sealedenum/testing/CurrentProcessingType.kt similarity index 100% rename from processing-tests/processor-tests/src/test/kotlin/com/livefront/sealedenum/testing/CurrentProcessingType.kt rename to processing-tests/processor-tests/src/commonTest/kotlin/com/livefront/sealedenum/testing/CurrentProcessingType.kt diff --git a/processing-tests/processor-tests/src/test/java/com/livefront/sealedenum/compilation/kitchensink/JavaFirstBaseClass.java b/processing-tests/processor-tests/src/jvmMain/java/com/livefront/sealedenum/compilation/kitchensink/JavaFirstBaseClass.java similarity index 100% rename from processing-tests/processor-tests/src/test/java/com/livefront/sealedenum/compilation/kitchensink/JavaFirstBaseClass.java rename to processing-tests/processor-tests/src/jvmMain/java/com/livefront/sealedenum/compilation/kitchensink/JavaFirstBaseClass.java diff --git a/processing-tests/processor-tests/src/test/java/com/livefront/sealedenum/compilation/kitchensink/JavaInterface1.java b/processing-tests/processor-tests/src/jvmMain/java/com/livefront/sealedenum/compilation/kitchensink/JavaInterface1.java similarity index 100% rename from processing-tests/processor-tests/src/test/java/com/livefront/sealedenum/compilation/kitchensink/JavaInterface1.java rename to processing-tests/processor-tests/src/jvmMain/java/com/livefront/sealedenum/compilation/kitchensink/JavaInterface1.java diff --git a/processing-tests/processor-tests/src/test/java/com/livefront/sealedenum/compilation/kitchensink/JavaInterface2.java b/processing-tests/processor-tests/src/jvmMain/java/com/livefront/sealedenum/compilation/kitchensink/JavaInterface2.java similarity index 100% rename from processing-tests/processor-tests/src/test/java/com/livefront/sealedenum/compilation/kitchensink/JavaInterface2.java rename to processing-tests/processor-tests/src/jvmMain/java/com/livefront/sealedenum/compilation/kitchensink/JavaInterface2.java diff --git a/processing-tests/processor-tests/src/test/java/com/livefront/sealedenum/compilation/kitchensink/JavaInterface3.java b/processing-tests/processor-tests/src/jvmMain/java/com/livefront/sealedenum/compilation/kitchensink/JavaInterface3.java similarity index 100% rename from processing-tests/processor-tests/src/test/java/com/livefront/sealedenum/compilation/kitchensink/JavaInterface3.java rename to processing-tests/processor-tests/src/jvmMain/java/com/livefront/sealedenum/compilation/kitchensink/JavaInterface3.java diff --git a/processing-tests/processor-tests/src/test/java/com/livefront/sealedenum/compilation/kitchensink/JavaInterface4.java b/processing-tests/processor-tests/src/jvmMain/java/com/livefront/sealedenum/compilation/kitchensink/JavaInterface4.java similarity index 100% rename from processing-tests/processor-tests/src/test/java/com/livefront/sealedenum/compilation/kitchensink/JavaInterface4.java rename to processing-tests/processor-tests/src/jvmMain/java/com/livefront/sealedenum/compilation/kitchensink/JavaInterface4.java diff --git a/processing-tests/processor-tests/src/test/java/com/livefront/sealedenum/compilation/kitchensink/JavaInterface5.java b/processing-tests/processor-tests/src/jvmMain/java/com/livefront/sealedenum/compilation/kitchensink/JavaInterface5.java similarity index 76% rename from processing-tests/processor-tests/src/test/java/com/livefront/sealedenum/compilation/kitchensink/JavaInterface5.java rename to processing-tests/processor-tests/src/jvmMain/java/com/livefront/sealedenum/compilation/kitchensink/JavaInterface5.java index c9899dd8..82e23563 100644 --- a/processing-tests/processor-tests/src/test/java/com/livefront/sealedenum/compilation/kitchensink/JavaInterface5.java +++ b/processing-tests/processor-tests/src/jvmMain/java/com/livefront/sealedenum/compilation/kitchensink/JavaInterface5.java @@ -1,6 +1,4 @@ package com.livefront.sealedenum.compilation.kitchensink; -import java.util.Collection; - public interface JavaInterface5 { } diff --git a/processing-tests/processor-tests/src/test/java/com/livefront/sealedenum/compilation/kitchensink/JavaSecondBaseClass.java b/processing-tests/processor-tests/src/jvmMain/java/com/livefront/sealedenum/compilation/kitchensink/JavaSecondBaseClass.java similarity index 100% rename from processing-tests/processor-tests/src/test/java/com/livefront/sealedenum/compilation/kitchensink/JavaSecondBaseClass.java rename to processing-tests/processor-tests/src/jvmMain/java/com/livefront/sealedenum/compilation/kitchensink/JavaSecondBaseClass.java diff --git a/processing-tests/processor-tests/src/test/kotlin/com/livefront/sealedenum/compilation/kitchensink/JavaBaseClasses.kt b/processing-tests/processor-tests/src/jvmMain/kotlin/com/livefront/sealedenum/compilation/kitchensink/JavaBaseClasses.kt similarity index 90% rename from processing-tests/processor-tests/src/test/kotlin/com/livefront/sealedenum/compilation/kitchensink/JavaBaseClasses.kt rename to processing-tests/processor-tests/src/jvmMain/kotlin/com/livefront/sealedenum/compilation/kitchensink/JavaBaseClasses.kt index 01d73edd..a114f36b 100644 --- a/processing-tests/processor-tests/src/test/kotlin/com/livefront/sealedenum/compilation/kitchensink/JavaBaseClasses.kt +++ b/processing-tests/processor-tests/src/jvmMain/kotlin/com/livefront/sealedenum/compilation/kitchensink/JavaBaseClasses.kt @@ -3,11 +3,11 @@ package com.livefront.sealedenum.compilation.kitchensink import com.livefront.sealedenum.GenSealedEnum import org.intellij.lang.annotations.Language -interface KotlinInterface1 +public interface KotlinInterface1 -interface KotlinInterface2 +public interface KotlinInterface2 -interface KotlinInterface3 +public interface KotlinInterface3 internal interface KotlinInterface4 @@ -15,31 +15,32 @@ internal interface KotlinInterface5 internal interface KotlinInterface6 -interface KotlinInterface7 +public interface KotlinInterface7 -open class KotlinFirstBaseClass> : +public open class KotlinFirstBaseClass> : KotlinInterface1, KotlinInterface3, JavaInterface4 -open class KotlinSecondBaseClass, D> : +public open class KotlinSecondBaseClass, D> : JavaFirstBaseClass(), KotlinInterface4, KotlinInterface6, JavaInterface2, JavaInterface5>>> -sealed class JavaBaseClassesSealedClass> : +public sealed class JavaBaseClassesSealedClass> : JavaSecondBaseClass>(), KotlinInterface7 { - object FirstObject : JavaBaseClassesSealedClass>() + public object FirstObject : JavaBaseClassesSealedClass>() - object SecondObject : JavaBaseClassesSealedClass>() + public object SecondObject : JavaBaseClassesSealedClass>() @GenSealedEnum(generateEnum = true) - companion object + public companion object } +@Suppress("MaxLineLength") @Language("kotlin") -val javaBaseClassesSealedClassGenerated = """ +public val javaBaseClassesSealedClassGenerated: String = """ package com.livefront.sealedenum.compilation.kitchensink import com.livefront.sealedenum.EnumForSealedEnumProvider diff --git a/processing-tests/processor-tests/src/test/kotlin/com/livefront/sealedenum/compilation/kitchensink/JavaBaseClassesTests.kt b/processing-tests/processor-tests/src/jvmTest/kotlin/com/livefront/sealedenum/compilation/kitchensink/JavaBaseClassesTests.kt similarity index 74% rename from processing-tests/processor-tests/src/test/kotlin/com/livefront/sealedenum/compilation/kitchensink/JavaBaseClassesTests.kt rename to processing-tests/processor-tests/src/jvmTest/kotlin/com/livefront/sealedenum/compilation/kitchensink/JavaBaseClassesTests.kt index 8e382a4c..7125575b 100644 --- a/processing-tests/processor-tests/src/test/kotlin/com/livefront/sealedenum/compilation/kitchensink/JavaBaseClassesTests.kt +++ b/processing-tests/processor-tests/src/jvmTest/kotlin/com/livefront/sealedenum/compilation/kitchensink/JavaBaseClassesTests.kt @@ -1,5 +1,7 @@ package com.livefront.sealedenum.compilation.kitchensink +import com.livefront.sealedenum.testing.PlatformSourceType +import com.livefront.sealedenum.testing.SharableProcessingSourceType import com.livefront.sealedenum.testing.assertCompiles import com.livefront.sealedenum.testing.assertGeneratedFileMatches import com.livefront.sealedenum.testing.compile @@ -148,17 +150,66 @@ class JavaBaseClassesTests { ) } + @Suppress("LongMethod") @Test fun `compilation generates correct code`() { val result = compile( - getSourceFile("compilation", "kitchensink", "JavaInterface1.java"), - getSourceFile("compilation", "kitchensink", "JavaInterface2.java"), - getSourceFile("compilation", "kitchensink", "JavaInterface3.java"), - getSourceFile("compilation", "kitchensink", "JavaInterface4.java"), - getSourceFile("compilation", "kitchensink", "JavaInterface5.java"), - getSourceFile("compilation", "kitchensink", "JavaFirstBaseClass.java"), - getSourceFile("compilation", "kitchensink", "JavaSecondBaseClass.java"), - getSourceFile("compilation", "kitchensink", "JavaBaseClasses.kt") + getSourceFile( + SharableProcessingSourceType.UNIQUE, + PlatformSourceType.JVM, + "compilation", + "kitchensink", + "JavaInterface1.java" + ), + getSourceFile( + SharableProcessingSourceType.UNIQUE, + PlatformSourceType.JVM, + "compilation", + "kitchensink", + "JavaInterface2.java" + ), + getSourceFile( + SharableProcessingSourceType.UNIQUE, + PlatformSourceType.JVM, + "compilation", + "kitchensink", + "JavaInterface3.java" + ), + getSourceFile( + SharableProcessingSourceType.UNIQUE, + PlatformSourceType.JVM, + "compilation", + "kitchensink", + "JavaInterface4.java" + ), + getSourceFile( + SharableProcessingSourceType.UNIQUE, + PlatformSourceType.JVM, + "compilation", + "kitchensink", + "JavaInterface5.java" + ), + getSourceFile( + SharableProcessingSourceType.UNIQUE, + PlatformSourceType.JVM, + "compilation", + "kitchensink", + "JavaFirstBaseClass.java" + ), + getSourceFile( + SharableProcessingSourceType.UNIQUE, + PlatformSourceType.JVM, + "compilation", + "kitchensink", + "JavaSecondBaseClass.java" + ), + getSourceFile( + SharableProcessingSourceType.UNIQUE, + PlatformSourceType.JVM, + "compilation", + "kitchensink", + "JavaBaseClasses.kt" + ) ) assertCompiles(result) diff --git a/processing-tests/processor-tests/src/test/kotlin/com/livefront/sealedenum/testing/Compilation.kt b/processing-tests/processor-tests/src/jvmTest/kotlin/com/livefront/sealedenum/testing/Compilation.kt similarity index 90% rename from processing-tests/processor-tests/src/test/kotlin/com/livefront/sealedenum/testing/Compilation.kt rename to processing-tests/processor-tests/src/jvmTest/kotlin/com/livefront/sealedenum/testing/Compilation.kt index 8460cb08..f19bc820 100644 --- a/processing-tests/processor-tests/src/test/kotlin/com/livefront/sealedenum/testing/Compilation.kt +++ b/processing-tests/processor-tests/src/jvmTest/kotlin/com/livefront/sealedenum/testing/Compilation.kt @@ -12,5 +12,4 @@ internal fun compile(vararg sourceFiles: SourceFile): KotlinCompilation.Result = sources = sourceFiles.toList() annotationProcessors = listOf(SealedEnumProcessor()) inheritClassPath = true - kotlincArguments = listOf("-language-version", "1.5") }.compile() diff --git a/processor/build.gradle.kts b/processor/build.gradle.kts index 1b5e9e49..5f2bebc7 100644 --- a/processor/build.gradle.kts +++ b/processor/build.gradle.kts @@ -5,15 +5,23 @@ plugins { kotlin("kapt") } -dependencies { - implementation(projects.runtime) - implementation(projects.processingCommon) - implementation(libs.squareUp.kotlinPoet) - implementation(libs.squareUp.kotlinPoetMetadata) - implementation(libs.autoService.runtime) - kapt(libs.autoService.processor) - implementation(libs.incap.runtime) - kapt(libs.incap.processor) +kotlin { + jvm() + + sourceSets { + val jvmMain by getting { + dependencies { + implementation(projects.runtime) + implementation(projects.processingCommon) + implementation(libs.squareUp.kotlinPoet) + implementation(libs.squareUp.kotlinPoetMetadata) + implementation(libs.autoService.runtime) + configurations["kapt"].dependencies.add(project.dependencies.create(libs.autoService.processor.get())) + implementation(libs.incap.runtime) + configurations["kapt"].dependencies.add(project.dependencies.create(libs.incap.processor.get())) + } + } + } } kapt { diff --git a/processor/src/main/kotlin/com/livefront/sealedenum/internal/processor/ClassInspectorUtil.kt b/processor/src/jvmMain/kotlin/com/livefront/sealedenum/internal/processor/ClassInspectorUtil.kt similarity index 100% rename from processor/src/main/kotlin/com/livefront/sealedenum/internal/processor/ClassInspectorUtil.kt rename to processor/src/jvmMain/kotlin/com/livefront/sealedenum/internal/processor/ClassInspectorUtil.kt diff --git a/processor/src/main/kotlin/com/livefront/sealedenum/internal/processor/InvalidSubclassVisibilityException.kt b/processor/src/jvmMain/kotlin/com/livefront/sealedenum/internal/processor/InvalidSubclassVisibilityException.kt similarity index 100% rename from processor/src/main/kotlin/com/livefront/sealedenum/internal/processor/InvalidSubclassVisibilityException.kt rename to processor/src/jvmMain/kotlin/com/livefront/sealedenum/internal/processor/InvalidSubclassVisibilityException.kt diff --git a/processor/src/main/kotlin/com/livefront/sealedenum/internal/processor/NonObjectSealedSubclassException.kt b/processor/src/jvmMain/kotlin/com/livefront/sealedenum/internal/processor/NonObjectSealedSubclassException.kt similarity index 100% rename from processor/src/main/kotlin/com/livefront/sealedenum/internal/processor/NonObjectSealedSubclassException.kt rename to processor/src/jvmMain/kotlin/com/livefront/sealedenum/internal/processor/NonObjectSealedSubclassException.kt diff --git a/processor/src/main/kotlin/com/livefront/sealedenum/internal/processor/SealedEnumProcessor.kt b/processor/src/jvmMain/kotlin/com/livefront/sealedenum/internal/processor/SealedEnumProcessor.kt similarity index 100% rename from processor/src/main/kotlin/com/livefront/sealedenum/internal/processor/SealedEnumProcessor.kt rename to processor/src/jvmMain/kotlin/com/livefront/sealedenum/internal/processor/SealedEnumProcessor.kt diff --git a/processor/src/main/kotlin/com/livefront/sealedenum/internal/processor/SuperInterfaces.kt b/processor/src/jvmMain/kotlin/com/livefront/sealedenum/internal/processor/SuperInterfaces.kt similarity index 100% rename from processor/src/main/kotlin/com/livefront/sealedenum/internal/processor/SuperInterfaces.kt rename to processor/src/jvmMain/kotlin/com/livefront/sealedenum/internal/processor/SuperInterfaces.kt diff --git a/processor/src/main/kotlin/com/livefront/sealedenum/internal/processor/WildcardedTypeParameters.kt b/processor/src/jvmMain/kotlin/com/livefront/sealedenum/internal/processor/WildcardedTypeParameters.kt similarity index 100% rename from processor/src/main/kotlin/com/livefront/sealedenum/internal/processor/WildcardedTypeParameters.kt rename to processor/src/jvmMain/kotlin/com/livefront/sealedenum/internal/processor/WildcardedTypeParameters.kt diff --git a/runtime/build.gradle.kts b/runtime/build.gradle.kts index f128bfcf..0d04d473 100644 --- a/runtime/build.gradle.kts +++ b/runtime/build.gradle.kts @@ -4,6 +4,25 @@ plugins { id("com.livefront.sealedenum.publish") } -dependencies { - testImplementation(libs.junit.jupiter) +kotlin { + jvm() + js(BOTH) { + browser() + nodejs() + } + + macosX64() + iosArm32(); iosArm64(); iosX64() + watchosArm32(); watchosArm64(); watchosX86(); watchosX64() + + linuxArm64(); linuxX64() + mingwX86(); mingwX64() + + sourceSets { + val commonTest by getting { + dependencies { + implementation(kotlin("test")) + } + } + } } diff --git a/runtime/src/main/kotlin/com/livefront/sealedenum/EnumForSealedEnumProvider.kt b/runtime/src/commonMain/kotlin/com/livefront/sealedenum/EnumForSealedEnumProvider.kt similarity index 100% rename from runtime/src/main/kotlin/com/livefront/sealedenum/EnumForSealedEnumProvider.kt rename to runtime/src/commonMain/kotlin/com/livefront/sealedenum/EnumForSealedEnumProvider.kt diff --git a/runtime/src/main/kotlin/com/livefront/sealedenum/GenSealedEnum.kt b/runtime/src/commonMain/kotlin/com/livefront/sealedenum/GenSealedEnum.kt similarity index 98% rename from runtime/src/main/kotlin/com/livefront/sealedenum/GenSealedEnum.kt rename to runtime/src/commonMain/kotlin/com/livefront/sealedenum/GenSealedEnum.kt index 6319ac84..f36a9545 100644 --- a/runtime/src/main/kotlin/com/livefront/sealedenum/GenSealedEnum.kt +++ b/runtime/src/commonMain/kotlin/com/livefront/sealedenum/GenSealedEnum.kt @@ -200,8 +200,7 @@ package com.livefront.sealedenum * determined by [traversalOrder]), and the names of the sealed objects (as given by [SealedEnum.nameOf] and * [SealedEnum.valueOf]) will match the names of the enum constants (assuming no obfuscation occurs). */ -@Suppress("DEPRECATED_JAVA_ANNOTATION") -@java.lang.annotation.Repeatable(GenSealedEnums::class) +@RepeatableContainer(GenSealedEnums::class) @Retention(AnnotationRetention.SOURCE) @Target(AnnotationTarget.CLASS) @Repeatable diff --git a/runtime/src/commonMain/kotlin/com/livefront/sealedenum/RepeatableContainer.kt b/runtime/src/commonMain/kotlin/com/livefront/sealedenum/RepeatableContainer.kt new file mode 100644 index 00000000..e9e522cc --- /dev/null +++ b/runtime/src/commonMain/kotlin/com/livefront/sealedenum/RepeatableContainer.kt @@ -0,0 +1,10 @@ +package com.livefront.sealedenum + +import kotlin.reflect.KClass + +/** + * A multiplatform expectation for the Java Repeatable annotation. + */ +@OptIn(ExperimentalMultiplatform::class) +@OptionalExpectation +public expect annotation class RepeatableContainer(val value: KClass) diff --git a/runtime/src/main/kotlin/com/livefront/sealedenum/SealedEnum.kt b/runtime/src/commonMain/kotlin/com/livefront/sealedenum/SealedEnum.kt similarity index 95% rename from runtime/src/main/kotlin/com/livefront/sealedenum/SealedEnum.kt rename to runtime/src/commonMain/kotlin/com/livefront/sealedenum/SealedEnum.kt index 43c4c443..739e2271 100644 --- a/runtime/src/main/kotlin/com/livefront/sealedenum/SealedEnum.kt +++ b/runtime/src/commonMain/kotlin/com/livefront/sealedenum/SealedEnum.kt @@ -34,7 +34,7 @@ public interface SealedEnum : Comparator { */ public fun valueOf(name: String): T - public override fun compare(first: T, second: T): Int = ordinalOf(first) - ordinalOf(second) + public override fun compare(a: T, b: T): Int = ordinalOf(a) - ordinalOf(b) } /** diff --git a/runtime/src/main/kotlin/com/livefront/sealedenum/SealedEnumWithEnumProvider.kt b/runtime/src/commonMain/kotlin/com/livefront/sealedenum/SealedEnumWithEnumProvider.kt similarity index 100% rename from runtime/src/main/kotlin/com/livefront/sealedenum/SealedEnumWithEnumProvider.kt rename to runtime/src/commonMain/kotlin/com/livefront/sealedenum/SealedEnumWithEnumProvider.kt diff --git a/runtime/src/main/kotlin/com/livefront/sealedenum/TreeTraversalOrder.kt b/runtime/src/commonMain/kotlin/com/livefront/sealedenum/TreeTraversalOrder.kt similarity index 100% rename from runtime/src/main/kotlin/com/livefront/sealedenum/TreeTraversalOrder.kt rename to runtime/src/commonMain/kotlin/com/livefront/sealedenum/TreeTraversalOrder.kt diff --git a/runtime/src/commonTest/kotlin/com/livefront/sealedenum/CreateSealedEnumFromEnumTests.kt b/runtime/src/commonTest/kotlin/com/livefront/sealedenum/CreateSealedEnumFromEnumTests.kt new file mode 100644 index 00000000..3c8a2559 --- /dev/null +++ b/runtime/src/commonTest/kotlin/com/livefront/sealedenum/CreateSealedEnumFromEnumTests.kt @@ -0,0 +1,130 @@ +package com.livefront.sealedenum + +import kotlin.test.Test +import kotlin.test.assertEquals +import kotlin.test.fail + +enum class AlphaEnum { BETA, GAMMA, DELTA } + +class CreateSealedEnumFromEnumTests { + + private val alphaEnumSealedEnum = createSealedEnumFromEnum() + + @Test + fun verify_values_are_correct() { + assertEquals(listOf(AlphaEnum.BETA, AlphaEnum.GAMMA, AlphaEnum.DELTA), alphaEnumSealedEnum.values) + } + + @Test + fun verify_ordinal_of_BETA_is_correct() { + assertEquals(0, alphaEnumSealedEnum.ordinalOf(AlphaEnum.BETA)) + } + + @Test + fun verify_ordinal_of_GAMMA_is_correct() { + assertEquals(1, alphaEnumSealedEnum.ordinalOf(AlphaEnum.GAMMA)) + } + + @Test + fun verify_ordinal_of_DELTA_is_correct() { + assertEquals(2, alphaEnumSealedEnum.ordinalOf(AlphaEnum.DELTA)) + } + + data class ComparatorConfig( + val first: AlphaEnum, + val second: AlphaEnum, + val compareValue: Int + ) + + @Test + fun verify_compareTo_is_correct() { + listOf( + ComparatorConfig(AlphaEnum.BETA, AlphaEnum.BETA, 0), + ComparatorConfig(AlphaEnum.BETA, AlphaEnum.GAMMA, -1), + ComparatorConfig(AlphaEnum.BETA, AlphaEnum.DELTA, -2), + ComparatorConfig(AlphaEnum.GAMMA, AlphaEnum.BETA, 1), + ComparatorConfig(AlphaEnum.GAMMA, AlphaEnum.GAMMA, 0), + ComparatorConfig(AlphaEnum.GAMMA, AlphaEnum.DELTA, -1), + ComparatorConfig(AlphaEnum.DELTA, AlphaEnum.BETA, 2), + ComparatorConfig(AlphaEnum.DELTA, AlphaEnum.GAMMA, 1), + ComparatorConfig(AlphaEnum.DELTA, AlphaEnum.DELTA, 0) + ).forEach { config -> + assertEquals(config.compareValue, alphaEnumSealedEnum.compare(config.first, config.second)) + } + } + + @Test + fun verify_name_of_BETA_is_correct() { + assertEquals("BETA", alphaEnumSealedEnum.nameOf(AlphaEnum.BETA)) + } + + @Test + fun verify_name_of_GAMMA_is_correct() { + assertEquals("GAMMA", alphaEnumSealedEnum.nameOf(AlphaEnum.GAMMA)) + } + + @Test + fun verify_name_of_DELTA_is_correct() { + assertEquals("DELTA", alphaEnumSealedEnum.nameOf(AlphaEnum.DELTA)) + } + + @Test + fun verify_valueOf_of_BETA_is_correct() { + assertEquals(AlphaEnum.BETA, alphaEnumSealedEnum.valueOf("BETA")) + } + + @Test + fun verify_valueOf_of_GAMMA_is_correct() { + assertEquals(AlphaEnum.GAMMA, alphaEnumSealedEnum.valueOf("GAMMA")) + } + + @Test + fun verify_valueOf_of_DELTA_is_correct() { + assertEquals(AlphaEnum.DELTA, alphaEnumSealedEnum.valueOf("DELTA")) + } + + @Test + fun verify_valueOf_of_EPSILON_throws_exception() { + try { + alphaEnumSealedEnum.valueOf("EPSILON") + fail() + } catch (exception: IllegalArgumentException) { + // expected to throw + } + } + + @Test + fun verify_enum_class_is_correct() { + assertEquals(AlphaEnum::class, alphaEnumSealedEnum.enumClass) + } + + @Test + fun verify_sealed_enum_to_object_is_correct_for_BETA() { + assertEquals(AlphaEnum.BETA, alphaEnumSealedEnum.sealedObjectToEnum(AlphaEnum.BETA)) + } + + @Test + fun verify_sealed_enum_to_object_is_correct_for_GAMMA() { + assertEquals(AlphaEnum.GAMMA, alphaEnumSealedEnum.sealedObjectToEnum(AlphaEnum.GAMMA)) + } + + @Test + fun verify_sealed_enum_to_object_is_correct_for_DELTA() { + assertEquals(AlphaEnum.DELTA, alphaEnumSealedEnum.sealedObjectToEnum(AlphaEnum.DELTA)) + } + + @Test + fun verify_object_to_sealed_enum_is_correct_for_BETA() { + assertEquals(AlphaEnum.BETA, alphaEnumSealedEnum.enumToSealedObject(AlphaEnum.BETA)) + } + + @Test + fun verify_object_to_sealed_enum_is_correct_for_GAMMA() { + assertEquals(AlphaEnum.GAMMA, alphaEnumSealedEnum.enumToSealedObject(AlphaEnum.GAMMA)) + } + + @Test + fun verify_object_to_sealed_enum_is_correct_for_DELTA() { + assertEquals(AlphaEnum.DELTA, alphaEnumSealedEnum.enumToSealedObject(AlphaEnum.DELTA)) + } +} diff --git a/runtime/src/jvmMain/kotlin/com/livefront/sealedenum/RepeatableContainer.jvm.kt b/runtime/src/jvmMain/kotlin/com/livefront/sealedenum/RepeatableContainer.jvm.kt new file mode 100644 index 00000000..694207b7 --- /dev/null +++ b/runtime/src/jvmMain/kotlin/com/livefront/sealedenum/RepeatableContainer.jvm.kt @@ -0,0 +1,8 @@ +package com.livefront.sealedenum + +import java.lang.annotation.Repeatable + +/** + * The mapping of [RepeatableContainer] to [Repeatable] + */ +public actual typealias RepeatableContainer = Repeatable diff --git a/runtime/src/test/kotlin/com/livefront/sealedenum/CreateSealedEnumFromEnumTests.kt b/runtime/src/test/kotlin/com/livefront/sealedenum/CreateSealedEnumFromEnumTests.kt deleted file mode 100644 index e1098662..00000000 --- a/runtime/src/test/kotlin/com/livefront/sealedenum/CreateSealedEnumFromEnumTests.kt +++ /dev/null @@ -1,137 +0,0 @@ -package com.livefront.sealedenum - -import org.junit.jupiter.api.Assertions.assertEquals -import org.junit.jupiter.api.Test -import org.junit.jupiter.api.assertThrows -import org.junit.jupiter.api.extension.ExtensionContext -import org.junit.jupiter.params.ParameterizedTest -import org.junit.jupiter.params.provider.Arguments -import org.junit.jupiter.params.provider.ArgumentsProvider -import org.junit.jupiter.params.provider.ArgumentsSource -import java.util.stream.Stream - -enum class AlphaEnum { BETA, GAMMA, DELTA } - -class CreateSealedEnumFromEnumTests { - - private val alphaEnumSealedEnum = createSealedEnumFromEnum() - - @Test - fun `verify values are correct`() { - assertEquals(listOf(AlphaEnum.BETA, AlphaEnum.GAMMA, AlphaEnum.DELTA), alphaEnumSealedEnum.values) - } - - @Test - fun `verify ordinal of BETA is correct`() { - assertEquals(0, alphaEnumSealedEnum.ordinalOf(AlphaEnum.BETA)) - } - - @Test - fun `verify ordinal of GAMMA is correct`() { - assertEquals(1, alphaEnumSealedEnum.ordinalOf(AlphaEnum.GAMMA)) - } - - @Test - fun `verify ordinal of DELTA is correct`() { - assertEquals(2, alphaEnumSealedEnum.ordinalOf(AlphaEnum.DELTA)) - } - - data class ComparatorConfig( - val first: AlphaEnum, - val second: AlphaEnum, - val compareValue: Int - ) { - class Provider : ArgumentsProvider { - override fun provideArguments(context: ExtensionContext?): Stream = - listOf( - ComparatorConfig(AlphaEnum.BETA, AlphaEnum.BETA, 0), - ComparatorConfig(AlphaEnum.BETA, AlphaEnum.GAMMA, -1), - ComparatorConfig(AlphaEnum.BETA, AlphaEnum.DELTA, -2), - ComparatorConfig(AlphaEnum.GAMMA, AlphaEnum.BETA, 1), - ComparatorConfig(AlphaEnum.GAMMA, AlphaEnum.GAMMA, 0), - ComparatorConfig(AlphaEnum.GAMMA, AlphaEnum.DELTA, -1), - ComparatorConfig(AlphaEnum.DELTA, AlphaEnum.BETA, 2), - ComparatorConfig(AlphaEnum.DELTA, AlphaEnum.GAMMA, 1), - ComparatorConfig(AlphaEnum.DELTA, AlphaEnum.DELTA, 0) - ).map { Arguments.of(it) }.stream() - } - } - - @ParameterizedTest - @ArgumentsSource(ComparatorConfig.Provider::class) - fun `verify compareTo is correct`(config: ComparatorConfig) { - assertEquals(config.compareValue, alphaEnumSealedEnum.compare(config.first, config.second)) - } - - @Test - fun `verify name of BETA is correct`() { - assertEquals("BETA", alphaEnumSealedEnum.nameOf(AlphaEnum.BETA)) - } - - @Test - fun `verify name of GAMMA is correct`() { - assertEquals("GAMMA", alphaEnumSealedEnum.nameOf(AlphaEnum.GAMMA)) - } - - @Test - fun `verify name of DELTA is correct`() { - assertEquals("DELTA", alphaEnumSealedEnum.nameOf(AlphaEnum.DELTA)) - } - - @Test - fun `verify valueOf of BETA is correct`() { - assertEquals(AlphaEnum.BETA, alphaEnumSealedEnum.valueOf("BETA")) - } - - @Test - fun `verify valueOf of GAMMA is correct`() { - assertEquals(AlphaEnum.GAMMA, alphaEnumSealedEnum.valueOf("GAMMA")) - } - - @Test - fun `verify valueOf of DELTA is correct`() { - assertEquals(AlphaEnum.DELTA, alphaEnumSealedEnum.valueOf("DELTA")) - } - - @Test - fun `verify valueOf of EPSILON throws exception`() { - assertThrows { - alphaEnumSealedEnum.valueOf("EPSILON") - } - } - - @Test - fun `verify enum class is correct`() { - assertEquals(AlphaEnum::class, alphaEnumSealedEnum.enumClass) - } - - @Test - fun `verify sealed enum to object is correct for BETA`() { - assertEquals(AlphaEnum.BETA, alphaEnumSealedEnum.sealedObjectToEnum(AlphaEnum.BETA)) - } - - @Test - fun `verify sealed enum to object is correct for GAMMA`() { - assertEquals(AlphaEnum.GAMMA, alphaEnumSealedEnum.sealedObjectToEnum(AlphaEnum.GAMMA)) - } - - @Test - fun `verify sealed enum to object is correct for DELTA`() { - assertEquals(AlphaEnum.DELTA, alphaEnumSealedEnum.sealedObjectToEnum(AlphaEnum.DELTA)) - } - - @Test - fun `verify object to sealed enum is correct for BETA`() { - assertEquals(AlphaEnum.BETA, alphaEnumSealedEnum.enumToSealedObject(AlphaEnum.BETA)) - } - - @Test - fun `verify object to sealed enum is correct for GAMMA`() { - assertEquals(AlphaEnum.GAMMA, alphaEnumSealedEnum.enumToSealedObject(AlphaEnum.GAMMA)) - } - - @Test - fun `verify object to sealed enum is correct for DELTA`() { - assertEquals(AlphaEnum.DELTA, alphaEnumSealedEnum.enumToSealedObject(AlphaEnum.DELTA)) - } -} diff --git a/settings.gradle.kts b/settings.gradle.kts index eb6dd360..86f3919e 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -9,7 +9,6 @@ pluginManagement { } dependencyResolutionManagement { - repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) repositories { mavenCentral() } @@ -20,6 +19,6 @@ include(":processing-common") include(":processor") include(":ksp") include(":processing-tests:processor-tests") -include(":processing-tests:ksp-tests") -include(":jacoco") +include(":processing-tests:ksp-common-tests") +include(":processing-tests:ksp-java-tests") rootProject.name = "sealed-enum"