Skip to content

Commit

Permalink
Add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cbritopacheco committed Feb 13, 2025
1 parent 682d81e commit 17c679e
Show file tree
Hide file tree
Showing 2 changed files with 201 additions and 201 deletions.
18 changes: 14 additions & 4 deletions src/Rodin/Array.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,30 @@ namespace Rodin
{
bool operator()(const IndexArray& lhs, const IndexArray& rhs) const
{
if (lhs.size() != rhs.size())
if (lhs.size() == 0 && rhs.size() == 0)
{
return true;
}
else if (lhs.size() != rhs.size())
{
return false;
}
else
{
return (lhs == rhs).all();
}
}
};

struct IndexArraySymmetricEquality
{
bool operator()(const IndexArray& lhs, const IndexArray& rhs) const
{
assert(lhs.size() > 0);
assert(rhs.size() > 0);
if (lhs.size() != rhs.size())
if (lhs.size() == 0 && rhs.size() == 0)
{
return true;
}
else if (lhs.size() != rhs.size())
{
return false;
}
Expand Down
Loading

0 comments on commit 17c679e

Please sign in to comment.