user_guide:extend:unit_tests

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
user_guide:extend:unit_tests [2021/04/21 23:07] – [Testing core library C++ components] gawrilowuser_guide:extend:unit_tests [2023/05/17 12:13] (current) – Typo lkastner
Line 68: Line 68:
   compare_values('ID', expected, expression);   compare_values('ID', expected, expression);
  
-Test is succeeded if //expected// and //expression// are of same type and have equal values.  For C++ objects, the overloaded operator == is used.  String values are compared with operator ''eq'' .  polymake `big' objects may not be tested this way; use ''compare_objects'' as described below.+Test is succeeded if //expected// and //expression// are of same type and have equal values.  For C++ objects, the overloaded operator == is used.  String values are compared with operator ''eq'' .  polymake `big' objects may not be tested this way; use ''compare_object'' as described below.
  
 **Caution:** if you want to compare values of different type, e.g. a Rational result of expression with an integral constant, you must either create the expected value of a proper type: **Caution:** if you want to compare values of different type, e.g. a Rational result of expression with an integral constant, you must either create the expected value of a proper type:
  • user_guide/extend/unit_tests.txt
  • Last modified: 2023/05/17 12:13
  • by lkastner