Difference between revisions of "AssertEqualsExact"

From ApCoCoAWiki
(New page: <command> <title>AssertEqualsExact</title> <short_description>Checks if two values are exactly the same.</short_description> <syntax> $apcocoa/ts/assert.AssertEqualsExact(Result: TYPE, Exp...)
 
Line 10: Line 10:
  
 
<itemize>
 
<itemize>
<item>@param <em>Condition</em>: Boolean value of a condition</item>
+
<item>@param <em>Result</em>: The result of a computation</item>
 +
<item>@param <em>Expected</em>: The expected value of a computation</item>
 
<item>@param <em>ErrMsg</em>: Error message</item>
 
<item>@param <em>ErrMsg</em>: Error message</item>
 
</itemize>
 
</itemize>

Revision as of 17:10, 22 June 2010

AssertEqualsExact

Checks if two values are exactly the same.

Syntax

$apcocoa/ts/assert.AssertEqualsExact(Result: TYPE, Expected: TYPE, ErrMsg: STRING)

Description

This function checks if the two values 'Result' and 'Expected' are exactly the same. If not it throws an error and prints the errors message.

  • @param Result: The result of a computation

  • @param Expected: The expected value of a computation

  • @param ErrMsg: Error message

Example

F:=x^2+x+1;
G:=x-1;
$apcocoa/ts/assert.AssertTrue(F,G, "F does not equal G.");