Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
Fastjson
Commits
700ad12a
Commit
700ad12a
authored
9 years ago
by
高铁
Browse files
Options
Download
Email Patches
Plain Diff
add testcase
parent
9c58a545
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/test/java/com/alibaba/json/bvt/SpecialKeyTest2.java
+27
-0
src/test/java/com/alibaba/json/bvt/SpecialKeyTest2.java
with
27 additions
and
0 deletions
+27
-0
src/test/java/com/alibaba/json/bvt/SpecialKeyTest2.java
0 → 100644
+
27
-
0
View file @
700ad12a
package
com.alibaba.json.bvt
;
import
java.util.Map
;
import
org.junit.Assert
;
import
com.alibaba.fastjson.JSON
;
import
junit.framework.TestCase
;
public
class
SpecialKeyTest2
extends
TestCase
{
public
void
test_0
()
throws
Exception
{
Model
model
=
JSON
.
parseObject
(
"{\"items\":{\"1\":{},\"1001\":{}},\"items1\":{\"$ref\":\"$.items\"}}"
,
Model
.
class
);
Assert
.
assertEquals
(
2
,
model
.
items
.
size
());
Assert
.
assertNotNull
(
model
.
items
.
get
(
1L
));
Assert
.
assertNotNull
(
model
.
items
.
get
(
1001L
));
Assert
.
assertSame
(
model
.
items
,
model
.
items1
);
}
public
static
class
Model
{
public
Map
<
Long
,
Item
>
items
;
public
Map
<
Long
,
Item
>
items1
;
}
public
static
class
Item
{
}
}
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help