Skip to content
This repository was archived by the owner on May 7, 2024. It is now read-only.

Commit 8776825

Browse files
committed
feat: remove isEqualTo method from Path trait
1 parent 31716fa commit 8776825

File tree

2 files changed

+0
-21
lines changed

2 files changed

+0
-21
lines changed

src/main/scala/Path.scala

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,6 @@ trait Path:
1717
*/
1818
def pull(): Path
1919

20-
/**
21-
* Checks if the path is equal to another path
22-
* @param path the path to check
23-
* @return true if the paths are equal, false otherwise
24-
*/
25-
def isEqualTo(path: Path): Boolean
26-
2720
/**
2821
* Checks if the path is the root path
2922
* @return true if the path is the root path, false otherwise
@@ -59,8 +52,6 @@ object Path:
5952
case _ :: p => PathImpl(p)
6053
case _ => throw new Exception()
6154

62-
override def isEqualTo(path: Path): Boolean = this == path
63-
6455
override def isRoot: Boolean = path.isEmpty
6556

6657
override def head: Slot = path.head

src/test/scala/PathTest.scala

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,6 @@ class PathTest extends AnyFlatSpec:
2626
assert(path.pull().path == List(Rep(0), Nbr(1)).reverse)
2727
}
2828

29-
it should "be equal to another Path" in {
30-
val path1 = Path(Rep(0), Nbr(1), Nbr(2))
31-
val path2 = Path(Rep(0), Nbr(1), Nbr(2))
32-
assert(path1 isEqualTo path2)
33-
}
34-
35-
it should "NOT be equal to another Path" in {
36-
val path1 = Path(Rep(0), Nbr(1), Nbr(2))
37-
val path2 = Path(Rep(0), Nbr(1), Nbr(3))
38-
assert(!(path1 isEqualTo path2))
39-
}
40-
4129
it should "be root" in {
4230
val path = Path()
4331
assert(path.isRoot)

0 commit comments

Comments
 (0)