Skip to content

Commit

Permalink
coverage + restore comprators
Browse files Browse the repository at this point in the history
  • Loading branch information
nanocoh committed Nov 5, 2024
1 parent 67ebb3a commit e9cc527
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/snl/snl/kernel/SNLPath.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,11 @@ SNLDesign* SNLPath::getModel() const {
}

bool SNLPath::operator==(const SNLPath& path) const {
return !(*this < path or path < *this);
return *sharedPath_ == *path.sharedPath_;
}

bool SNLPath::operator!=(const SNLPath& path) const {
return not (*this == path);
return *sharedPath_ != *path.sharedPath_;
}

bool SNLPath::operator<(const SNLPath& path) const {
Expand Down
2 changes: 2 additions & 0 deletions test/snl/python/snl_wrapping/test_snloccurrence.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ def testFunctions(self):
insttermoccurrence = snl.SNLInstTermOccurrence()
insttermoccurrence1 = snl.SNLInstTermOccurrence(path0, instTerms[0])
insttermoccurrence2 = snl.SNLInstTermOccurrence(instTerms[0])

instTerm = insttermoccurrence1.getInstTerm()

uniq = snl.SNLUniquifier(insttermoccurrence1.getPath())
uniqPath = uniq.getPathUniqCollection()
Expand Down
2 changes: 2 additions & 0 deletions test/snl/snl/kernel/SNLPathTest2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ TEST_F(SNLPathTest2, testCompare) {
EXPECT_EQ(uniquifier0 > uniquifier1, false);
EXPECT_EQ(uniquifier0 <= uniquifier1, true);
EXPECT_EQ(uniquifier0 >= uniquifier1, false);

EXPECT_NE(uniquifier0.getString(), uniquifier1.getString());
}

TEST_F(SNLPathTest2, testDestroy0) {
Expand Down

0 comments on commit e9cc527

Please sign in to comment.