FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
java/src/test/java/com/jsoniter/TestSlice.java at master · junplus/java · GitHub
junplus
/
java
Public
forked from
json-iterator/java
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
java
/
src
/
test
/
java
/
com
/
jsoniter
/
TestSlice.java
Copy path
More file actions
More file actions
Latest commit
History
History
History
22 lines (17 loc) · 647 Bytes
Breadcrumbs
java
/
src
/
test
/
java
/
com
/
jsoniter
/
TestSlice.java
Copy path
File metadata and controls
22 lines (17 loc) · 647 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package
com
.
jsoniter
;
import
com
.
jsoniter
.
spi
.
Slice
;
import
junit
.
framework
.
TestCase
;
import
java
.
util
.
HashMap
;
public
class
TestSlice
extends
TestCase
{
public
void
test_equals
() {
assertTrue
(
Slice
.
make
(
"hello"
).
equals
(
Slice
.
make
(
"hello"
)));
assertTrue
(
Slice
.
make
(
"hello"
).
equals
(
new
Slice
(
"ahello"
.
getBytes
(),
1
,
6
)));
}
public
void
test_hashcode
() {
HashMap
map
=
new
HashMap
();
map
.
put
(
Slice
.
make
(
"hello"
),
"hello"
);
map
.
put
(
Slice
.
make
(
"world"
),
"world"
);
assertEquals
(
"hello"
,
map
.
get
(
Slice
.
make
(
"hello"
)));
assertEquals
(
"world"
,
map
.
get
(
Slice
.
make
(
"world"
)));
}
}
Back
|
FazBrowse Home
|
New Git URL