File tree Expand file tree Collapse file tree 3 files changed +7
-6
lines changed Expand file tree Collapse file tree 3 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ package constraintnettests
22
33import io.github.tukcps.aadd.IDD
44import com.github.tukcps.sysmd.cspsolver.propagate
5+ import com.github.tukcps.sysmd.exceptions.Issue
56import com.github.tukcps.sysmd.model.kerml.Feature
67import com.github.tukcps.sysmd.services.initialize
78import com.github.tukcps.sysmd.services.resolve.resolve
@@ -377,7 +378,7 @@ class FunctionsTests {
377378 """ )
378379 propagate()
379380 assertEquals(1 , status.issues.size, " Issues: ${status.issues} " )
380- assertTrue( " dependency of b is not satisfiable in element b " in status.issues.first().message )
381+ assertEquals( Issue . Kind . WARN_INCONSISTENCY , status.issues.firstOrNull()?.kind )
381382 }
382383
383384 /* * ConstNet shall compute bottom-up with sqrt in int and model.builder.range */
Original file line number Diff line number Diff line change 11package quantitytests
22
33import com.github.tukcps.sysmd.cspsolver.propagate
4+ import com.github.tukcps.sysmd.exceptions.Issue
45import com.github.tukcps.sysmd.services.resolve.resolveVar
56import util.mockup.loadKerML
67import util.testSession
@@ -964,11 +965,10 @@ class QuantityTestDimensions {
964965 fun defineDimensionTestWrongUnit () = testSession(" SI" ) {
965966 loadKerML("""
966967 feature Mass: SI::Mass = 10.0 [m];
967- """
968- )
968+ """ )
969969 propagate()
970970 assertEquals(1 , status.issues.size)
971- assertEquals(" Unit of Mass (kg) does not match the unit of the dependency (m) in element Mass " , status.issues.elementAt(0 ).message )
971+ assertEquals(Issue . Kind . WARN_INCONSISTENCY , status.issues.elementAt(0 ).kind )
972972 }
973973
974974}
Original file line number Diff line number Diff line change @@ -540,15 +540,15 @@ class InheritanceTests {
540540 }
541541
542542
543- @Test fun realConstraintTest () = testSession(" ScalarValues " ) {
543+ @Test fun realConstraintTest () = testSession(" Occurrences " ) {
544544 loadKerML("""
545545 package Test {
546546 class m { feature v: ScalarValues::Real(1..5); }
547547 class n :> m {feature v: ScalarValues::Real(6..6); }
548548 }
549549 """ )
550550 // The inconsistency / violation of Liskov Principle must be reported.
551- assertEquals(status.issues.firstOrNull()?.kind, Issue . Kind . WARN )
551+ assertEquals(Issue . Kind . WARN_INCONSISTENCY , status.issues.firstOrNull()?.kind)
552552 }
553553
554554 @Test fun realConstraintTest2 () = testSession(" ScalarValues" ) {
You can’t perform that action at this time.
0 commit comments