Difference between revisions of "AssertEqualsExact"

From ApCoCoAWiki
Line 7: Line 7:
  
 
<description>
 
<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.
+
This function checks if the two values 'Result' and 'Expected' are <b>exactly</b> the same. If not it throws an error and prints the errors message.
  
 
<itemize>
 
<itemize>

Revision as of 17:11, 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

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