Skip to content

Commit

Permalink
[docs] Disable Jnario execution.
Browse files Browse the repository at this point in the history
see #478

Signed-off-by: Stéphane Galland <galland@arakhne.org>
  • Loading branch information
gallandarakhneorg committed Sep 12, 2016
1 parent 3ea7b12 commit bf9c7b3
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 12 deletions.
2 changes: 2 additions & 0 deletions docs/io.sarl.docs.suite/pom.xml
Expand Up @@ -253,6 +253,7 @@
</configuration>
</plugin>

<!--
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
Expand All @@ -267,6 +268,7 @@
<argLine>-Xms256M -Xmx768M -XX:+CMSClassUnloadingEnabled</argLine>
</configuration>
</plugin>
-->

<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down
Expand Up @@ -41,23 +41,51 @@ describe "SARL Syntax FAQ" {
* When a decimal point is written in the literal,
* the fractional part and the mantissa part must
* be specify also, even if these parts are equal
* to zero.
* to zero. Consequently: <ul>
* <li>`123.0` is correct; </li>
* <li>`123.` is incorrect; </li>
* <li>`0.123` is correct; </li>
* <li>`.123` is incorrect; </li>
* </ul>
*
* @filter(.* = '''|'''|.parseWithError.*)
* @filter(.*)
*/
fact "Can I use the same syntax as in Java for number literals?" {
'''
var a = 123.0 // Correct syntax
var b = 123. // Incorrect syntax
var c = 0.123 // Correct syntax
var d = .123 // Incorrect syntax
'''.parseWithError(
"package io.sarl.docs.faq.syntax
''' package io.sarl.docs.faq.syntax
agent A {
def action : double {",
// TEXT
"} }"
)
var a = 123.0
return a
}
}
'''.parseSuccessfully

''' package io.sarl.docs.faq.syntax
agent A {
def action : double {",
var a = 0.123
return a
}
}
'''.parseSuccessfully

''' package io.sarl.docs.faq.syntax
agent A {
def action : double {",
var a = 123.
return a
}
}
'''.parseWithError

''' package io.sarl.docs.faq.syntax
agent A {
def action : double {",
var a = .123
return a
}
}
'''.parseWithError
}

/* It is not allowed to put a SARL keyword, such as
Expand Down

0 comments on commit bf9c7b3

Please sign in to comment.