Added check for deprecated uniques referencing other deprecated uniques (can happen if we replace uniques in quick succession and we forget to modify the older deprecated unique when we introduce the new one)

This commit is contained in:
Yair Morgenstern
2022-02-02 11:25:35 +02:00
parent 483a8eab1a
commit f217ce7055

View File

@ -134,6 +134,10 @@ class BasicTests {
println("${uniqueType.name}'s deprecation text does not match any existing type!'")
allOK = false
}
if (replacementTextUnique.getDeprecationAnnotation() != null){
println("${uniqueType.name}'s deprecation text references another deprecated unique!'")
allOK = false
}
for (conditional in replacementTextUnique.conditionals){
if (conditional.type==null){
println("${uniqueType.name}'s deprecation text contains conditional \"${conditional.text}\" which does not match any existing type!'")
@ -141,7 +145,7 @@ class BasicTests {
}
}
}
Assert.assertTrue("This test succeeds only if all UniqueTypes have at least one UniqueTarget", allOK)
Assert.assertTrue("This test succeeds only if all deprecated uniques have a replaceWith text that matches an existing type", allOK)
}
//@Test // commented so github doesn't run this