From b5e45d59bb2278374bb250a747036eb830b888df Mon Sep 17 00:00:00 2001 From: fintarin Date: Sat, 6 Apr 2024 09:22:02 +0400 Subject: [PATCH] Make MathObjectClass similar to reference_wrapper --- include/fintamath/core/MathObjectBody.hpp | 15 ++++---- include/fintamath/core/MathObjectClass.hpp | 34 +++++++++---------- include/fintamath/core/MathObjectUtils.hpp | 2 +- src/fintamath/core/MathObjectClass.cpp | 22 ++++++------ tests/src/core/IArithmeticTests.cpp | 2 +- tests/src/core/IComparableTests.cpp | 2 +- tests/src/core/IMathObjectTests.cpp | 4 +-- tests/src/core/MathObjectClassTests.cpp | 31 ++++++++++++----- tests/src/expressions/ExpressionTests.cpp | 2 +- .../expressions/FunctionExpressionTests.cpp | 2 +- tests/src/expressions/IExpressionTests.cpp | 2 +- .../src/expressions/binary/CompExprTests.cpp | 2 +- .../binary/DerivativeExprTests.cpp | 2 +- tests/src/expressions/binary/DivExprTests.cpp | 2 +- .../expressions/binary/IntegralExprTests.cpp | 2 +- tests/src/expressions/binary/LogExprTests.cpp | 2 +- tests/src/expressions/binary/PowExprTests.cpp | 2 +- .../interfaces/IBinaryExpressionTests.cpp | 2 +- .../interfaces/IPolynomExpressionTests.cpp | 2 +- .../interfaces/IUnaryExpressionTests.cpp | 2 +- .../expressions/polynomial/AddExprTests.cpp | 2 +- .../expressions/polynomial/AndExprTests.cpp | 2 +- .../polynomial/MinMaxExprTests.cpp | 2 +- .../expressions/polynomial/MulExprTests.cpp | 2 +- .../expressions/polynomial/OrExprTests.cpp | 2 +- tests/src/expressions/unary/AbsExprTests.cpp | 2 +- .../expressions/unary/FloorCeilExprTests.cpp | 2 +- .../src/expressions/unary/HyperbExprTests.cpp | 2 +- .../expressions/unary/InvHyperbExprTests.cpp | 2 +- .../expressions/unary/InvTrigExprTests.cpp | 2 +- tests/src/expressions/unary/NotExprTests.cpp | 2 +- tests/src/expressions/unary/SignExprTests.cpp | 2 +- tests/src/expressions/unary/TrigExprTests.cpp | 2 +- tests/src/functions/IFunctionTests.cpp | 2 +- tests/src/functions/IOperatorTests.cpp | 2 +- tests/src/functions/arithmetic/AbsTests.cpp | 2 +- tests/src/functions/arithmetic/AddTests.cpp | 2 +- tests/src/functions/arithmetic/DivTests.cpp | 2 +- .../functions/arithmetic/FracMixedTests.cpp | 2 +- tests/src/functions/arithmetic/FracTests.cpp | 2 +- tests/src/functions/arithmetic/MulTests.cpp | 2 +- tests/src/functions/arithmetic/NegTests.cpp | 2 +- tests/src/functions/arithmetic/SignTests.cpp | 2 +- tests/src/functions/arithmetic/SubTests.cpp | 2 +- .../functions/arithmetic/UnaryPlusTests.cpp | 2 +- .../functions/calculus/DerivativeTests.cpp | 2 +- .../src/functions/calculus/IntegralTests.cpp | 2 +- tests/src/functions/calculus/MaxTests.cpp | 2 +- tests/src/functions/calculus/MinTests.cpp | 2 +- tests/src/functions/comparison/EqvTests.cpp | 2 +- .../src/functions/comparison/LessEqvTests.cpp | 2 +- tests/src/functions/comparison/LessTests.cpp | 2 +- .../src/functions/comparison/MoreEqvTests.cpp | 2 +- tests/src/functions/comparison/MoreTests.cpp | 2 +- tests/src/functions/comparison/NeqvTests.cpp | 2 +- tests/src/functions/hyperbolic/AcoshTests.cpp | 2 +- tests/src/functions/hyperbolic/AcothTests.cpp | 2 +- tests/src/functions/hyperbolic/AcschTests.cpp | 2 +- tests/src/functions/hyperbolic/AsechTests.cpp | 2 +- tests/src/functions/hyperbolic/AsinhTests.cpp | 2 +- tests/src/functions/hyperbolic/AtanhTests.cpp | 2 +- tests/src/functions/hyperbolic/CoshTests.cpp | 2 +- tests/src/functions/hyperbolic/CothTests.cpp | 2 +- tests/src/functions/hyperbolic/CschTests.cpp | 2 +- tests/src/functions/hyperbolic/SechTests.cpp | 2 +- tests/src/functions/hyperbolic/SinhTests.cpp | 2 +- tests/src/functions/hyperbolic/TanhTests.cpp | 2 +- tests/src/functions/logarithms/LbTests.cpp | 2 +- tests/src/functions/logarithms/LgTests.cpp | 2 +- tests/src/functions/logarithms/LnTests.cpp | 2 +- tests/src/functions/logarithms/LogTests.cpp | 2 +- tests/src/functions/logic/AndTests.cpp | 2 +- tests/src/functions/logic/EquivTests.cpp | 2 +- tests/src/functions/logic/ImplTests.cpp | 2 +- tests/src/functions/logic/NequivTests.cpp | 2 +- tests/src/functions/logic/NotTests.cpp | 2 +- tests/src/functions/logic/OrTests.cpp | 2 +- tests/src/functions/ntheory/CeilTests.cpp | 2 +- tests/src/functions/ntheory/FloorTests.cpp | 2 +- tests/src/functions/ntheory/ModTests.cpp | 2 +- tests/src/functions/other/CommaTests.cpp | 2 +- tests/src/functions/other/DegTests.cpp | 2 +- tests/src/functions/other/FactorialTests.cpp | 2 +- tests/src/functions/other/IndexTests.cpp | 2 +- tests/src/functions/other/PercentTests.cpp | 2 +- tests/src/functions/powers/ExpTests.cpp | 2 +- .../src/functions/powers/PowFunctionTests.cpp | 2 +- tests/src/functions/powers/PowTests.cpp | 2 +- tests/src/functions/powers/RootTests.cpp | 2 +- tests/src/functions/powers/SqrTests.cpp | 2 +- tests/src/functions/powers/SqrtTests.cpp | 2 +- .../src/functions/trigonometry/AcosTests.cpp | 2 +- .../src/functions/trigonometry/AcotTests.cpp | 2 +- .../src/functions/trigonometry/AcscTests.cpp | 2 +- .../src/functions/trigonometry/AsecTests.cpp | 2 +- .../src/functions/trigonometry/AsinTests.cpp | 2 +- .../src/functions/trigonometry/AtanTests.cpp | 2 +- tests/src/functions/trigonometry/CosTests.cpp | 2 +- tests/src/functions/trigonometry/CotTests.cpp | 2 +- tests/src/functions/trigonometry/CscTests.cpp | 2 +- tests/src/functions/trigonometry/SecTests.cpp | 2 +- tests/src/functions/trigonometry/SinTests.cpp | 2 +- tests/src/functions/trigonometry/TanTests.cpp | 2 +- tests/src/literals/BooleanTests.cpp | 2 +- tests/src/literals/ILiteralTests.cpp | 2 +- tests/src/literals/VariableTests.cpp | 2 +- .../literals/constants/ComplexInfTests.cpp | 2 +- tests/src/literals/constants/ETests.cpp | 2 +- tests/src/literals/constants/FalseTests.cpp | 2 +- .../src/literals/constants/IConstantTests.cpp | 2 +- tests/src/literals/constants/ITests.cpp | 2 +- tests/src/literals/constants/InfTests.cpp | 2 +- tests/src/literals/constants/NegInfTests.cpp | 2 +- tests/src/literals/constants/PiTests.cpp | 2 +- tests/src/literals/constants/TrueTests.cpp | 2 +- .../src/literals/constants/UndefinedTests.cpp | 2 +- tests/src/numbers/ComplexTests.cpp | 4 +-- tests/src/numbers/IIntegerTests.cpp | 2 +- tests/src/numbers/INumberTests.cpp | 2 +- tests/src/numbers/IntegerTests.cpp | 2 +- tests/src/numbers/RationalTests.cpp | 4 +-- tests/src/numbers/RealTests.cpp | 4 +-- 122 files changed, 179 insertions(+), 167 deletions(-) diff --git a/include/fintamath/core/MathObjectBody.hpp b/include/fintamath/core/MathObjectBody.hpp index 8918b4b83..3d559b2f2 100644 --- a/include/fintamath/core/MathObjectBody.hpp +++ b/include/fintamath/core/MathObjectBody.hpp @@ -5,13 +5,14 @@ #include "fintamath/core/MathObjectClass.hpp" #include "fintamath/core/Parser.hpp" -#define FINTAMATH_CLASS_BODY(Class) \ -public: \ - static constexpr MathObjectClass getClassStatic() { \ - return {#Class}; \ - } \ - \ -private: +#define FINTAMATH_CLASS_BODY(Class) \ +public: \ + static constexpr MathObjectClass getClassStatic() noexcept { \ + return className; \ + } \ + \ +private: \ + static constexpr MathObjectClass::Name className = #Class; #define FINTAMATH_PARENT_CLASS_BODY(Class) \ FINTAMATH_CLASS_BODY(Class) \ diff --git a/include/fintamath/core/MathObjectClass.hpp b/include/fintamath/core/MathObjectClass.hpp index cbbb233c3..3090232f8 100644 --- a/include/fintamath/core/MathObjectClass.hpp +++ b/include/fintamath/core/MathObjectClass.hpp @@ -38,39 +38,37 @@ class MathObjectClass final { using ParentToChildrenMap = std::unordered_map; public: - constexpr MathObjectClass(const Name inName) : name(inName) { + constexpr MathObjectClass(const Name &inName) noexcept : name(&inName) { } - constexpr Name getName() const { - return name; + constexpr const Name &getName() const noexcept { + return *name; } - constexpr bool operator==(const MathObjectClass rhs) const { - return name == rhs.name; - } + constexpr bool operator==(const MathObjectClass &rhs) const noexcept = default; - std::strong_ordering operator<=>(MathObjectClass rhs) const; + std::strong_ordering operator<=>(const MathObjectClass &rhs) const noexcept; - std::optional getParent() const; + std::optional getParent() const noexcept; - const Children &getChildren(bool recursive = false) const; + const Children &getChildren(bool recursive = false) const noexcept; template Child> - static void bindTypes(); + static void bindTypes() noexcept; private: - Id getId() const; + Id getId() const noexcept; - static ClassToIdMap &getClassToIdMap(); + static ClassToIdMap &getClassToIdMap() noexcept; - static ChildToParentMap &getChildToParentMap(); + static ChildToParentMap &getChildToParentMap() noexcept; - static ParentToChildrenMap &getParentToChildrenMap(); + static ParentToChildrenMap &getParentToChildrenMap() noexcept; - static ParentToChildrenMap &getParentToRecursiveChildrenMap(); + static ParentToChildrenMap &getParentToRecursiveChildrenMap() noexcept; private: - Name name; + const Name *name; inline static Id maxId = 0; @@ -78,7 +76,7 @@ class MathObjectClass final { }; template Child> -void MathObjectClass::bindTypes() { +void MathObjectClass::bindTypes() noexcept { MathObjectClass parent = Parent::getClassStatic(); MathObjectClass child = Child::getClassStatic(); @@ -98,5 +96,5 @@ void MathObjectClass::bindTypes() { } inline size_t std::hash::operator()(const fintamath::MathObjectClass &rhs) const noexcept { - return std::hash{}(rhs.getName()); + return std::hash{}(&rhs.getName()); } diff --git a/include/fintamath/core/MathObjectUtils.hpp b/include/fintamath/core/MathObjectUtils.hpp index 2fcd49c96..44cbd435d 100644 --- a/include/fintamath/core/MathObjectUtils.hpp +++ b/include/fintamath/core/MathObjectUtils.hpp @@ -11,7 +11,7 @@ namespace fintamath { class IMathObject; -inline bool is(const MathObjectClass to, const MathObjectClass from) { +inline bool is(const MathObjectClass &to, const MathObjectClass &from) { return to == from || to.getChildren(true).contains(from); } diff --git a/src/fintamath/core/MathObjectClass.cpp b/src/fintamath/core/MathObjectClass.cpp index eb073ac6f..f060d0b19 100644 --- a/src/fintamath/core/MathObjectClass.cpp +++ b/src/fintamath/core/MathObjectClass.cpp @@ -2,7 +2,7 @@ namespace fintamath { -std::strong_ordering MathObjectClass::operator<=>(const MathObjectClass rhs) const { +std::strong_ordering MathObjectClass::operator<=>(const MathObjectClass &rhs) const noexcept { const Id lhsId = getId(); const Id rhsId = rhs.getId(); @@ -11,40 +11,40 @@ std::strong_ordering MathObjectClass::operator<=>(const MathObjectClass rhs) con : name <=> rhs.name; } -std::optional MathObjectClass::getParent() const { - const auto iter = getChildToParentMap().find(name); +std::optional MathObjectClass::getParent() const noexcept { + const auto iter = getChildToParentMap().find(*name); return iter != getChildToParentMap().end() ? iter->second : std::optional{}; } -const MathObjectClass::Children &MathObjectClass::getChildren(const bool recursive) const { +const MathObjectClass::Children &MathObjectClass::getChildren(const bool recursive) const noexcept { if (recursive) { - return getParentToRecursiveChildrenMap()[name]; + return getParentToRecursiveChildrenMap()[*name]; } - return getParentToChildrenMap()[name]; + return getParentToChildrenMap()[*name]; } -MathObjectClass::Id MathObjectClass::getId() const { +MathObjectClass::Id MathObjectClass::getId() const noexcept { const auto classToId = getClassToIdMap().find(*this); return classToId != getClassToIdMap().end() ? classToId->second : 0; } -MathObjectClass::ClassToIdMap &MathObjectClass::getClassToIdMap() { +MathObjectClass::ClassToIdMap &MathObjectClass::getClassToIdMap() noexcept { static ClassToIdMap map; return map; } -MathObjectClass::ChildToParentMap &MathObjectClass::getChildToParentMap() { +MathObjectClass::ChildToParentMap &MathObjectClass::getChildToParentMap() noexcept { static ChildToParentMap map; return map; } -MathObjectClass::ParentToChildrenMap &MathObjectClass::getParentToChildrenMap() { +MathObjectClass::ParentToChildrenMap &MathObjectClass::getParentToChildrenMap() noexcept { static ParentToChildrenMap map; return map; } -MathObjectClass::ParentToChildrenMap &MathObjectClass::getParentToRecursiveChildrenMap() { +MathObjectClass::ParentToChildrenMap &MathObjectClass::getParentToRecursiveChildrenMap() noexcept { static ParentToChildrenMap map; return map; } diff --git a/tests/src/core/IArithmeticTests.cpp b/tests/src/core/IArithmeticTests.cpp index 7f7b948ca..1c4c2daf3 100644 --- a/tests/src/core/IArithmeticTests.cpp +++ b/tests/src/core/IArithmeticTests.cpp @@ -206,6 +206,6 @@ TEST(IArithmeticTests, negateTest) { } TEST(IArithmeticTests, getClassTest) { - EXPECT_EQ(IArithmetic::getClassStatic(), MathObjectClass("IArithmetic")); + EXPECT_EQ(IArithmetic::getClassStatic().getName(), "IArithmetic"); EXPECT_EQ(IArithmetic::getClassStatic().getParent(), IMathObject::getClassStatic()); } diff --git a/tests/src/core/IComparableTests.cpp b/tests/src/core/IComparableTests.cpp index c9290aa6f..9c7847ed7 100644 --- a/tests/src/core/IComparableTests.cpp +++ b/tests/src/core/IComparableTests.cpp @@ -151,6 +151,6 @@ TEST(IComparableTests, moreEqualsTest) { } TEST(IComparableTests, getClassTest) { - EXPECT_EQ(IComparable::getClassStatic(), MathObjectClass("IComparable")); + EXPECT_EQ(IComparable::getClassStatic().getName(), "IComparable"); EXPECT_EQ(IComparable::getClassStatic().getParent(), IArithmetic::getClassStatic()); } diff --git a/tests/src/core/IMathObjectTests.cpp b/tests/src/core/IMathObjectTests.cpp index 35d24f007..a8389da6b 100644 --- a/tests/src/core/IMathObjectTests.cpp +++ b/tests/src/core/IMathObjectTests.cpp @@ -110,9 +110,9 @@ TEST(IMathObjectTests, outputTest) { } TEST(IMathObjectTests, getClassTest) { - EXPECT_EQ(IMathObject::getClassStatic(), MathObjectClass("IMathObject")); + EXPECT_EQ(IMathObject::getClassStatic().getName(), "IMathObject"); EXPECT_FALSE(IMathObject::getClassStatic().getParent()); - EXPECT_EQ(TestMathObject().getClass(), MathObjectClass("TestMathObject")); + EXPECT_EQ(TestMathObject().getClass().getName(), "TestMathObject"); EXPECT_EQ(TestMathObject().getClass().getParent(), IMathObject::getClassStatic()); } diff --git a/tests/src/core/MathObjectClassTests.cpp b/tests/src/core/MathObjectClassTests.cpp index 0aea487f5..737546614 100644 --- a/tests/src/core/MathObjectClassTests.cpp +++ b/tests/src/core/MathObjectClassTests.cpp @@ -50,16 +50,18 @@ class OtherChildTest : public IParentTest2 { return 0; }(); +static constexpr std::string_view testClassName = "Test"; + } TEST(MathObjectClassTests, constructorTest) { { - constexpr MathObjectClass t("Test"); - EXPECT_EQ(t.getName(), "Test"); + constexpr MathObjectClass t(testClassName); + EXPECT_EQ(t.getName(), testClassName); } { - MathObjectClass t("Test"); - EXPECT_EQ(t.getName(), "Test"); + MathObjectClass t(testClassName); + EXPECT_EQ(t.getName(), testClassName); } } @@ -80,7 +82,7 @@ TEST(MathObjectClassTests, getNameTest) { } TEST(MathObjectClassTests, getParentTest) { - EXPECT_FALSE(MathObjectClass("Test").getParent()); + EXPECT_FALSE(MathObjectClass(testClassName).getParent()); EXPECT_FALSE(ISuperParentTest::getClassStatic().getParent()); @@ -93,7 +95,7 @@ TEST(MathObjectClassTests, getParentTest) { } TEST(MathObjectClassTests, getChildrenTest) { - EXPECT_EQ(MathObjectClass("Test").getChildren().size(), 0); + EXPECT_EQ(MathObjectClass(testClassName).getChildren().size(), 0); EXPECT_EQ(ISuperParentTest::getClassStatic().getChildren().size(), 2); @@ -106,7 +108,7 @@ TEST(MathObjectClassTests, getChildrenTest) { } TEST(MathObjectClassTests, getChildrenRecursiveTest) { - EXPECT_EQ(MathObjectClass("Test").getChildren(true).size(), 0); + EXPECT_EQ(MathObjectClass(testClassName).getChildren(true).size(), 0); EXPECT_EQ(ISuperParentTest::getClassStatic().getChildren(true).size(), 5); @@ -127,6 +129,17 @@ TEST(MathObjectClassTests, bindTypesTest) { } TEST(MathObjectClassTests, hashTest) { - EXPECT_EQ(std::hash{}(MathObjectClass("Test")), - std::hash{}("Test")); + EXPECT_EQ(std::hash{}(MathObjectClass(testClassName)), + std::hash{}(MathObjectClass(testClassName))); + EXPECT_NE(std::hash{}(MathObjectClass(testClassName)), + std::hash{}(IParentTest1::getClassStatic())); + EXPECT_NE(std::hash{}(IParentTest2::getClassStatic()), + std::hash{}(MathObjectClass(testClassName))); + + EXPECT_EQ(std::hash{}(ChildTest1::getClassStatic()), + std::hash{}(ChildTest1::getClassStatic())); + EXPECT_NE(std::hash{}(ChildTest1::getClassStatic()), + std::hash{}(IParentTest1::getClassStatic())); + EXPECT_NE(std::hash{}(IParentTest2::getClassStatic()), + std::hash{}(ChildTest1::getClassStatic())); } diff --git a/tests/src/expressions/ExpressionTests.cpp b/tests/src/expressions/ExpressionTests.cpp index 0fba33d51..d1fe1aaf3 100644 --- a/tests/src/expressions/ExpressionTests.cpp +++ b/tests/src/expressions/ExpressionTests.cpp @@ -98,6 +98,6 @@ TEST(ExpressionTests, equalsTest) { } TEST(ExpressionTests, getClassTest) { - EXPECT_EQ(Expression().getClass(), MathObjectClass("Expression")); + EXPECT_EQ(Expression().getClass().getName(), "Expression"); EXPECT_EQ(Expression().getClassStatic().getParent(), IExpression::getClassStatic()); } diff --git a/tests/src/expressions/FunctionExpressionTests.cpp b/tests/src/expressions/FunctionExpressionTests.cpp index b64ced571..4598d0a82 100644 --- a/tests/src/expressions/FunctionExpressionTests.cpp +++ b/tests/src/expressions/FunctionExpressionTests.cpp @@ -127,6 +127,6 @@ TEST(FunctionExpressionTests, stringConstructorTest) { TEST(FunctionExpressionTests, getClassTest) { auto expr = makeExpr(TestBinaryOperator(), Integer(0), Integer(0)); - EXPECT_EQ(expr->getClass(), MathObjectClass("FunctionExpression")); + EXPECT_EQ(expr->getClass().getName(), "FunctionExpression"); EXPECT_EQ(expr->getClass().getParent(), IExpression::getClassStatic()); } diff --git a/tests/src/expressions/IExpressionTests.cpp b/tests/src/expressions/IExpressionTests.cpp index 66651c2cf..c110e3a1c 100644 --- a/tests/src/expressions/IExpressionTests.cpp +++ b/tests/src/expressions/IExpressionTests.cpp @@ -103,6 +103,6 @@ TEST(IExpressionTests, toMinimalObjectTest) { } TEST(IExpressionTests, getClassTest) { - EXPECT_EQ(IExpression::getClassStatic(), MathObjectClass("IExpression")); + EXPECT_EQ(IExpression::getClassStatic().getName(), "IExpression"); EXPECT_EQ(IExpression::getClassStatic().getParent(), IMathObject::getClassStatic()); } diff --git a/tests/src/expressions/binary/CompExprTests.cpp b/tests/src/expressions/binary/CompExprTests.cpp index 0ef05a2e7..c20cc2d29 100644 --- a/tests/src/expressions/binary/CompExprTests.cpp +++ b/tests/src/expressions/binary/CompExprTests.cpp @@ -10,6 +10,6 @@ using namespace fintamath; TEST(CompExprTests, getClassTest) { const auto expr = eqvExpr(Integer(0), Integer(0)); - EXPECT_EQ(expr->getClass(), MathObjectClass("CompExpr")); + EXPECT_EQ(expr->getClass().getName(), "CompExpr"); EXPECT_EQ(expr->getClass().getParent(), IBinaryExpression::getClassStatic()); } diff --git a/tests/src/expressions/binary/DerivativeExprTests.cpp b/tests/src/expressions/binary/DerivativeExprTests.cpp index d5594f7dc..36619a161 100644 --- a/tests/src/expressions/binary/DerivativeExprTests.cpp +++ b/tests/src/expressions/binary/DerivativeExprTests.cpp @@ -10,6 +10,6 @@ using namespace fintamath; TEST(DerivativeExprTests, getClassTest) { const auto expr = derivativeExpr(Integer(0), Variable("x")); - EXPECT_EQ(expr->getClass(), MathObjectClass("DerivativeExpr")); + EXPECT_EQ(expr->getClass().getName(), "DerivativeExpr"); EXPECT_EQ(expr->getClass().getParent(), IBinaryExpression::getClassStatic()); } diff --git a/tests/src/expressions/binary/DivExprTests.cpp b/tests/src/expressions/binary/DivExprTests.cpp index 17dd94dba..c60726955 100644 --- a/tests/src/expressions/binary/DivExprTests.cpp +++ b/tests/src/expressions/binary/DivExprTests.cpp @@ -10,6 +10,6 @@ using namespace fintamath; TEST(DivExprTests, getClassTest) { const auto expr = divExpr(Integer(0), Integer(0)); - EXPECT_EQ(expr->getClass(), MathObjectClass("DivExpr")); + EXPECT_EQ(expr->getClass().getName(), "DivExpr"); EXPECT_EQ(expr->getClass().getParent(), IBinaryExpression::getClassStatic()); } diff --git a/tests/src/expressions/binary/IntegralExprTests.cpp b/tests/src/expressions/binary/IntegralExprTests.cpp index e2828cd87..664351ce1 100644 --- a/tests/src/expressions/binary/IntegralExprTests.cpp +++ b/tests/src/expressions/binary/IntegralExprTests.cpp @@ -10,6 +10,6 @@ using namespace fintamath; TEST(IntegralExprTests, getClassTest) { const auto expr = integralExpr(Integer(0), Variable("x")); - EXPECT_EQ(expr->getClass(), MathObjectClass("IntegralExpr")); + EXPECT_EQ(expr->getClass().getName(), "IntegralExpr"); EXPECT_EQ(expr->getClass().getParent(), IBinaryExpression::getClassStatic()); } diff --git a/tests/src/expressions/binary/LogExprTests.cpp b/tests/src/expressions/binary/LogExprTests.cpp index fb641475a..2d46b7112 100644 --- a/tests/src/expressions/binary/LogExprTests.cpp +++ b/tests/src/expressions/binary/LogExprTests.cpp @@ -10,6 +10,6 @@ using namespace fintamath; TEST(LogExprTests, getClassTest) { const auto expr = logExpr(Integer(0), Integer(0)); - EXPECT_EQ(expr->getClass(), MathObjectClass("LogExpr")); + EXPECT_EQ(expr->getClass().getName(), "LogExpr"); EXPECT_EQ(expr->getClass().getParent(), IBinaryExpression::getClassStatic()); } diff --git a/tests/src/expressions/binary/PowExprTests.cpp b/tests/src/expressions/binary/PowExprTests.cpp index 59b1ed296..1228e92ed 100644 --- a/tests/src/expressions/binary/PowExprTests.cpp +++ b/tests/src/expressions/binary/PowExprTests.cpp @@ -10,6 +10,6 @@ using namespace fintamath; TEST(PowExprTests, getClassTest) { const auto expr = powExpr(Integer(0), Integer(0)); - EXPECT_EQ(expr->getClass(), MathObjectClass("PowExpr")); + EXPECT_EQ(expr->getClass().getName(), "PowExpr"); EXPECT_EQ(expr->getClass().getParent(), IBinaryExpression::getClassStatic()); } diff --git a/tests/src/expressions/interfaces/IBinaryExpressionTests.cpp b/tests/src/expressions/interfaces/IBinaryExpressionTests.cpp index 581d1dc8d..d77ca6e18 100644 --- a/tests/src/expressions/interfaces/IBinaryExpressionTests.cpp +++ b/tests/src/expressions/interfaces/IBinaryExpressionTests.cpp @@ -71,6 +71,6 @@ TEST(IBinaryExpressionTests, toMinimalObjectTest) { } TEST(IBinaryExpressionTests, getClassTest) { - EXPECT_EQ(IBinaryExpression::getClassStatic(), MathObjectClass("IBinaryExpression")); + EXPECT_EQ(IBinaryExpression::getClassStatic().getName(), "IBinaryExpression"); EXPECT_EQ(IBinaryExpression::getClassStatic().getParent(), IExpression::getClassStatic()); } diff --git a/tests/src/expressions/interfaces/IPolynomExpressionTests.cpp b/tests/src/expressions/interfaces/IPolynomExpressionTests.cpp index 8478c8000..d41641e56 100644 --- a/tests/src/expressions/interfaces/IPolynomExpressionTests.cpp +++ b/tests/src/expressions/interfaces/IPolynomExpressionTests.cpp @@ -79,6 +79,6 @@ TEST(IPolynomExpressionTests, toMinimalObjectTest) { } TEST(IPolynomExpressionTests, getClassTest) { - EXPECT_EQ(IPolynomExpression::getClassStatic(), MathObjectClass("IPolynomExpression")); + EXPECT_EQ(IPolynomExpression::getClassStatic().getName(), "IPolynomExpression"); EXPECT_EQ(IPolynomExpression::getClassStatic().getParent(), IExpression::getClassStatic()); } diff --git a/tests/src/expressions/interfaces/IUnaryExpressionTests.cpp b/tests/src/expressions/interfaces/IUnaryExpressionTests.cpp index cafa0c6b3..bdaec6557 100644 --- a/tests/src/expressions/interfaces/IUnaryExpressionTests.cpp +++ b/tests/src/expressions/interfaces/IUnaryExpressionTests.cpp @@ -70,6 +70,6 @@ TEST(IUnaryExpressionTests, toMinimalObjectTest) { } TEST(IUnaryExpressionTests, getClassTest) { - EXPECT_EQ(IUnaryExpression::getClassStatic(), MathObjectClass("IUnaryExpression")); + EXPECT_EQ(IUnaryExpression::getClassStatic().getName(), "IUnaryExpression"); EXPECT_EQ(IUnaryExpression::getClassStatic().getParent(), IExpression::getClassStatic()); } diff --git a/tests/src/expressions/polynomial/AddExprTests.cpp b/tests/src/expressions/polynomial/AddExprTests.cpp index 5d30d03a0..93cedec0a 100644 --- a/tests/src/expressions/polynomial/AddExprTests.cpp +++ b/tests/src/expressions/polynomial/AddExprTests.cpp @@ -10,6 +10,6 @@ using namespace fintamath; TEST(AddExprTests, getClassTest) { const auto expr = addExpr(Integer(0), Integer(0)); - EXPECT_EQ(expr->getClass(), MathObjectClass("AddExpr")); + EXPECT_EQ(expr->getClass().getName(), "AddExpr"); EXPECT_EQ(expr->getClass().getParent(), IPolynomExpression::getClassStatic()); } diff --git a/tests/src/expressions/polynomial/AndExprTests.cpp b/tests/src/expressions/polynomial/AndExprTests.cpp index a41b50205..ba5f39da5 100644 --- a/tests/src/expressions/polynomial/AndExprTests.cpp +++ b/tests/src/expressions/polynomial/AndExprTests.cpp @@ -10,6 +10,6 @@ using namespace fintamath; TEST(AndExprTests, getClassTest) { const auto expr = andExpr(Boolean(), Boolean()); - EXPECT_EQ(expr->getClass(), MathObjectClass("AndExpr")); + EXPECT_EQ(expr->getClass().getName(), "AndExpr"); EXPECT_EQ(expr->getClass().getParent(), IPolynomExpression::getClassStatic()); } diff --git a/tests/src/expressions/polynomial/MinMaxExprTests.cpp b/tests/src/expressions/polynomial/MinMaxExprTests.cpp index 033722309..a29d76220 100644 --- a/tests/src/expressions/polynomial/MinMaxExprTests.cpp +++ b/tests/src/expressions/polynomial/MinMaxExprTests.cpp @@ -10,6 +10,6 @@ using namespace fintamath; TEST(MinMaxExprTests, getClassTest) { const auto expr = minExpr(Integer(0), Integer(0)); - EXPECT_EQ(expr->getClass(), MathObjectClass("MinMaxExpr")); + EXPECT_EQ(expr->getClass().getName(), "MinMaxExpr"); EXPECT_EQ(expr->getClass().getParent(), IPolynomExpression::getClassStatic()); } diff --git a/tests/src/expressions/polynomial/MulExprTests.cpp b/tests/src/expressions/polynomial/MulExprTests.cpp index 6f97e33d1..3dec71025 100644 --- a/tests/src/expressions/polynomial/MulExprTests.cpp +++ b/tests/src/expressions/polynomial/MulExprTests.cpp @@ -10,6 +10,6 @@ using namespace fintamath; TEST(MulExprTests, getClassTest) { const auto expr = mulExpr(Integer(0), Integer(0)); - EXPECT_EQ(expr->getClass(), MathObjectClass("MulExpr")); + EXPECT_EQ(expr->getClass().getName(), "MulExpr"); EXPECT_EQ(expr->getClass().getParent(), IPolynomExpression::getClassStatic()); } diff --git a/tests/src/expressions/polynomial/OrExprTests.cpp b/tests/src/expressions/polynomial/OrExprTests.cpp index 57fba1558..7dd6bd6d8 100644 --- a/tests/src/expressions/polynomial/OrExprTests.cpp +++ b/tests/src/expressions/polynomial/OrExprTests.cpp @@ -10,6 +10,6 @@ using namespace fintamath; TEST(OrExprTests, getClassTest) { const auto expr = orExpr(Boolean(), Boolean()); - EXPECT_EQ(expr->getClass(), MathObjectClass("OrExpr")); + EXPECT_EQ(expr->getClass().getName(), "OrExpr"); EXPECT_EQ(expr->getClass().getParent(), IPolynomExpression::getClassStatic()); } diff --git a/tests/src/expressions/unary/AbsExprTests.cpp b/tests/src/expressions/unary/AbsExprTests.cpp index dd46d577c..56246a2ca 100644 --- a/tests/src/expressions/unary/AbsExprTests.cpp +++ b/tests/src/expressions/unary/AbsExprTests.cpp @@ -9,6 +9,6 @@ using namespace fintamath; TEST(AbsExprTests, getClassTest) { const auto expr = absExpr(Integer(0).clone()); - EXPECT_EQ(expr->getClass(), MathObjectClass("AbsExpr")); + EXPECT_EQ(expr->getClass().getName(), "AbsExpr"); EXPECT_EQ(expr->getClass().getParent(), IUnaryExpression::getClassStatic()); } diff --git a/tests/src/expressions/unary/FloorCeilExprTests.cpp b/tests/src/expressions/unary/FloorCeilExprTests.cpp index 39753ca30..4a916ffe9 100644 --- a/tests/src/expressions/unary/FloorCeilExprTests.cpp +++ b/tests/src/expressions/unary/FloorCeilExprTests.cpp @@ -9,6 +9,6 @@ using namespace fintamath; TEST(FloorCeilExprTests, getClassTest) { const auto expr = floorExpr(Integer(0).clone()); - EXPECT_EQ(expr->getClass(), MathObjectClass("FloorCeilExpr")); + EXPECT_EQ(expr->getClass().getName(), "FloorCeilExpr"); EXPECT_EQ(expr->getClass().getParent(), IUnaryExpression::getClassStatic()); } diff --git a/tests/src/expressions/unary/HyperbExprTests.cpp b/tests/src/expressions/unary/HyperbExprTests.cpp index f0c19a10f..f655f1d2d 100644 --- a/tests/src/expressions/unary/HyperbExprTests.cpp +++ b/tests/src/expressions/unary/HyperbExprTests.cpp @@ -10,6 +10,6 @@ using namespace fintamath; TEST(HyperbExprTests, getClassTest) { const auto expr = sinhExpr(Integer(0).clone()); - EXPECT_EQ(expr->getClass(), MathObjectClass("HyperbExpr")); + EXPECT_EQ(expr->getClass().getName(), "HyperbExpr"); EXPECT_EQ(expr->getClass().getParent(), IUnaryExpression::getClassStatic()); } diff --git a/tests/src/expressions/unary/InvHyperbExprTests.cpp b/tests/src/expressions/unary/InvHyperbExprTests.cpp index 668a50b62..5e2f03420 100644 --- a/tests/src/expressions/unary/InvHyperbExprTests.cpp +++ b/tests/src/expressions/unary/InvHyperbExprTests.cpp @@ -10,6 +10,6 @@ using namespace fintamath; TEST(InvHyperbExprTests, getClassTest) { const auto expr = asinhExpr(Integer(0).clone()); - EXPECT_EQ(expr->getClass(), MathObjectClass("InvHyperbExpr")); + EXPECT_EQ(expr->getClass().getName(), "InvHyperbExpr"); EXPECT_EQ(expr->getClass().getParent(), IUnaryExpression::getClassStatic()); } diff --git a/tests/src/expressions/unary/InvTrigExprTests.cpp b/tests/src/expressions/unary/InvTrigExprTests.cpp index b5513c262..240fe7a55 100644 --- a/tests/src/expressions/unary/InvTrigExprTests.cpp +++ b/tests/src/expressions/unary/InvTrigExprTests.cpp @@ -10,6 +10,6 @@ using namespace fintamath; TEST(InvTrigExprTests, getClassTest) { const auto expr = asinExpr(Integer(0).clone()); - EXPECT_EQ(expr->getClass(), MathObjectClass("InvTrigExpr")); + EXPECT_EQ(expr->getClass().getName(), "InvTrigExpr"); EXPECT_EQ(expr->getClass().getParent(), IUnaryExpression::getClassStatic()); } diff --git a/tests/src/expressions/unary/NotExprTests.cpp b/tests/src/expressions/unary/NotExprTests.cpp index f4ed5cdf9..6306c08b3 100644 --- a/tests/src/expressions/unary/NotExprTests.cpp +++ b/tests/src/expressions/unary/NotExprTests.cpp @@ -10,6 +10,6 @@ using namespace fintamath; TEST(NotExprTests, getClassTest) { const auto expr = notExpr(Boolean()); - EXPECT_EQ(expr->getClass(), MathObjectClass("NotExpr")); + EXPECT_EQ(expr->getClass().getName(), "NotExpr"); EXPECT_EQ(expr->getClass().getParent(), IUnaryExpression::getClassStatic()); } diff --git a/tests/src/expressions/unary/SignExprTests.cpp b/tests/src/expressions/unary/SignExprTests.cpp index 68754079e..2e946077e 100644 --- a/tests/src/expressions/unary/SignExprTests.cpp +++ b/tests/src/expressions/unary/SignExprTests.cpp @@ -9,6 +9,6 @@ using namespace fintamath; TEST(SignExprTests, getClassTest) { const auto expr = signExpr(Integer(0).clone()); - EXPECT_EQ(expr->getClass(), MathObjectClass("SignExpr")); + EXPECT_EQ(expr->getClass().getName(), "SignExpr"); EXPECT_EQ(expr->getClass().getParent(), IUnaryExpression::getClassStatic()); } diff --git a/tests/src/expressions/unary/TrigExprTests.cpp b/tests/src/expressions/unary/TrigExprTests.cpp index 09bb2734f..5811aea6e 100644 --- a/tests/src/expressions/unary/TrigExprTests.cpp +++ b/tests/src/expressions/unary/TrigExprTests.cpp @@ -9,6 +9,6 @@ using namespace fintamath; TEST(TrigExprTests, getClassTest) { const auto expr = sinExpr(Integer(0).clone()); - EXPECT_EQ(expr->getClass(), MathObjectClass("TrigExpr")); + EXPECT_EQ(expr->getClass().getName(), "TrigExpr"); EXPECT_EQ(expr->getClass().getParent(), IUnaryExpression::getClassStatic()); } diff --git a/tests/src/functions/IFunctionTests.cpp b/tests/src/functions/IFunctionTests.cpp index b8bf41ba7..3f8042f0d 100644 --- a/tests/src/functions/IFunctionTests.cpp +++ b/tests/src/functions/IFunctionTests.cpp @@ -112,6 +112,6 @@ TEST(IFunctionTests, doArgsMatchTest) { } TEST(IFunctionTests, getClassTest) { - EXPECT_EQ(IFunction::getClassStatic(), MathObjectClass("IFunction")); + EXPECT_EQ(IFunction::getClassStatic().getName(), "IFunction"); EXPECT_EQ(IFunction::getClassStatic().getParent(), IMathObject::getClassStatic()); } diff --git a/tests/src/functions/IOperatorTests.cpp b/tests/src/functions/IOperatorTests.cpp index 3fcba96da..2cd23264e 100644 --- a/tests/src/functions/IOperatorTests.cpp +++ b/tests/src/functions/IOperatorTests.cpp @@ -52,6 +52,6 @@ TEST(IOperatorTests, isAssociativeTest) { } TEST(IOperatorTests, getClassTest) { - EXPECT_EQ(IOperator::getClassStatic(), MathObjectClass("IOperator")); + EXPECT_EQ(IOperator::getClassStatic().getName(), "IOperator"); EXPECT_EQ(IOperator::getClassStatic().getParent(), IFunction::getClassStatic()); } diff --git a/tests/src/functions/arithmetic/AbsTests.cpp b/tests/src/functions/arithmetic/AbsTests.cpp index 989209f6c..ac25c0f43 100644 --- a/tests/src/functions/arithmetic/AbsTests.cpp +++ b/tests/src/functions/arithmetic/AbsTests.cpp @@ -69,6 +69,6 @@ TEST(AbsTests, exprTest) { } TEST(AbsTests, getClassTest) { - EXPECT_EQ(f.getClass(), MathObjectClass("Abs")); + EXPECT_EQ(f.getClass().getName(), "Abs"); EXPECT_EQ(f.getClass().getParent(), IFunction::getClassStatic()); } diff --git a/tests/src/functions/arithmetic/AddTests.cpp b/tests/src/functions/arithmetic/AddTests.cpp index c2e92eb43..5047e6a95 100644 --- a/tests/src/functions/arithmetic/AddTests.cpp +++ b/tests/src/functions/arithmetic/AddTests.cpp @@ -59,6 +59,6 @@ TEST(AddTests, exprTest) { } TEST(AddTests, getClassTest) { - EXPECT_EQ(f.getClass(), MathObjectClass("Add")); + EXPECT_EQ(f.getClass().getName(), "Add"); EXPECT_EQ(f.getClass().getParent(), IOperator::getClassStatic()); } diff --git a/tests/src/functions/arithmetic/DivTests.cpp b/tests/src/functions/arithmetic/DivTests.cpp index c3ba19656..2769ad785 100644 --- a/tests/src/functions/arithmetic/DivTests.cpp +++ b/tests/src/functions/arithmetic/DivTests.cpp @@ -61,6 +61,6 @@ TEST(DivTests, exprTest) { } TEST(DivTests, getClassTest) { - EXPECT_EQ(f.getClass(), MathObjectClass("Div")); + EXPECT_EQ(f.getClass().getName(), "Div"); EXPECT_EQ(f.getClass().getParent(), IOperator::getClassStatic()); } diff --git a/tests/src/functions/arithmetic/FracMixedTests.cpp b/tests/src/functions/arithmetic/FracMixedTests.cpp index b97969f3e..e02ddfeb7 100644 --- a/tests/src/functions/arithmetic/FracMixedTests.cpp +++ b/tests/src/functions/arithmetic/FracMixedTests.cpp @@ -53,6 +53,6 @@ TEST(FracMixedTests, callTest) { } TEST(FracMixedTests, getClassTest) { - EXPECT_EQ(f.getClass(), MathObjectClass("FracMixed")); + EXPECT_EQ(f.getClass().getName(), "FracMixed"); EXPECT_EQ(f.getClass().getParent(), IFunction::getClassStatic()); } diff --git a/tests/src/functions/arithmetic/FracTests.cpp b/tests/src/functions/arithmetic/FracTests.cpp index c0d99be83..72764f624 100644 --- a/tests/src/functions/arithmetic/FracTests.cpp +++ b/tests/src/functions/arithmetic/FracTests.cpp @@ -46,6 +46,6 @@ TEST(FracTests, callTest) { } TEST(FracTests, getClassTest) { - EXPECT_EQ(f.getClass(), MathObjectClass("Frac")); + EXPECT_EQ(f.getClass().getName(), "Frac"); EXPECT_EQ(f.getClass().getParent(), IFunction::getClassStatic()); } diff --git a/tests/src/functions/arithmetic/MulTests.cpp b/tests/src/functions/arithmetic/MulTests.cpp index 330e18c33..2824e0719 100644 --- a/tests/src/functions/arithmetic/MulTests.cpp +++ b/tests/src/functions/arithmetic/MulTests.cpp @@ -57,6 +57,6 @@ TEST(MulTests, exprTest) { } TEST(MulTests, getClassTest) { - EXPECT_EQ(f.getClass(), MathObjectClass("Mul")); + EXPECT_EQ(f.getClass().getName(), "Mul"); EXPECT_EQ(f.getClass().getParent(), IOperator::getClassStatic()); } diff --git a/tests/src/functions/arithmetic/NegTests.cpp b/tests/src/functions/arithmetic/NegTests.cpp index 4e9626656..d3e90fc27 100644 --- a/tests/src/functions/arithmetic/NegTests.cpp +++ b/tests/src/functions/arithmetic/NegTests.cpp @@ -55,6 +55,6 @@ TEST(NegTests, exprTest) { } TEST(NegTests, getClassTest) { - EXPECT_EQ(f.getClass(), MathObjectClass("Neg")); + EXPECT_EQ(f.getClass().getName(), "Neg"); EXPECT_EQ(f.getClass().getParent(), IOperator::getClassStatic()); } diff --git a/tests/src/functions/arithmetic/SignTests.cpp b/tests/src/functions/arithmetic/SignTests.cpp index 488f81fa9..ccb946157 100644 --- a/tests/src/functions/arithmetic/SignTests.cpp +++ b/tests/src/functions/arithmetic/SignTests.cpp @@ -67,6 +67,6 @@ TEST(SignTests, exprTest) { } TEST(SignTests, getClassTest) { - EXPECT_EQ(f.getClass(), MathObjectClass("Sign")); + EXPECT_EQ(f.getClass().getName(), "Sign"); EXPECT_EQ(f.getClass().getParent(), IFunction::getClassStatic()); } diff --git a/tests/src/functions/arithmetic/SubTests.cpp b/tests/src/functions/arithmetic/SubTests.cpp index 98b923f28..1b9ee7f06 100644 --- a/tests/src/functions/arithmetic/SubTests.cpp +++ b/tests/src/functions/arithmetic/SubTests.cpp @@ -59,6 +59,6 @@ TEST(SubTests, exprTest) { } TEST(SubTests, getClassTest) { - EXPECT_EQ(f.getClass(), MathObjectClass("Sub")); + EXPECT_EQ(f.getClass().getName(), "Sub"); EXPECT_EQ(f.getClass().getParent(), IOperator::getClassStatic()); } diff --git a/tests/src/functions/arithmetic/UnaryPlusTests.cpp b/tests/src/functions/arithmetic/UnaryPlusTests.cpp index d7c70bbb5..ac7e43c14 100644 --- a/tests/src/functions/arithmetic/UnaryPlusTests.cpp +++ b/tests/src/functions/arithmetic/UnaryPlusTests.cpp @@ -52,6 +52,6 @@ TEST(UnaryPlusTests, callTest) { } TEST(UnaryPlusTests, getClassTest) { - EXPECT_EQ(f.getClass(), MathObjectClass("UnaryPlus")); + EXPECT_EQ(f.getClass().getName(), "UnaryPlus"); EXPECT_EQ(f.getClass().getParent(), IOperator::getClassStatic()); } diff --git a/tests/src/functions/calculus/DerivativeTests.cpp b/tests/src/functions/calculus/DerivativeTests.cpp index eb50a9f4b..1b5289df7 100644 --- a/tests/src/functions/calculus/DerivativeTests.cpp +++ b/tests/src/functions/calculus/DerivativeTests.cpp @@ -97,6 +97,6 @@ TEST(DerivativeTests, exprTest) { } TEST(DerivativeTests, getClassTest) { - EXPECT_EQ(f.getClass(), MathObjectClass("Derivative")); + EXPECT_EQ(f.getClass().getName(), "Derivative"); EXPECT_EQ(f.getClass().getParent(), IFunction::getClassStatic()); } diff --git a/tests/src/functions/calculus/IntegralTests.cpp b/tests/src/functions/calculus/IntegralTests.cpp index faf41044a..8cadebd28 100644 --- a/tests/src/functions/calculus/IntegralTests.cpp +++ b/tests/src/functions/calculus/IntegralTests.cpp @@ -53,6 +53,6 @@ TEST(IntegralTests, exprTest) { } TEST(IntegralTests, getClassTest) { - EXPECT_EQ(f.getClass(), MathObjectClass("Integral")); + EXPECT_EQ(f.getClass().getName(), "Integral"); EXPECT_EQ(f.getClass().getParent(), IFunction::getClassStatic()); } diff --git a/tests/src/functions/calculus/MaxTests.cpp b/tests/src/functions/calculus/MaxTests.cpp index 29021aad4..4e7e53d11 100644 --- a/tests/src/functions/calculus/MaxTests.cpp +++ b/tests/src/functions/calculus/MaxTests.cpp @@ -58,6 +58,6 @@ TEST(MaxTests, exprTest) { } TEST(MaxTests, getClassTest) { - EXPECT_EQ(f.getClass(), MathObjectClass("Max")); + EXPECT_EQ(f.getClass().getName(), "Max"); EXPECT_EQ(f.getClass().getParent(), IFunction::getClassStatic()); } diff --git a/tests/src/functions/calculus/MinTests.cpp b/tests/src/functions/calculus/MinTests.cpp index ece74398b..c928ad8f0 100644 --- a/tests/src/functions/calculus/MinTests.cpp +++ b/tests/src/functions/calculus/MinTests.cpp @@ -58,6 +58,6 @@ TEST(MinTests, exprTest) { } TEST(MinTests, getClassTest) { - EXPECT_EQ(f.getClass(), MathObjectClass("Min")); + EXPECT_EQ(f.getClass().getName(), "Min"); EXPECT_EQ(f.getClass().getParent(), IFunction::getClassStatic()); } diff --git a/tests/src/functions/comparison/EqvTests.cpp b/tests/src/functions/comparison/EqvTests.cpp index e395c5689..82f782fe0 100644 --- a/tests/src/functions/comparison/EqvTests.cpp +++ b/tests/src/functions/comparison/EqvTests.cpp @@ -65,6 +65,6 @@ TEST(EqvTests, exprTest) { } TEST(EqvTests, getClassTest) { - EXPECT_EQ(f.getClass(), MathObjectClass("Eqv")); + EXPECT_EQ(f.getClass().getName(), "Eqv"); EXPECT_EQ(f.getClass().getParent(), IOperator::getClassStatic()); } diff --git a/tests/src/functions/comparison/LessEqvTests.cpp b/tests/src/functions/comparison/LessEqvTests.cpp index 167da7eba..3628e9e70 100644 --- a/tests/src/functions/comparison/LessEqvTests.cpp +++ b/tests/src/functions/comparison/LessEqvTests.cpp @@ -65,6 +65,6 @@ TEST(LessEqvTests, exprTest) { } TEST(LessEqvTests, getClassTest) { - EXPECT_EQ(f.getClass(), MathObjectClass("LessEqv")); + EXPECT_EQ(f.getClass().getName(), "LessEqv"); EXPECT_EQ(f.getClass().getParent(), IOperator::getClassStatic()); } diff --git a/tests/src/functions/comparison/LessTests.cpp b/tests/src/functions/comparison/LessTests.cpp index 284453ee9..62f3f84db 100644 --- a/tests/src/functions/comparison/LessTests.cpp +++ b/tests/src/functions/comparison/LessTests.cpp @@ -65,6 +65,6 @@ TEST(LessTests, exprTest) { } TEST(LessTests, getClassTest) { - EXPECT_EQ(f.getClass(), MathObjectClass("Less")); + EXPECT_EQ(f.getClass().getName(), "Less"); EXPECT_EQ(f.getClass().getParent(), IOperator::getClassStatic()); } diff --git a/tests/src/functions/comparison/MoreEqvTests.cpp b/tests/src/functions/comparison/MoreEqvTests.cpp index eed084eaf..30f830048 100644 --- a/tests/src/functions/comparison/MoreEqvTests.cpp +++ b/tests/src/functions/comparison/MoreEqvTests.cpp @@ -65,6 +65,6 @@ TEST(MoreEqvTests, exprTest) { } TEST(MoreEqvTests, getClassTest) { - EXPECT_EQ(f.getClass(), MathObjectClass("MoreEqv")); + EXPECT_EQ(f.getClass().getName(), "MoreEqv"); EXPECT_EQ(f.getClass().getParent(), IOperator::getClassStatic()); } diff --git a/tests/src/functions/comparison/MoreTests.cpp b/tests/src/functions/comparison/MoreTests.cpp index 8db533f21..e7f7cab5f 100644 --- a/tests/src/functions/comparison/MoreTests.cpp +++ b/tests/src/functions/comparison/MoreTests.cpp @@ -65,6 +65,6 @@ TEST(MoreTests, exprTest) { } TEST(MoreTests, getClassTest) { - EXPECT_EQ(f.getClass(), MathObjectClass("More")); + EXPECT_EQ(f.getClass().getName(), "More"); EXPECT_EQ(f.getClass().getParent(), IOperator::getClassStatic()); } diff --git a/tests/src/functions/comparison/NeqvTests.cpp b/tests/src/functions/comparison/NeqvTests.cpp index 8658f175b..92336018a 100644 --- a/tests/src/functions/comparison/NeqvTests.cpp +++ b/tests/src/functions/comparison/NeqvTests.cpp @@ -65,6 +65,6 @@ TEST(NeqvTests, exprTest) { } TEST(NeqvTests, getClassTest) { - EXPECT_EQ(f.getClass(), MathObjectClass("Neqv")); + EXPECT_EQ(f.getClass().getName(), "Neqv"); EXPECT_EQ(f.getClass().getParent(), IOperator::getClassStatic()); } diff --git a/tests/src/functions/hyperbolic/AcoshTests.cpp b/tests/src/functions/hyperbolic/AcoshTests.cpp index edd446c64..40b49db81 100644 --- a/tests/src/functions/hyperbolic/AcoshTests.cpp +++ b/tests/src/functions/hyperbolic/AcoshTests.cpp @@ -57,6 +57,6 @@ TEST(AcoshTests, exprTest) { } TEST(AcoshTests, getClassTest) { - EXPECT_EQ(f.getClass(), MathObjectClass("Acosh")); + EXPECT_EQ(f.getClass().getName(), "Acosh"); EXPECT_EQ(f.getClass().getParent(), IFunction::getClassStatic()); } diff --git a/tests/src/functions/hyperbolic/AcothTests.cpp b/tests/src/functions/hyperbolic/AcothTests.cpp index 61670637b..adb30da08 100644 --- a/tests/src/functions/hyperbolic/AcothTests.cpp +++ b/tests/src/functions/hyperbolic/AcothTests.cpp @@ -57,6 +57,6 @@ TEST(AcothTests, exprTest) { } TEST(AcothTests, getClassTest) { - EXPECT_EQ(f.getClass(), MathObjectClass("Acoth")); + EXPECT_EQ(f.getClass().getName(), "Acoth"); EXPECT_EQ(f.getClass().getParent(), IFunction::getClassStatic()); } diff --git a/tests/src/functions/hyperbolic/AcschTests.cpp b/tests/src/functions/hyperbolic/AcschTests.cpp index e7c42eedc..06a33c0fd 100644 --- a/tests/src/functions/hyperbolic/AcschTests.cpp +++ b/tests/src/functions/hyperbolic/AcschTests.cpp @@ -56,6 +56,6 @@ TEST(AcschTests, exprTest) { } TEST(AcschTests, getClassTest) { - EXPECT_EQ(f.getClass(), MathObjectClass("Acsch")); + EXPECT_EQ(f.getClass().getName(), "Acsch"); EXPECT_EQ(f.getClass().getParent(), IFunction::getClassStatic()); } diff --git a/tests/src/functions/hyperbolic/AsechTests.cpp b/tests/src/functions/hyperbolic/AsechTests.cpp index 86572daac..c547a33c9 100644 --- a/tests/src/functions/hyperbolic/AsechTests.cpp +++ b/tests/src/functions/hyperbolic/AsechTests.cpp @@ -57,6 +57,6 @@ TEST(AsechTests, exprTest) { } TEST(AsechTests, getClassTest) { - EXPECT_EQ(f.getClass(), MathObjectClass("Asech")); + EXPECT_EQ(f.getClass().getName(), "Asech"); EXPECT_EQ(f.getClass().getParent(), IFunction::getClassStatic()); } diff --git a/tests/src/functions/hyperbolic/AsinhTests.cpp b/tests/src/functions/hyperbolic/AsinhTests.cpp index d98130ea5..461b09f83 100644 --- a/tests/src/functions/hyperbolic/AsinhTests.cpp +++ b/tests/src/functions/hyperbolic/AsinhTests.cpp @@ -54,6 +54,6 @@ TEST(AsinhTests, exprTest) { } TEST(AsinhTests, getClassTest) { - EXPECT_EQ(f.getClass(), MathObjectClass("Asinh")); + EXPECT_EQ(f.getClass().getName(), "Asinh"); EXPECT_EQ(f.getClass().getParent(), IFunction::getClassStatic()); } diff --git a/tests/src/functions/hyperbolic/AtanhTests.cpp b/tests/src/functions/hyperbolic/AtanhTests.cpp index 5e03e874e..abdb43704 100644 --- a/tests/src/functions/hyperbolic/AtanhTests.cpp +++ b/tests/src/functions/hyperbolic/AtanhTests.cpp @@ -57,6 +57,6 @@ TEST(AtanhTests, exprTest) { } TEST(AtanhTests, getClassTest) { - EXPECT_EQ(f.getClass(), MathObjectClass("Atanh")); + EXPECT_EQ(f.getClass().getName(), "Atanh"); EXPECT_EQ(f.getClass().getParent(), IFunction::getClassStatic()); } diff --git a/tests/src/functions/hyperbolic/CoshTests.cpp b/tests/src/functions/hyperbolic/CoshTests.cpp index 0e20c1fe1..041843214 100644 --- a/tests/src/functions/hyperbolic/CoshTests.cpp +++ b/tests/src/functions/hyperbolic/CoshTests.cpp @@ -54,6 +54,6 @@ TEST(CoshTests, exprTest) { } TEST(CoshTests, getClassTest) { - EXPECT_EQ(f.getClass(), MathObjectClass("Cosh")); + EXPECT_EQ(f.getClass().getName(), "Cosh"); EXPECT_EQ(f.getClass().getParent(), IFunction::getClassStatic()); } diff --git a/tests/src/functions/hyperbolic/CothTests.cpp b/tests/src/functions/hyperbolic/CothTests.cpp index 8cab1c1ce..8ba0c652d 100644 --- a/tests/src/functions/hyperbolic/CothTests.cpp +++ b/tests/src/functions/hyperbolic/CothTests.cpp @@ -55,6 +55,6 @@ TEST(CothTests, exprTest) { } TEST(CothTests, getClassTest) { - EXPECT_EQ(f.getClass(), MathObjectClass("Coth")); + EXPECT_EQ(f.getClass().getName(), "Coth"); EXPECT_EQ(f.getClass().getParent(), IFunction::getClassStatic()); } diff --git a/tests/src/functions/hyperbolic/CschTests.cpp b/tests/src/functions/hyperbolic/CschTests.cpp index 869ba2604..82b5bb3a4 100644 --- a/tests/src/functions/hyperbolic/CschTests.cpp +++ b/tests/src/functions/hyperbolic/CschTests.cpp @@ -54,6 +54,6 @@ TEST(CschTests, exprTest) { } TEST(CschTests, getClassTest) { - EXPECT_EQ(f.getClass(), MathObjectClass("Csch")); + EXPECT_EQ(f.getClass().getName(), "Csch"); EXPECT_EQ(f.getClass().getParent(), IFunction::getClassStatic()); } diff --git a/tests/src/functions/hyperbolic/SechTests.cpp b/tests/src/functions/hyperbolic/SechTests.cpp index 994a3af29..c9db9a007 100644 --- a/tests/src/functions/hyperbolic/SechTests.cpp +++ b/tests/src/functions/hyperbolic/SechTests.cpp @@ -55,6 +55,6 @@ TEST(SechTests, exprTest) { } TEST(SechTests, getClassTest) { - EXPECT_EQ(f.getClass(), MathObjectClass("Sech")); + EXPECT_EQ(f.getClass().getName(), "Sech"); EXPECT_EQ(f.getClass().getParent(), IFunction::getClassStatic()); } diff --git a/tests/src/functions/hyperbolic/SinhTests.cpp b/tests/src/functions/hyperbolic/SinhTests.cpp index be95b8943..eab98fc3f 100644 --- a/tests/src/functions/hyperbolic/SinhTests.cpp +++ b/tests/src/functions/hyperbolic/SinhTests.cpp @@ -54,6 +54,6 @@ TEST(SinhTests, exprTest) { } TEST(SinhTests, getClassTest) { - EXPECT_EQ(f.getClass(), MathObjectClass("Sinh")); + EXPECT_EQ(f.getClass().getName(), "Sinh"); EXPECT_EQ(f.getClass().getParent(), IFunction::getClassStatic()); } diff --git a/tests/src/functions/hyperbolic/TanhTests.cpp b/tests/src/functions/hyperbolic/TanhTests.cpp index 893a162c1..ec8d206c9 100644 --- a/tests/src/functions/hyperbolic/TanhTests.cpp +++ b/tests/src/functions/hyperbolic/TanhTests.cpp @@ -54,6 +54,6 @@ TEST(TanhTests, exprTest) { } TEST(TanhTests, getClassTest) { - EXPECT_EQ(f.getClass(), MathObjectClass("Tanh")); + EXPECT_EQ(f.getClass().getName(), "Tanh"); EXPECT_EQ(f.getClass().getParent(), IFunction::getClassStatic()); } diff --git a/tests/src/functions/logarithms/LbTests.cpp b/tests/src/functions/logarithms/LbTests.cpp index 40b7c50df..a49ab4419 100644 --- a/tests/src/functions/logarithms/LbTests.cpp +++ b/tests/src/functions/logarithms/LbTests.cpp @@ -50,6 +50,6 @@ TEST(LbTests, exprTest) { } TEST(LbTests, getClassTest) { - EXPECT_EQ(f.getClass(), MathObjectClass("Lb")); + EXPECT_EQ(f.getClass().getName(), "Lb"); EXPECT_EQ(f.getClass().getParent(), IFunction::getClassStatic()); } diff --git a/tests/src/functions/logarithms/LgTests.cpp b/tests/src/functions/logarithms/LgTests.cpp index 4b2aa8ef7..94d8769f1 100644 --- a/tests/src/functions/logarithms/LgTests.cpp +++ b/tests/src/functions/logarithms/LgTests.cpp @@ -50,6 +50,6 @@ TEST(LgTests, exprTest) { } TEST(LgTests, getClassTest) { - EXPECT_EQ(f.getClass(), MathObjectClass("Lg")); + EXPECT_EQ(f.getClass().getName(), "Lg"); EXPECT_EQ(f.getClass().getParent(), IFunction::getClassStatic()); } diff --git a/tests/src/functions/logarithms/LnTests.cpp b/tests/src/functions/logarithms/LnTests.cpp index 507007b09..a04aa48f1 100644 --- a/tests/src/functions/logarithms/LnTests.cpp +++ b/tests/src/functions/logarithms/LnTests.cpp @@ -52,6 +52,6 @@ TEST(LnTests, exprTest) { } TEST(LnTests, getClassTest) { - EXPECT_EQ(f.getClass(), MathObjectClass("Ln")); + EXPECT_EQ(f.getClass().getName(), "Ln"); EXPECT_EQ(f.getClass().getParent(), IFunction::getClassStatic()); } diff --git a/tests/src/functions/logarithms/LogTests.cpp b/tests/src/functions/logarithms/LogTests.cpp index d3e402ebf..0110f0628 100644 --- a/tests/src/functions/logarithms/LogTests.cpp +++ b/tests/src/functions/logarithms/LogTests.cpp @@ -132,6 +132,6 @@ TEST(LogTests, exprTest) { } TEST(LogTests, getClassTest) { - EXPECT_EQ(f.getClass(), MathObjectClass("Log")); + EXPECT_EQ(f.getClass().getName(), "Log"); EXPECT_EQ(f.getClass().getParent(), IFunction::getClassStatic()); } diff --git a/tests/src/functions/logic/AndTests.cpp b/tests/src/functions/logic/AndTests.cpp index b8655b9cc..e9535d5cb 100644 --- a/tests/src/functions/logic/AndTests.cpp +++ b/tests/src/functions/logic/AndTests.cpp @@ -56,6 +56,6 @@ TEST(AndTests, exprTest) { } TEST(AndTests, getClassTest) { - EXPECT_EQ(f.getClass(), MathObjectClass("And")); + EXPECT_EQ(f.getClass().getName(), "And"); EXPECT_EQ(f.getClass().getParent(), IOperator::getClassStatic()); } diff --git a/tests/src/functions/logic/EquivTests.cpp b/tests/src/functions/logic/EquivTests.cpp index 547663e0f..3f30cfb6b 100644 --- a/tests/src/functions/logic/EquivTests.cpp +++ b/tests/src/functions/logic/EquivTests.cpp @@ -56,6 +56,6 @@ TEST(EquivTests, exprTest) { } TEST(EquivTests, getClassTest) { - EXPECT_EQ(f.getClass(), MathObjectClass("Equiv")); + EXPECT_EQ(f.getClass().getName(), "Equiv"); EXPECT_EQ(f.getClass().getParent(), IOperator::getClassStatic()); } diff --git a/tests/src/functions/logic/ImplTests.cpp b/tests/src/functions/logic/ImplTests.cpp index 2db8b0533..f512562df 100644 --- a/tests/src/functions/logic/ImplTests.cpp +++ b/tests/src/functions/logic/ImplTests.cpp @@ -56,6 +56,6 @@ TEST(ImplTests, exprTest) { } TEST(ImplTests, getClassTest) { - EXPECT_EQ(f.getClass(), MathObjectClass("Impl")); + EXPECT_EQ(f.getClass().getName(), "Impl"); EXPECT_EQ(f.getClass().getParent(), IOperator::getClassStatic()); } diff --git a/tests/src/functions/logic/NequivTests.cpp b/tests/src/functions/logic/NequivTests.cpp index 3c04227c1..8ff99a717 100644 --- a/tests/src/functions/logic/NequivTests.cpp +++ b/tests/src/functions/logic/NequivTests.cpp @@ -56,6 +56,6 @@ TEST(NequivTests, exprTest) { } TEST(NequivTests, getClassTest) { - EXPECT_EQ(f.getClass(), MathObjectClass("Nequiv")); + EXPECT_EQ(f.getClass().getName(), "Nequiv"); EXPECT_EQ(f.getClass().getParent(), IOperator::getClassStatic()); } diff --git a/tests/src/functions/logic/NotTests.cpp b/tests/src/functions/logic/NotTests.cpp index 45f46368e..809a94629 100644 --- a/tests/src/functions/logic/NotTests.cpp +++ b/tests/src/functions/logic/NotTests.cpp @@ -54,6 +54,6 @@ TEST(NotTests, exprTest) { } TEST(NotTests, getClassTest) { - EXPECT_EQ(f.getClass(), MathObjectClass("Not")); + EXPECT_EQ(f.getClass().getName(), "Not"); EXPECT_EQ(f.getClass().getParent(), IOperator::getClassStatic()); } diff --git a/tests/src/functions/logic/OrTests.cpp b/tests/src/functions/logic/OrTests.cpp index b469d5d70..bfb4bb64e 100644 --- a/tests/src/functions/logic/OrTests.cpp +++ b/tests/src/functions/logic/OrTests.cpp @@ -56,6 +56,6 @@ TEST(OrTests, exprTest) { } TEST(OrTests, getClassTest) { - EXPECT_EQ(f.getClass(), MathObjectClass("Or")); + EXPECT_EQ(f.getClass().getName(), "Or"); EXPECT_EQ(f.getClass().getParent(), IOperator::getClassStatic()); } diff --git a/tests/src/functions/ntheory/CeilTests.cpp b/tests/src/functions/ntheory/CeilTests.cpp index 4b2c7ef16..4b746158f 100644 --- a/tests/src/functions/ntheory/CeilTests.cpp +++ b/tests/src/functions/ntheory/CeilTests.cpp @@ -80,6 +80,6 @@ TEST(CeilTests, exprTest) { } TEST(CeilTests, getClassTest) { - EXPECT_EQ(f.getClass(), MathObjectClass("Ceil")); + EXPECT_EQ(f.getClass().getName(), "Ceil"); EXPECT_EQ(f.getClass().getParent(), IFunction::getClassStatic()); } diff --git a/tests/src/functions/ntheory/FloorTests.cpp b/tests/src/functions/ntheory/FloorTests.cpp index bb2f678c6..728a7b473 100644 --- a/tests/src/functions/ntheory/FloorTests.cpp +++ b/tests/src/functions/ntheory/FloorTests.cpp @@ -80,6 +80,6 @@ TEST(FloorTests, exprTest) { } TEST(FloorTests, getClassTest) { - EXPECT_EQ(f.getClass(), MathObjectClass("Floor")); + EXPECT_EQ(f.getClass().getName(), "Floor"); EXPECT_EQ(f.getClass().getParent(), IFunction::getClassStatic()); } diff --git a/tests/src/functions/ntheory/ModTests.cpp b/tests/src/functions/ntheory/ModTests.cpp index 60beb28cb..434959c1f 100644 --- a/tests/src/functions/ntheory/ModTests.cpp +++ b/tests/src/functions/ntheory/ModTests.cpp @@ -99,6 +99,6 @@ TEST(ModTests, exprTest) { } TEST(ModTests, getClassTest) { - EXPECT_EQ(f.getClass(), MathObjectClass("Mod")); + EXPECT_EQ(f.getClass().getName(), "Mod"); EXPECT_EQ(f.getClass().getParent(), IOperator::getClassStatic()); } diff --git a/tests/src/functions/other/CommaTests.cpp b/tests/src/functions/other/CommaTests.cpp index d0a770d3e..4b60a1f0a 100644 --- a/tests/src/functions/other/CommaTests.cpp +++ b/tests/src/functions/other/CommaTests.cpp @@ -51,6 +51,6 @@ TEST(CommaTests, exprTest) { } TEST(CommaTests, getClassTest) { - EXPECT_EQ(f.getClass(), MathObjectClass("Comma")); + EXPECT_EQ(f.getClass().getName(), "Comma"); EXPECT_EQ(f.getClass().getParent(), IOperator::getClassStatic()); } diff --git a/tests/src/functions/other/DegTests.cpp b/tests/src/functions/other/DegTests.cpp index b61eb4f2a..d858b918c 100644 --- a/tests/src/functions/other/DegTests.cpp +++ b/tests/src/functions/other/DegTests.cpp @@ -56,6 +56,6 @@ TEST(DegTests, degTest) { } TEST(DegTests, getClassTest) { - EXPECT_EQ(f.getClass(), MathObjectClass("Deg")); + EXPECT_EQ(f.getClass().getName(), "Deg"); EXPECT_EQ(f.getClass().getParent(), IOperator::getClassStatic()); } diff --git a/tests/src/functions/other/FactorialTests.cpp b/tests/src/functions/other/FactorialTests.cpp index 83cc4f5fd..43ad08467 100644 --- a/tests/src/functions/other/FactorialTests.cpp +++ b/tests/src/functions/other/FactorialTests.cpp @@ -138,6 +138,6 @@ TEST(FactorialTests, exprTest) { } TEST(FactorialTests, getClassTest) { - EXPECT_EQ(f.getClass(), MathObjectClass("Factorial")); + EXPECT_EQ(f.getClass().getName(), "Factorial"); EXPECT_EQ(f.getClass().getParent(), IOperator::getClassStatic()); } diff --git a/tests/src/functions/other/IndexTests.cpp b/tests/src/functions/other/IndexTests.cpp index 3f147c0cd..9220a5aba 100644 --- a/tests/src/functions/other/IndexTests.cpp +++ b/tests/src/functions/other/IndexTests.cpp @@ -63,6 +63,6 @@ TEST(IndexTests, exprTest) { } TEST(IndexTests, getClassTest) { - EXPECT_EQ(f.getClass(), MathObjectClass("Index")); + EXPECT_EQ(f.getClass().getName(), "Index"); EXPECT_EQ(f.getClass().getParent(), IOperator::getClassStatic()); } diff --git a/tests/src/functions/other/PercentTests.cpp b/tests/src/functions/other/PercentTests.cpp index c59b87b0f..83e4ea3cc 100644 --- a/tests/src/functions/other/PercentTests.cpp +++ b/tests/src/functions/other/PercentTests.cpp @@ -55,6 +55,6 @@ TEST(PercentTests, degTest) { } TEST(PercentTests, getClassTest) { - EXPECT_EQ(f.getClass(), MathObjectClass("Percent")); + EXPECT_EQ(f.getClass().getName(), "Percent"); EXPECT_EQ(f.getClass().getParent(), IOperator::getClassStatic()); } diff --git a/tests/src/functions/powers/ExpTests.cpp b/tests/src/functions/powers/ExpTests.cpp index 536fcf0df..5591ec03f 100644 --- a/tests/src/functions/powers/ExpTests.cpp +++ b/tests/src/functions/powers/ExpTests.cpp @@ -46,6 +46,6 @@ TEST(ExpTests, exprTest) { } TEST(ExpTests, getClassTest) { - EXPECT_EQ(f.getClass(), MathObjectClass("Exp")); + EXPECT_EQ(f.getClass().getName(), "Exp"); EXPECT_EQ(f.getClass().getParent(), IFunction::getClassStatic()); } diff --git a/tests/src/functions/powers/PowFunctionTests.cpp b/tests/src/functions/powers/PowFunctionTests.cpp index e6f552b12..538b05b2d 100644 --- a/tests/src/functions/powers/PowFunctionTests.cpp +++ b/tests/src/functions/powers/PowFunctionTests.cpp @@ -46,6 +46,6 @@ TEST(PowFunctionTests, callTest) { } TEST(PowFunctionTests, getClassTest) { - EXPECT_EQ(f.getClass(), MathObjectClass("PowFunction")); + EXPECT_EQ(f.getClass().getName(), "PowFunction"); EXPECT_EQ(f.getClass().getParent(), IFunction::getClassStatic()); } diff --git a/tests/src/functions/powers/PowTests.cpp b/tests/src/functions/powers/PowTests.cpp index fb4d409e5..c6977edf7 100644 --- a/tests/src/functions/powers/PowTests.cpp +++ b/tests/src/functions/powers/PowTests.cpp @@ -169,6 +169,6 @@ TEST(PowTests, exprTest) { } TEST(PowTests, getClassTest) { - EXPECT_EQ(f.getClass(), MathObjectClass("Pow")); + EXPECT_EQ(f.getClass().getName(), "Pow"); EXPECT_EQ(f.getClass().getParent(), IOperator::getClassStatic()); } diff --git a/tests/src/functions/powers/RootTests.cpp b/tests/src/functions/powers/RootTests.cpp index 2682dcfe8..05eafc5a9 100644 --- a/tests/src/functions/powers/RootTests.cpp +++ b/tests/src/functions/powers/RootTests.cpp @@ -182,6 +182,6 @@ TEST(RootTests, exprTest) { } TEST(RootTests, getClassTest) { - EXPECT_EQ(f.getClass(), MathObjectClass("Root")); + EXPECT_EQ(f.getClass().getName(), "Root"); EXPECT_EQ(f.getClass().getParent(), IFunction::getClassStatic()); } diff --git a/tests/src/functions/powers/SqrTests.cpp b/tests/src/functions/powers/SqrTests.cpp index 1989ccbd0..03279f93e 100644 --- a/tests/src/functions/powers/SqrTests.cpp +++ b/tests/src/functions/powers/SqrTests.cpp @@ -51,6 +51,6 @@ TEST(SqrTests, exprTest) { } TEST(SqrTests, getClassTest) { - EXPECT_EQ(f.getClass(), MathObjectClass("Sqr")); + EXPECT_EQ(f.getClass().getName(), "Sqr"); EXPECT_EQ(f.getClass().getParent(), IFunction::getClassStatic()); } diff --git a/tests/src/functions/powers/SqrtTests.cpp b/tests/src/functions/powers/SqrtTests.cpp index 834bfd96a..15775806c 100644 --- a/tests/src/functions/powers/SqrtTests.cpp +++ b/tests/src/functions/powers/SqrtTests.cpp @@ -70,6 +70,6 @@ TEST(SqrtTests, exprTest) { } TEST(SqrtTests, getClassTest) { - EXPECT_EQ(f.getClass(), MathObjectClass("Sqrt")); + EXPECT_EQ(f.getClass().getName(), "Sqrt"); EXPECT_EQ(f.getClass().getParent(), IFunction::getClassStatic()); } diff --git a/tests/src/functions/trigonometry/AcosTests.cpp b/tests/src/functions/trigonometry/AcosTests.cpp index d20784e40..c2b270e9a 100644 --- a/tests/src/functions/trigonometry/AcosTests.cpp +++ b/tests/src/functions/trigonometry/AcosTests.cpp @@ -57,6 +57,6 @@ TEST(AcosTests, exprTest) { } TEST(AcosTests, getClassTest) { - EXPECT_EQ(f.getClass(), MathObjectClass("Acos")); + EXPECT_EQ(f.getClass().getName(), "Acos"); EXPECT_EQ(f.getClass().getParent(), IFunction::getClassStatic()); } diff --git a/tests/src/functions/trigonometry/AcotTests.cpp b/tests/src/functions/trigonometry/AcotTests.cpp index 9fb5dea39..3ad443549 100644 --- a/tests/src/functions/trigonometry/AcotTests.cpp +++ b/tests/src/functions/trigonometry/AcotTests.cpp @@ -57,6 +57,6 @@ TEST(AcotTests, exprTest) { } TEST(AcotTests, getClassTest) { - EXPECT_EQ(f.getClass(), MathObjectClass("Acot")); + EXPECT_EQ(f.getClass().getName(), "Acot"); EXPECT_EQ(f.getClass().getParent(), IFunction::getClassStatic()); } diff --git a/tests/src/functions/trigonometry/AcscTests.cpp b/tests/src/functions/trigonometry/AcscTests.cpp index c07382cf3..d80456c16 100644 --- a/tests/src/functions/trigonometry/AcscTests.cpp +++ b/tests/src/functions/trigonometry/AcscTests.cpp @@ -58,6 +58,6 @@ TEST(AcscTests, exprTest) { } TEST(AcscTests, getClassTest) { - EXPECT_EQ(f.getClass(), MathObjectClass("Acsc")); + EXPECT_EQ(f.getClass().getName(), "Acsc"); EXPECT_EQ(f.getClass().getParent(), IFunction::getClassStatic()); } diff --git a/tests/src/functions/trigonometry/AsecTests.cpp b/tests/src/functions/trigonometry/AsecTests.cpp index 761bf6f0e..31b0559da 100644 --- a/tests/src/functions/trigonometry/AsecTests.cpp +++ b/tests/src/functions/trigonometry/AsecTests.cpp @@ -58,6 +58,6 @@ TEST(AsecTests, exprTest) { } TEST(AsecTests, getClassTest) { - EXPECT_EQ(f.getClass(), MathObjectClass("Asec")); + EXPECT_EQ(f.getClass().getName(), "Asec"); EXPECT_EQ(f.getClass().getParent(), IFunction::getClassStatic()); } diff --git a/tests/src/functions/trigonometry/AsinTests.cpp b/tests/src/functions/trigonometry/AsinTests.cpp index 70ee6b802..8c0d44103 100644 --- a/tests/src/functions/trigonometry/AsinTests.cpp +++ b/tests/src/functions/trigonometry/AsinTests.cpp @@ -57,6 +57,6 @@ TEST(AsinTests, exprTest) { } TEST(AsinTests, getClassTest) { - EXPECT_EQ(f.getClass(), MathObjectClass("Asin")); + EXPECT_EQ(f.getClass().getName(), "Asin"); EXPECT_EQ(f.getClass().getParent(), IFunction::getClassStatic()); } diff --git a/tests/src/functions/trigonometry/AtanTests.cpp b/tests/src/functions/trigonometry/AtanTests.cpp index daecb8475..d16f11c6f 100644 --- a/tests/src/functions/trigonometry/AtanTests.cpp +++ b/tests/src/functions/trigonometry/AtanTests.cpp @@ -57,6 +57,6 @@ TEST(AtanTests, exprTest) { } TEST(AtanTests, getClassTest) { - EXPECT_EQ(f.getClass(), MathObjectClass("Atan")); + EXPECT_EQ(f.getClass().getName(), "Atan"); EXPECT_EQ(f.getClass().getParent(), IFunction::getClassStatic()); } diff --git a/tests/src/functions/trigonometry/CosTests.cpp b/tests/src/functions/trigonometry/CosTests.cpp index 00390d60b..453a096f3 100644 --- a/tests/src/functions/trigonometry/CosTests.cpp +++ b/tests/src/functions/trigonometry/CosTests.cpp @@ -54,6 +54,6 @@ TEST(CosTests, exprTest) { } TEST(CosTests, getClassTest) { - EXPECT_EQ(f.getClass(), MathObjectClass("Cos")); + EXPECT_EQ(f.getClass().getName(), "Cos"); EXPECT_EQ(f.getClass().getParent(), IFunction::getClassStatic()); } diff --git a/tests/src/functions/trigonometry/CotTests.cpp b/tests/src/functions/trigonometry/CotTests.cpp index 1b59d95bb..6b41282be 100644 --- a/tests/src/functions/trigonometry/CotTests.cpp +++ b/tests/src/functions/trigonometry/CotTests.cpp @@ -55,6 +55,6 @@ TEST(CotTests, exprTest) { } TEST(CotTests, getClassTest) { - EXPECT_EQ(f.getClass(), MathObjectClass("Cot")); + EXPECT_EQ(f.getClass().getName(), "Cot"); EXPECT_EQ(f.getClass().getParent(), IFunction::getClassStatic()); } diff --git a/tests/src/functions/trigonometry/CscTests.cpp b/tests/src/functions/trigonometry/CscTests.cpp index 448ae0d1a..d3a66744b 100644 --- a/tests/src/functions/trigonometry/CscTests.cpp +++ b/tests/src/functions/trigonometry/CscTests.cpp @@ -54,6 +54,6 @@ TEST(CscTests, exprTest) { } TEST(CscTests, getClassTest) { - EXPECT_EQ(f.getClass(), MathObjectClass("Csc")); + EXPECT_EQ(f.getClass().getName(), "Csc"); EXPECT_EQ(f.getClass().getParent(), IFunction::getClassStatic()); } diff --git a/tests/src/functions/trigonometry/SecTests.cpp b/tests/src/functions/trigonometry/SecTests.cpp index 7c829d22e..3c4dfd4ba 100644 --- a/tests/src/functions/trigonometry/SecTests.cpp +++ b/tests/src/functions/trigonometry/SecTests.cpp @@ -54,6 +54,6 @@ TEST(SecTests, exprTest) { } TEST(SecTests, getClassTest) { - EXPECT_EQ(f.getClass(), MathObjectClass("Sec")); + EXPECT_EQ(f.getClass().getName(), "Sec"); EXPECT_EQ(f.getClass().getParent(), IFunction::getClassStatic()); } diff --git a/tests/src/functions/trigonometry/SinTests.cpp b/tests/src/functions/trigonometry/SinTests.cpp index 3f12fb12e..be09be02e 100644 --- a/tests/src/functions/trigonometry/SinTests.cpp +++ b/tests/src/functions/trigonometry/SinTests.cpp @@ -54,6 +54,6 @@ TEST(SinTests, exprTest) { } TEST(SinTests, getClassTest) { - EXPECT_EQ(f.getClass(), MathObjectClass("Sin")); + EXPECT_EQ(f.getClass().getName(), "Sin"); EXPECT_EQ(f.getClass().getParent(), IFunction::getClassStatic()); } diff --git a/tests/src/functions/trigonometry/TanTests.cpp b/tests/src/functions/trigonometry/TanTests.cpp index 4436c13df..73da16c1e 100644 --- a/tests/src/functions/trigonometry/TanTests.cpp +++ b/tests/src/functions/trigonometry/TanTests.cpp @@ -55,6 +55,6 @@ TEST(TanTests, exprTest) { } TEST(TanTests, getClassTest) { - EXPECT_EQ(f.getClass(), MathObjectClass("Tan")); + EXPECT_EQ(f.getClass().getName(), "Tan"); EXPECT_EQ(f.getClass().getParent(), IFunction::getClassStatic()); } diff --git a/tests/src/literals/BooleanTests.cpp b/tests/src/literals/BooleanTests.cpp index a4151328a..b545e6a65 100644 --- a/tests/src/literals/BooleanTests.cpp +++ b/tests/src/literals/BooleanTests.cpp @@ -45,6 +45,6 @@ TEST(BooleanTests, opearatorsTest) { } TEST(BooleanTest, getClassTest) { - EXPECT_EQ(Boolean().getClass(), MathObjectClass("Boolean")); + EXPECT_EQ(Boolean().getClass().getName(), "Boolean"); EXPECT_EQ(Boolean().getClass().getParent(), ILiteral::getClassStatic()); } diff --git a/tests/src/literals/ILiteralTests.cpp b/tests/src/literals/ILiteralTests.cpp index e3b0ea6f2..dc367f03d 100644 --- a/tests/src/literals/ILiteralTests.cpp +++ b/tests/src/literals/ILiteralTests.cpp @@ -46,6 +46,6 @@ TEST(ILiteralTests, equalsTest) { } TEST(ILiteralTests, getClassTest) { - EXPECT_EQ(ILiteral::getClassStatic(), MathObjectClass("ILiteral")); + EXPECT_EQ(ILiteral::getClassStatic().getName(), "ILiteral"); EXPECT_EQ(ILiteral::getClassStatic().getParent(), IMathObject::getClassStatic()); } diff --git a/tests/src/literals/VariableTests.cpp b/tests/src/literals/VariableTests.cpp index 3e21e0440..ee011f44e 100644 --- a/tests/src/literals/VariableTests.cpp +++ b/tests/src/literals/VariableTests.cpp @@ -39,6 +39,6 @@ TEST(VariableTest, stringIntegerConstructorTest) { } TEST(VariableTest, getClassTest) { - EXPECT_EQ(Variable("a").getClass(), MathObjectClass("Variable")); + EXPECT_EQ(Variable("a").getClass().getName(), "Variable"); EXPECT_EQ(Variable("a").getClass().getParent(), ILiteral::getClassStatic()); } diff --git a/tests/src/literals/constants/ComplexInfTests.cpp b/tests/src/literals/constants/ComplexInfTests.cpp index 2016ba46a..1100cf2a3 100644 --- a/tests/src/literals/constants/ComplexInfTests.cpp +++ b/tests/src/literals/constants/ComplexInfTests.cpp @@ -16,6 +16,6 @@ TEST(ComplexInfTests, callTest) { } TEST(ComplexInfTests, getClassTest) { - EXPECT_EQ(c.getClass(), MathObjectClass("ComplexInf")); + EXPECT_EQ(c.getClass().getName(), "ComplexInf"); EXPECT_EQ(c.getClass().getParent(), IConstant::getClassStatic()); } diff --git a/tests/src/literals/constants/ETests.cpp b/tests/src/literals/constants/ETests.cpp index c6426cb87..a27d241a1 100644 --- a/tests/src/literals/constants/ETests.cpp +++ b/tests/src/literals/constants/ETests.cpp @@ -16,6 +16,6 @@ TEST(ETests, callTest) { } TEST(ETests, getClassTest) { - EXPECT_EQ(c.getClass(), MathObjectClass("E")); + EXPECT_EQ(c.getClass().getName(), "E"); EXPECT_EQ(c.getClass().getParent(), IConstant::getClassStatic()); } diff --git a/tests/src/literals/constants/FalseTests.cpp b/tests/src/literals/constants/FalseTests.cpp index 4e15beeb4..fb28d06ae 100644 --- a/tests/src/literals/constants/FalseTests.cpp +++ b/tests/src/literals/constants/FalseTests.cpp @@ -18,6 +18,6 @@ TEST(FalseTests, callTest) { } TEST(FalseTests, getClassTest) { - EXPECT_EQ(c.getClass(), MathObjectClass("False")); + EXPECT_EQ(c.getClass().getName(), "False"); EXPECT_EQ(c.getClass().getParent(), IConstant::getClassStatic()); } diff --git a/tests/src/literals/constants/IConstantTests.cpp b/tests/src/literals/constants/IConstantTests.cpp index ca95f4b01..63d1f6311 100644 --- a/tests/src/literals/constants/IConstantTests.cpp +++ b/tests/src/literals/constants/IConstantTests.cpp @@ -38,6 +38,6 @@ TEST(IConstantTests, callTest) { } TEST(IConstantTests, getClassTest) { - EXPECT_EQ(IConstant::getClassStatic(), MathObjectClass("IConstant")); + EXPECT_EQ(IConstant::getClassStatic().getName(), "IConstant"); EXPECT_EQ(IConstant::getClassStatic().getParent(), ILiteral::getClassStatic()); } diff --git a/tests/src/literals/constants/ITests.cpp b/tests/src/literals/constants/ITests.cpp index 546782604..ceaa93033 100644 --- a/tests/src/literals/constants/ITests.cpp +++ b/tests/src/literals/constants/ITests.cpp @@ -16,6 +16,6 @@ TEST(ITests, callTest) { } TEST(ITests, getClassTest) { - EXPECT_EQ(c.getClass(), MathObjectClass("I")); + EXPECT_EQ(c.getClass().getName(), "I"); EXPECT_EQ(c.getClass().getParent(), IConstant::getClassStatic()); } diff --git a/tests/src/literals/constants/InfTests.cpp b/tests/src/literals/constants/InfTests.cpp index 701c6604b..fd8e450f0 100644 --- a/tests/src/literals/constants/InfTests.cpp +++ b/tests/src/literals/constants/InfTests.cpp @@ -16,6 +16,6 @@ TEST(InfTests, callTest) { } TEST(InfTests, getClassTest) { - EXPECT_EQ(c.getClass(), MathObjectClass("Inf")); + EXPECT_EQ(c.getClass().getName(), "Inf"); EXPECT_EQ(c.getClass().getParent(), IConstant::getClassStatic()); } diff --git a/tests/src/literals/constants/NegInfTests.cpp b/tests/src/literals/constants/NegInfTests.cpp index 7da6d8cd3..7a93e2860 100644 --- a/tests/src/literals/constants/NegInfTests.cpp +++ b/tests/src/literals/constants/NegInfTests.cpp @@ -16,6 +16,6 @@ TEST(NegInfTests, callTest) { } TEST(NegInfTests, getClassTest) { - EXPECT_EQ(c.getClass(), MathObjectClass("NegInf")); + EXPECT_EQ(c.getClass().getName(), "NegInf"); EXPECT_EQ(c.getClass().getParent(), IConstant::getClassStatic()); } diff --git a/tests/src/literals/constants/PiTests.cpp b/tests/src/literals/constants/PiTests.cpp index d5eede41c..a64d83a5c 100644 --- a/tests/src/literals/constants/PiTests.cpp +++ b/tests/src/literals/constants/PiTests.cpp @@ -16,6 +16,6 @@ TEST(PiTests, callTest) { } TEST(PiTests, getClassTest) { - EXPECT_EQ(c.getClass(), MathObjectClass("Pi")); + EXPECT_EQ(c.getClass().getName(), "Pi"); EXPECT_EQ(c.getClass().getParent(), IConstant::getClassStatic()); } diff --git a/tests/src/literals/constants/TrueTests.cpp b/tests/src/literals/constants/TrueTests.cpp index 8312b0c14..b976fae01 100644 --- a/tests/src/literals/constants/TrueTests.cpp +++ b/tests/src/literals/constants/TrueTests.cpp @@ -18,6 +18,6 @@ TEST(TrueTests, callTest) { } TEST(TrueTests, getClassTest) { - EXPECT_EQ(c.getClass(), MathObjectClass("True")); + EXPECT_EQ(c.getClass().getName(), "True"); EXPECT_EQ(c.getClass().getParent(), IConstant::getClassStatic()); } diff --git a/tests/src/literals/constants/UndefinedTests.cpp b/tests/src/literals/constants/UndefinedTests.cpp index 3a1254754..550a3594f 100644 --- a/tests/src/literals/constants/UndefinedTests.cpp +++ b/tests/src/literals/constants/UndefinedTests.cpp @@ -16,6 +16,6 @@ TEST(UndefinedTests, callTest) { } TEST(UndefinedTests, getClassTest) { - EXPECT_EQ(c.getClass(), MathObjectClass("Undefined")); + EXPECT_EQ(c.getClass().getName(), "Undefined"); EXPECT_EQ(c.getClass().getParent(), IConstant::getClassStatic()); } diff --git a/tests/src/numbers/ComplexTests.cpp b/tests/src/numbers/ComplexTests.cpp index 18c66a891..38a86e0e0 100644 --- a/tests/src/numbers/ComplexTests.cpp +++ b/tests/src/numbers/ComplexTests.cpp @@ -69,7 +69,7 @@ TEST(ComplexTests, stringConstructorTest) { EXPECT_THROW(Complex("--10.-1"), InvalidInputException); EXPECT_THROW(Complex("10.-1"), InvalidInputException); EXPECT_THROW(Complex("1-0.1"), InvalidInputException); - EXPECT_THROW(Complex("10-.1"), InvalidInputException); + EXPECT_THROW(Complex("10->1"), InvalidInputException); EXPECT_THROW(Complex("10.--1"), InvalidInputException); EXPECT_THROW(Complex("1.10.1"), InvalidInputException); EXPECT_THROW(Complex("0II"), InvalidInputException); @@ -906,6 +906,6 @@ TEST(ComplexTests, isComplexTest) { } TEST(ComplexTests, getClassTest) { - EXPECT_EQ(Complex().getClass(), MathObjectClass("Complex")); + EXPECT_EQ(Complex().getClass().getName(), "Complex"); EXPECT_EQ(Complex().getClass().getParent(), INumber::getClassStatic()); } diff --git a/tests/src/numbers/IIntegerTests.cpp b/tests/src/numbers/IIntegerTests.cpp index e3ebacfcf..5037aa06c 100644 --- a/tests/src/numbers/IIntegerTests.cpp +++ b/tests/src/numbers/IIntegerTests.cpp @@ -286,6 +286,6 @@ TEST(IIntegerTests, decTest) { } TEST(IIntegerTests, getClassTest) { - EXPECT_EQ(IInteger::getClassStatic(), MathObjectClass("IInteger")); + EXPECT_EQ(IInteger::getClassStatic().getName(), "IInteger"); EXPECT_EQ(IInteger::getClassStatic().getParent(), INumber::getClassStatic()); } diff --git a/tests/src/numbers/INumberTests.cpp b/tests/src/numbers/INumberTests.cpp index 72bb21d86..c0cccec2a 100644 --- a/tests/src/numbers/INumberTests.cpp +++ b/tests/src/numbers/INumberTests.cpp @@ -129,6 +129,6 @@ TEST(INumberTests, negateTest) { } TEST(INumberTests, getClassTest) { - EXPECT_EQ(INumber::getClassStatic(), MathObjectClass("INumber")); + EXPECT_EQ(INumber::getClassStatic().getName(), "INumber"); EXPECT_EQ(INumber::getClassStatic().getParent(), IComparable::getClassStatic()); } diff --git a/tests/src/numbers/IntegerTests.cpp b/tests/src/numbers/IntegerTests.cpp index 6bbf95218..5a89a3f0f 100644 --- a/tests/src/numbers/IntegerTests.cpp +++ b/tests/src/numbers/IntegerTests.cpp @@ -609,7 +609,7 @@ TEST(IntegerTests, equalsTest) { } TEST(IntegerTests, getClassTest) { - EXPECT_EQ(Integer().getClass(), MathObjectClass("Integer")); + EXPECT_EQ(Integer().getClass().getName(), "Integer"); EXPECT_EQ(Integer().getClass().getParent(), IInteger::getClassStatic()); } diff --git a/tests/src/numbers/RationalTests.cpp b/tests/src/numbers/RationalTests.cpp index ee5ded2f4..909ad9e09 100644 --- a/tests/src/numbers/RationalTests.cpp +++ b/tests/src/numbers/RationalTests.cpp @@ -36,7 +36,7 @@ TEST(RationalTests, stringConstructorTest) { EXPECT_THROW(Rational("--10.-1"), InvalidInputException); EXPECT_THROW(Rational("10.-1"), InvalidInputException); EXPECT_THROW(Rational("1-0.1"), InvalidInputException); - EXPECT_THROW(Rational("10-.1"), InvalidInputException); + EXPECT_THROW(Rational("10->1"), InvalidInputException); EXPECT_THROW(Rational("10.--1"), InvalidInputException); EXPECT_THROW(Rational("1.10.1"), InvalidInputException); } @@ -504,7 +504,7 @@ TEST(RationalTests, isComplexTest) { } TEST(RationalTests, getClassTest) { - EXPECT_EQ(Rational().getClass(), MathObjectClass("Rational")); + EXPECT_EQ(Rational().getClass().getName(), "Rational"); EXPECT_EQ(Rational().getClass().getParent(), INumber::getClassStatic()); } diff --git a/tests/src/numbers/RealTests.cpp b/tests/src/numbers/RealTests.cpp index c9acd2b07..96a93043c 100644 --- a/tests/src/numbers/RealTests.cpp +++ b/tests/src/numbers/RealTests.cpp @@ -48,7 +48,7 @@ TEST(RealTests, stringConstructorTest) { EXPECT_THROW(Real("--10.-1"), InvalidInputException); EXPECT_THROW(Real("10.-1"), InvalidInputException); EXPECT_THROW(Real("1-0.1"), InvalidInputException); - EXPECT_THROW(Real("10-.1"), InvalidInputException); + EXPECT_THROW(Real("10->1"), InvalidInputException); EXPECT_THROW(Real("10.--1"), InvalidInputException); EXPECT_THROW(Real("."), InvalidInputException); EXPECT_THROW(Real("1.2.1"), InvalidInputException); @@ -1044,7 +1044,7 @@ TEST(RealTests, isComplexTest) { } TEST(RealTests, getClassTest) { - EXPECT_EQ(Real().getClass(), MathObjectClass("Real")); + EXPECT_EQ(Real().getClass().getName(), "Real"); EXPECT_EQ(Real().getClass().getParent(), INumber::getClassStatic()); }