mirror of
https://github.com/izzy2lost/WeeU.git
synced 2026-07-06 00:19:59 -07:00
Delete test stuff
This commit is contained in:
+2
-1
@@ -54,4 +54,5 @@ bin/gameProfiles/*
|
||||
bin/graphicPacks/*
|
||||
|
||||
# Ignore Finder view option files created by OS X
|
||||
.DS_Store
|
||||
.DS_Store
|
||||
.kilocode/mcp.json
|
||||
|
||||
-14
@@ -1,14 +0,0 @@
|
||||
package info.cemu.cemu.tests
|
||||
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4
|
||||
import org.junit.Assert.*
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
@RunWith(AndroidJUnit4::class)
|
||||
class PlaceholderInstrumentedTest {
|
||||
@Test
|
||||
fun test() {
|
||||
assertTrue(true)
|
||||
}
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
<inset xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:insetLeft="25%"
|
||||
android:insetTop="25%"
|
||||
android:insetRight="25%"
|
||||
android:insetBottom="25%">
|
||||
<vector
|
||||
android:width="14dp"
|
||||
android:height="14dp"
|
||||
android:viewportWidth="960"
|
||||
android:viewportHeight="960">
|
||||
<path
|
||||
android:fillColor="#ffffff"
|
||||
android:pathData="m480,840q-65,0 -120.5,-32Q304,776 272,720L160,720v-80h84q-3,-20 -3.5,-40 -0.5,-20 -0.5,-40h-80v-80h80q0,-20 0.5,-40 0.5,-20 3.5,-40h-84v-80h112q14,-23 31.5,-43 17.5,-20 40.5,-35l-64,-66 56,-56 86,86q28,-9 57,-9 29,0 57,9l88,-86 56,56 -66,66q23,15 41.5,34.5 18.5,19.5 32.5,43.5h112v80h-84q3,20 3.5,40 0.5,20 0.5,40h80v80h-80q0,20 -0.5,40 -0.5,20 -3.5,40h84v80L688,720q-32,56 -87.5,88 -55.5,32 -120.5,32zM400,640h160v-80L400,560ZM400,480h160v-80L400,400Z" />
|
||||
</vector>
|
||||
</inset>
|
||||
@@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@drawable/ic_launcher_background" />
|
||||
<foreground android:drawable="@drawable/ic_debug" />
|
||||
<monochrome android:drawable="@drawable/ic_debug" />
|
||||
</adaptive-icon>
|
||||
@@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@drawable/ic_launcher_background" />
|
||||
<foreground android:drawable="@drawable/ic_debug" />
|
||||
<monochrome android:drawable="@drawable/ic_debug" />
|
||||
</adaptive-icon>
|
||||
@@ -1,3 +0,0 @@
|
||||
<resources>
|
||||
<string name="app_name" translatable="false">Cemu debug</string>
|
||||
</resources>
|
||||
@@ -1,88 +0,0 @@
|
||||
package info.cemu.cemu.tests
|
||||
|
||||
import com.tngtech.archunit.base.DescribedPredicate
|
||||
import com.tngtech.archunit.base.DescribedPredicate.alwaysTrue
|
||||
import com.tngtech.archunit.base.DescribedPredicate.not
|
||||
import com.tngtech.archunit.base.DescribedPredicate.or
|
||||
import com.tngtech.archunit.core.domain.JavaClass
|
||||
import com.tngtech.archunit.core.domain.JavaClass.Predicates.resideInAPackage
|
||||
import com.tngtech.archunit.core.domain.JavaClasses
|
||||
import com.tngtech.archunit.core.importer.ImportOption.DoNotIncludeTests
|
||||
import com.tngtech.archunit.junit.AnalyzeClasses
|
||||
import com.tngtech.archunit.junit.ArchTest
|
||||
import com.tngtech.archunit.junit.ArchUnitRunner
|
||||
import com.tngtech.archunit.junit.CacheMode
|
||||
import com.tngtech.archunit.lang.syntax.ArchRuleDefinition.noClasses
|
||||
import com.tngtech.archunit.library.dependencies.SlicesRuleDefinition
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
@RunWith(ArchUnitRunner::class)
|
||||
@AnalyzeClasses(
|
||||
packages = ["info.cemu.cemu"],
|
||||
importOptions = [DoNotIncludeTests::class],
|
||||
cacheMode = CacheMode.PER_CLASS
|
||||
)
|
||||
class ArchitectureTests {
|
||||
private val isFromEntryPointCode =
|
||||
object : DescribedPredicate<JavaClass>("is from entry point code") {
|
||||
private val entryPointFiles = listOf(
|
||||
"MainActivity.kt",
|
||||
"CemuApplication.kt",
|
||||
)
|
||||
|
||||
override fun test(input: JavaClass?): Boolean {
|
||||
return entryPointFiles.any { input?.sourceCodeLocation?.sourceFileName == it }
|
||||
}
|
||||
}
|
||||
|
||||
private val isFromGeneratedCode =
|
||||
object : DescribedPredicate<JavaClass>("is from generated code") {
|
||||
override fun test(input: JavaClass?): Boolean {
|
||||
if (isFromEntryPointCode.test(input)) {
|
||||
return false
|
||||
}
|
||||
|
||||
return input?.packageName == "info.cemu.cemu"
|
||||
|| input?.packageName?.contains("databinding") ?: false
|
||||
}
|
||||
}
|
||||
|
||||
private val isFromTests = resideInAPackage("info.cemu.cemu.tests..")
|
||||
|
||||
private val isFromNativeInterface = resideInAPackage("info.cemu.cemu.nativeinterface..")
|
||||
|
||||
private fun JavaClasses.thatAreFromMainSources() =
|
||||
that(not(or(isFromGeneratedCode, isFromTests)))
|
||||
|
||||
@ArchTest
|
||||
fun `feature packages should not depend on each other`(javaClasses: JavaClasses) {
|
||||
SlicesRuleDefinition.slices().matching("info.cemu.cemu.(*)..")
|
||||
.should().notDependOnEachOther()
|
||||
.ignoreDependency(
|
||||
alwaysTrue(),
|
||||
or(
|
||||
resideInAPackage("info.cemu.cemu.common.."),
|
||||
resideInAPackage("info.cemu.cemu.nativeinterface.."),
|
||||
resideInAPackage("info.cemu.cemu.databinding..")
|
||||
)
|
||||
)
|
||||
.check(javaClasses.thatAreFromMainSources())
|
||||
}
|
||||
|
||||
@ArchTest
|
||||
fun `no packages should depend on entry point code`(javaClasses: JavaClasses) {
|
||||
noClasses().that(not(isFromEntryPointCode))
|
||||
.should().dependOnClassesThat(isFromEntryPointCode)
|
||||
.check(javaClasses.thatAreFromMainSources())
|
||||
}
|
||||
|
||||
@ArchTest
|
||||
fun `native interface should not depend on any other app packages`(javaClasses: JavaClasses) {
|
||||
noClasses().that(isFromNativeInterface)
|
||||
.should().dependOnClassesThat(
|
||||
resideInAPackage("info.cemu.cemu..")
|
||||
.and(not(isFromNativeInterface))
|
||||
)
|
||||
.check(javaClasses.thatAreFromMainSources())
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user