Skip to content

Commit

Permalink
[fix] Fix bug in ExampesTest on testNoGitDiff
Browse files Browse the repository at this point in the history
testNoGittDiff always returned true because of wrong file separator

Signed-off-by: Marie-Pierre Oudot <[email protected]>
  • Loading branch information
mpoudot committed Oct 4, 2022
1 parent 04bd7f3 commit 186c1f8
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,9 @@ import org.apache.commons.io.FileUtils
import org.junit.Assert

import static fr.cea.nabla.tests.TestUtils.*
import java.util.regex.Pattern

abstract class GenerateAndExecuteTestBase
{
final static String separatorPattern = Pattern.quote(File.separator);
final static String WsPath = Files.createTempDirectory("nablabtest-compiler-").toString
final static String LeveldbENV = "leveldb_ROOT"
final static String KokkosENV = "Kokkos_ROOT"
Expand Down Expand Up @@ -80,7 +78,7 @@ abstract class GenerateAndExecuteTestBase
models += readFileAsString(Paths.get(GenerateAndExecuteTestBase.projectAbsolutePath, "src", packageName, nFileName + ".n").toString)
var genmodel = readFileAsString(Paths.get(GenerateAndExecuteTestBase.projectAbsolutePath, "src", packageName, ngenFileName + ".ngen").toString)
compilationHelper.generateCode(models, genmodel, GenerateAndExecuteTestBase.projectAbsolutePath.replace(File.separator + projectName, ''), projectName)
testNoGitDiff(separatorPattern + packageName) // Add a separator to avoid a false positiv on explicitheatequation fail or implicitheatequation
testNoGitDiff(File.separator + packageName) // Add a separator to avoid a false positiv on explicitheatequation fail or implicitheatequation
}

protected def testExecuteModule(String moduleName)
Expand Down

0 comments on commit 186c1f8

Please sign in to comment.