This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |
user_guide:extend:unit_tests [2021/04/21 23:07] – [Testing core library C++ components] gawrilow | user_guide:extend:unit_tests [2023/05/17 12:13] (current) – Typo lkastner |
---|
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: |