This repository was archived by the owner on May 7, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +0
-21
lines changed Expand file tree Collapse file tree 2 files changed +0
-21
lines changed Original file line number Diff line number Diff line change @@ -17,13 +17,6 @@ trait Path:
17
17
*/
18
18
def pull (): Path
19
19
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
-
27
20
/**
28
21
* Checks if the path is the root path
29
22
* @return true if the path is the root path, false otherwise
@@ -59,8 +52,6 @@ object Path:
59
52
case _ :: p => PathImpl (p)
60
53
case _ => throw new Exception ()
61
54
62
- override def isEqualTo (path : Path ): Boolean = this == path
63
-
64
55
override def isRoot : Boolean = path.isEmpty
65
56
66
57
override def head : Slot = path.head
Original file line number Diff line number Diff line change @@ -26,18 +26,6 @@ class PathTest extends AnyFlatSpec:
26
26
assert(path.pull().path == List (Rep (0 ), Nbr (1 )).reverse)
27
27
}
28
28
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
-
41
29
it should " be root" in {
42
30
val path = Path ()
43
31
assert(path.isRoot)
You can’t perform that action at this time.
0 commit comments