mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-19 20:28:56 +07:00
Resolved #8387 - Fixed Reliquary belief
Got rid of multiple uniques with the same text
This commit is contained in:
@ -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()
|
||||
|
Reference in New Issue
Block a user