Skip to content

Commit

Permalink
fix refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
wadoon committed Feb 21, 2025
1 parent 53ef6ea commit a81b347
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class ModularizationApp : CliktCommand() {

NUXMV_PATH_DEFAULT = nuxmvPath

val (oldExec, newExec) = IEC61131Facade.readProgramsWLPN(library, listOf(old, new), builtins)
val (oldExec, newExec) = IEC61131Facade.readProgramsWLPN(library, listOf(old, new))
require(oldExec != null) { "Could not find program in $old" }
require(newExec != null) { "Could not find program in $new" }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ class RvtApsApp : CliktCommand( name = "rvt-aps.sh") {
internal fun loadPouExecutable(library: List<File>, file: File, name: String?): PouExecutable {
info("Parse program ${file.absolutePath} with libraries ${library}")
val r = if (name != null)
IEC61131Facade.readProgramsWLN(library, listOf(file), listOf(name), builtins).first()
IEC61131Facade.readProgramsWLN(library, listOf(file), listOf(name)).first()
else
IEC61131Facade.readProgramsWLP(library, listOf(file)).first()
if (r == null) {
Expand Down
9 changes: 0 additions & 9 deletions stvs/src/test/kotlin/edu/kit/iti/formal/stvs/TestUtils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,4 @@ object TestUtils {
autoloadConfig().nuxmvFilename
)
}

fun assumeGetetaExists() {
val toks = autoloadConfig().getetaCommand
.split(" ".toRegex()).dropLastWhile { it.isEmpty() }.toTypedArray()
assumeFileExists(
"The geteta command is not set or a non-existing file. Tests are skipped!",
toks[0]
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,10 @@ class XmlConfigImporterTest {
fun testDoImport() {
val inputStream = XmlConfigImporter::class.java.getResourceAsStream("config_valid_nodeps.xml")!!
val config: GlobalConfig = importer.doImport(inputStream)
Assertions.assertEquals("EN", config.uiLanguage)
Assertions.assertEquals(100, config.verificationTimeout)
Assertions.assertEquals(100, config.simulationTimeout)
Assertions.assertEquals("Comic Sans", config.editorFontFamily)
Assertions.assertEquals(12, config.editorFontSize.toLong())
Assertions.assertEquals(true, config.showLineNumbers)
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ class VerificationScenarioTest {
@Throws(URISyntaxException::class, IOException::class, ImportException::class)
fun setUp() {
TestUtils.assumeNuXmvExists()
TestUtils.assumeGetetaExists()

scenario = VerificationScenario()
code = importStCode(File(StvsApplication::class.java.getResource("testSets/valid_1/code_valid_1.st")!!.toURI()))
constraintSpec = ImporterFacade.importConstraintSpec(
Expand Down

0 comments on commit a81b347

Please sign in to comment.