Resolved #8387 - Fixed Reliquary belief

Got rid of multiple uniques with the same text
This commit is contained in:
Yair Morgenstern
2023-01-16 13:05:11 +02:00
parent fe1d258c05
commit 879a5b230f
6 changed files with 23 additions and 23 deletions

View File

@ -1,6 +1,7 @@
package com.unciv.uniques
import com.unciv.models.ruleset.RulesetCache
import com.unciv.models.ruleset.unique.UniqueType
import com.unciv.testing.GdxTestRunner
import org.junit.Test
import org.junit.runner.RunWith
@ -8,6 +9,20 @@ import org.junit.runner.RunWith
@RunWith(GdxTestRunner::class)
class UniqueErrorTests {
@Test
fun testMultipleUniqueTypesSameText(){
val textToUniqueType = HashMap<String, UniqueType>()
var errors = false
for (uniqueType in UniqueType.values()){
if (textToUniqueType.containsKey(uniqueType.placeholderText)){
println("UniqueTypes ${uniqueType.name} and ${textToUniqueType[uniqueType.placeholderText]!!.name} have the same text!")
errors = true
}
else textToUniqueType[uniqueType.placeholderText] = uniqueType
}
assert(!errors)
}
@Test
fun testCodependantTechs() {
RulesetCache.loadRulesets()