Toggle navigation
Toggle navigation
This project
Loading...
Sign in
홍길동
/
onos
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
Thomas Vachuska
2014-10-21 01:33:48 -0700
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
a12fdf2fb079ada8d4f7fc5c5fd8a676b943f941
a12fdf2f
1 parent
d03a56e0
Ooops... corrected a unit test.
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
4 deletions
core/net/src/test/java/org/onlab/onos/net/intent/TestHostToHostIntent.java
core/net/src/test/java/org/onlab/onos/net/intent/TestHostToHostIntent.java
View file @
a12fdf2
...
...
@@ -47,14 +47,13 @@ public class TestHostToHostIntent {
* to different Hosts. These should compare not equal.
*/
@Test
public
void
testLinksDifferentEquals
()
{
public
void
testSameEquals2
()
{
HostId
one
=
hid
(
"00:00:00:00:00:01/-1"
);
HostId
two
=
hid
(
"00:00:00:00:00:02/-1"
);
HostToHostIntent
i1
=
makeHostToHost
(
one
,
two
);
HostToHostIntent
i2
=
makeHostToHost
(
two
,
one
);
assertThat
(
i1
,
is
(
not
(
equalTo
(
i2
)
)));
assertThat
(
i1
,
is
(
equalTo
(
i2
)));
}
/**
...
...
@@ -76,12 +75,27 @@ public class TestHostToHostIntent {
* objects are different.
*/
@Test
public
void
testHashCode
Different
()
{
public
void
testHashCode
Equals2
()
{
HostId
one
=
hid
(
"00:00:00:00:00:01/-1"
);
HostId
two
=
hid
(
"00:00:00:00:00:02/-1"
);
HostToHostIntent
i1
=
makeHostToHost
(
one
,
two
);
HostToHostIntent
i2
=
makeHostToHost
(
two
,
one
);
assertThat
(
i1
.
hashCode
(),
is
(
equalTo
(
i2
.
hashCode
())));
}
/**
* Tests that the hashCode() values for two distinct LinkCollectionIntent
* objects are different.
*/
@Test
public
void
testHashCodeDifferent
()
{
HostId
one
=
hid
(
"00:00:00:00:00:01/-1"
);
HostId
two
=
hid
(
"00:00:00:00:00:02/-1"
);
HostId
three
=
hid
(
"00:00:00:00:00:32/-1"
);
HostToHostIntent
i1
=
makeHostToHost
(
one
,
two
);
HostToHostIntent
i2
=
makeHostToHost
(
one
,
three
);
assertThat
(
i1
.
hashCode
(),
is
(
not
(
equalTo
(
i2
.
hashCode
()))));
}
...
...
Please
register
or
login
to post a comment