Skip to content

Commit

Permalink
Modulo_Ordering_test
Browse files Browse the repository at this point in the history
  • Loading branch information
ohhmm committed Feb 14, 2025
1 parent d45ef0e commit 0db4618
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
6 changes: 6 additions & 0 deletions omnn/math/test/Modulo_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,9 @@ BOOST_AUTO_TEST_CASE(IsModSimplifiable_test)
BOOST_TEST(!result.first);
BOOST_TEST(result.second == Valuable());
}

BOOST_AUTO_TEST_CASE(Modulo_Ordering_test) {
auto _1 = "(1 % ((Y ^ 4)))"_v;
auto _2 = "((-4 * (Y ^ 3)) % ((Y ^ 4)))"_v;
InequalOrderCheck(_1, _2);
}
10 changes: 10 additions & 0 deletions omnn/math/test/generic.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,5 +166,15 @@ void InequalOrderCheck(const Valuable& _1, const Valuable& _2)
Sum{_1, _2};
}

void InequalOrderCheck(const Valuable& _1, const Valuable& _2)

Check failure on line 169 in omnn/math/test/generic.hpp

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

redefinition of ‘void {anonymous}::InequalOrderCheck(const omnn::math::Valuable&, const omnn::math::Valuable&)’

Check failure on line 169 in omnn/math/test/generic.hpp

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

redefinition of ‘void {anonymous}::InequalOrderCheck(const omnn::math::Valuable&, const omnn::math::Valuable&)’

Check failure on line 169 in omnn/math/test/generic.hpp

View workflow job for this annotation

GitHub Actions / build (windows-latest)

function 'void `anonymous-namespace'::InequalOrderCheck(const omnn::math::Valuable &,const omnn::math::Valuable &)' already has a body

Check failure on line 169 in omnn/math/test/generic.hpp

View workflow job for this annotation

GitHub Actions / build (windows-latest)

function 'void `anonymous-namespace'::InequalOrderCheck(const omnn::math::Valuable &,const omnn::math::Valuable &)' already has a body

Check failure on line 169 in omnn/math/test/generic.hpp

View workflow job for this annotation

GitHub Actions / build (macos-latest)

redefinition of 'InequalOrderCheck'
{
BOOST_TEST(_1 != _2);
auto before = _1.IsComesBefore(_2);
auto after = _2.IsComesBefore(_1);
BOOST_TEST(before != after);
Product{_1, _2};
Sum{_1, _2};
}

} // namespace

0 comments on commit 0db4618

Please sign in to comment.