![]() |
EMath++
Classes for mathematical concepts
|
This is the main test file of the emath library. It contains all the tests needed to assure that the library works properly. More...
Go to the source code of this file.
Functions | |
bool | vequal (const std::vector< std::complex< double > > v1, const std::vector< std::complex< double > > v2, bool t) |
Checks if two vectors with std::complex items have the same items, even if not in the same order. | |
int | test_monomial () |
Runs all the monomial class tests. | |
int | test_polynomial () |
Runs all the polynomial class tests. | |
int | main () |
Calls the monomial and polynomial tests. | |
This is the main test file of the emath library. It contains all the tests needed to assure that the library works properly.
This file contains a main function that calls a function for the monomials and a function for the polynomials that test that every method works as it should.
If it doesn't then a message gets printed to the console describing the error. If this does happen open an issue on my github page.
Definition in file emath.cpp.
int main | ( | ) |
Calls the monomial and polynomial tests.
Definition at line 224 of file emath.cpp.
References test_monomial(), and test_polynomial().
int test_monomial | ( | ) |
Runs all the monomial class tests.
Definition at line 28 of file emath.cpp.
References emth::Monomial::get_coeff(), emth::Monomial::get_degree(), emth::Monomial::get_expression(), and emth::Monomial::get_value().
int test_polynomial | ( | ) |
Runs all the polynomial class tests.
Definition at line 115 of file emath.cpp.
References emth::Polynomial::get_degree(), emth::Polynomial::get_derivative(), emth::Polynomial::get_expression(), emth::Polynomial::get_integral(), emth::Polynomial::get_monomials(), emth::Polynomial::get_roots(), emth::Polynomial::get_value(), and vequal().
bool vequal | ( | const std::vector< std::complex< double > > | v1, |
const std::vector< std::complex< double > > | v2, | ||
bool | t | ||
) |
Checks if two vectors with std::complex items have the same items, even if not in the same order.
v1 | First vector to check |
v2 | Second vector to check |
t | If true compares the real parts when sorting, if false compares the imaginary parts |