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
403f735e
Commit
403f735e
authored
7 years ago
by
wenshao
Browse files
Options
Download
Email Patches
Plain Diff
add testcae.
parent
91f3aff0
android
1.1.71.android
1.1.68.android
1.1.67.android
1.1.66.android
1.1.65.android
1.1.64.android
1.1.63.android
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/test/java/com/alibaba/json/bvt/issue_1400/Issue1422.java
+38
-0
src/test/java/com/alibaba/json/bvt/issue_1400/Issue1422.java
with
38 additions
and
0 deletions
+38
-0
src/test/java/com/alibaba/json/bvt/issue_1400/Issue1422.java
0 → 100644
+
38
-
0
View file @
403f735e
package
com.alibaba.json.bvt.issue_1400
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONReader
;
import
junit.framework.TestCase
;
import
java.io.StringReader
;
public
class
Issue1422
extends
TestCase
{
public
void
test_for_issue
()
throws
Exception
{
String
strOk
=
"{\"v\": 111}"
;
Foo
ok
=
JSON
.
parseObject
(
strOk
,
Foo
.
class
);
assertFalse
(
ok
.
v
);
}
public
void
test_for_issue_reader
()
throws
Exception
{
String
strBad
=
"{\"v\": 111}"
;
Foo
bad
=
new
JSONReader
(
new
StringReader
(
strBad
)).
readObject
(
Foo
.
class
);
assertFalse
(
bad
.
v
);
}
public
void
test_for_issue_1
()
throws
Exception
{
String
strBad
=
"{\"v\":111}"
;
Foo
bad
=
JSON
.
parseObject
(
strBad
,
Foo
.
class
);
assertFalse
(
bad
.
v
);
}
public
void
test_for_issue_1_reader
()
throws
Exception
{
String
strBad
=
"{\"v\":111}"
;
Foo
bad
=
new
JSONReader
(
new
StringReader
(
strBad
)).
readObject
(
Foo
.
class
);
assertFalse
(
bad
.
v
);
}
public
static
class
Foo
{
public
boolean
v
;
}
}
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