![JAR search and dependency download from the Maven repository](/logo.png)
FitNesseRoot.Fitnesse.UserGuide.WritingAcceptanceTests.SliM.ValueComparisons.content.txt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of smartrics-RestFixture-LiveDoc Show documentation
Show all versions of smartrics-RestFixture-LiveDoc Show documentation
FitNesse tests documenting the RestFixture
!3 Numerical Comparisons
You can use relational comparisons for the numeric values in your table cells.
|DT:Some Decision Table|
|input|output?|
|3|<5|
|5|>=3|
|8|3<_<9|
You can use all the normal operators: <, >, <=, >=, !=.
The ''~='' relational operator means ''approximately equal''. It applies to floating point numbers. So if ''~=3.0'' then the ''3.0'' sets the precision so that 2.95 or 3.049 will both show equality. It is the number of decimals on the right side of the operator that determines the precision.
So 2.5~=3 but 2.5 is not ~= 3.0.
!3 Regular Expression Comparisons
You can match regular expressions by using the syntax =~/''regex''/. For example:
|check|echo|Bob|=~/Bob/|
|check|echo|My name is Bob."|=~/B.b/|
The regular expression syntax is the '''Java''' standard.
© 2015 - 2025 Weber Informatics LLC | Privacy Policy