X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=tests%2Forg.simantics.scl.compiler.tests%2Fsrc%2Forg%2Fsimantics%2Fscl%2Fcompiler%2Ftests%2Fscl%2FEffects1.scl;h=386dbb82bbc6e606f823ea188a725793cc2dad42;hp=11a3303d413bc60ab7cb5b9235d319aaf23445b0;hb=172abed5dbf73c1304a7a95bb8504ea293556948;hpb=06718abb2b3cc780748553811c4857c165499809 diff --git a/tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/Effects1.scl b/tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/Effects1.scl index 11a3303d4..386dbb82b 100644 --- a/tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/Effects1.scl +++ b/tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/Effects1.scl @@ -1,18 +1,18 @@ -import "JavaBuiltin" as Java - -importJava "java.util.regex.Pattern" where - data Pattern - - compile :: String -> Pattern - matcher :: Pattern -> String -> Matcher - -importJava "java.util.regex.Matcher" where - data Matcher - - matches :: Matcher -> Boolean - -doMatch pattern text = matches (matcher pattern text) - -main = doMatch (compile ".*xxx.*") "fffxxooxxxlll" --- +import "JavaBuiltin" as Java + +importJava "java.util.regex.Pattern" where + data Pattern + + compile :: String -> Pattern + matcher :: Pattern -> String -> Matcher + +importJava "java.util.regex.Matcher" where + data Matcher + + matches :: Matcher -> Boolean + +doMatch pattern text = matches (matcher pattern text) + +main = doMatch (compile ".*xxx.*") "fffxxooxxxlll" +-- true \ No newline at end of file