mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-14 18:05:27 +07:00
move ancient json parsing tests
GitOrigin-RevId: bce5ccdefaed613a250ff504b890c814dc4e4de3
This commit is contained in:
committed by
intellij-monorepo-bot
parent
949b7765df
commit
782de76c3d
@@ -77,6 +77,10 @@ public class JsonParsingTest extends ParsingTestCase {
|
||||
|
||||
// Moved from JavaScript
|
||||
|
||||
public void testSimple() {
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testSimple1() {
|
||||
doTest();
|
||||
}
|
||||
@@ -89,6 +93,10 @@ public class JsonParsingTest extends ParsingTestCase {
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testReal() {
|
||||
doTest();
|
||||
}
|
||||
|
||||
// TODO: ask about these tests
|
||||
//public void testSimple3() {
|
||||
// doTest();
|
||||
|
||||
8
json/tests/testData/psi/Real.json
Normal file
8
json/tests/testData/psi/Real.json
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
navigation: [
|
||||
{
|
||||
name: "Demo Applications",
|
||||
demos: [ "Mail", "Moxie" ]
|
||||
}
|
||||
]
|
||||
}
|
||||
46
json/tests/testData/psi/Real.txt
Normal file
46
json/tests/testData/psi/Real.txt
Normal file
@@ -0,0 +1,46 @@
|
||||
JsonFile: Real.json
|
||||
JsonObject
|
||||
PsiElement({)('{')
|
||||
PsiWhiteSpace('\n ')
|
||||
JsonProperty
|
||||
JsonReferenceExpression
|
||||
PsiElement(IDENTIFIER)('navigation')
|
||||
PsiElement(:)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
JsonArray
|
||||
PsiElement([)('[')
|
||||
PsiWhiteSpace('\n ')
|
||||
JsonObject
|
||||
PsiElement({)('{')
|
||||
PsiWhiteSpace('\n ')
|
||||
JsonProperty
|
||||
JsonReferenceExpression
|
||||
PsiElement(IDENTIFIER)('name')
|
||||
PsiElement(:)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
JsonStringLiteral
|
||||
PsiElement(DOUBLE_QUOTED_STRING)('"Demo Applications"')
|
||||
PsiElement(,)(',')
|
||||
PsiWhiteSpace('\n ')
|
||||
JsonProperty
|
||||
JsonReferenceExpression
|
||||
PsiElement(IDENTIFIER)('demos')
|
||||
PsiElement(:)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
JsonArray
|
||||
PsiElement([)('[')
|
||||
PsiWhiteSpace(' ')
|
||||
JsonStringLiteral
|
||||
PsiElement(DOUBLE_QUOTED_STRING)('"Mail"')
|
||||
PsiElement(,)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
JsonStringLiteral
|
||||
PsiElement(DOUBLE_QUOTED_STRING)('"Moxie"')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(])(']')
|
||||
PsiWhiteSpace('\n ')
|
||||
PsiElement(})('}')
|
||||
PsiWhiteSpace('\n ')
|
||||
PsiElement(])(']')
|
||||
PsiWhiteSpace('\n')
|
||||
PsiElement(})('}')
|
||||
1
json/tests/testData/psi/Simple.json
Normal file
1
json/tests/testData/psi/Simple.json
Normal file
@@ -0,0 +1 @@
|
||||
{ "x": "x value", "y": "y value", "z": "z value", "z2":[] }
|
||||
40
json/tests/testData/psi/Simple.txt
Normal file
40
json/tests/testData/psi/Simple.txt
Normal file
@@ -0,0 +1,40 @@
|
||||
JsonFile: Simple.json
|
||||
JsonObject
|
||||
PsiElement({)('{')
|
||||
PsiWhiteSpace(' ')
|
||||
JsonProperty
|
||||
JsonStringLiteral
|
||||
PsiElement(DOUBLE_QUOTED_STRING)('"x"')
|
||||
PsiElement(:)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
JsonStringLiteral
|
||||
PsiElement(DOUBLE_QUOTED_STRING)('"x value"')
|
||||
PsiElement(,)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
JsonProperty
|
||||
JsonStringLiteral
|
||||
PsiElement(DOUBLE_QUOTED_STRING)('"y"')
|
||||
PsiElement(:)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
JsonStringLiteral
|
||||
PsiElement(DOUBLE_QUOTED_STRING)('"y value"')
|
||||
PsiElement(,)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
JsonProperty
|
||||
JsonStringLiteral
|
||||
PsiElement(DOUBLE_QUOTED_STRING)('"z"')
|
||||
PsiElement(:)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
JsonStringLiteral
|
||||
PsiElement(DOUBLE_QUOTED_STRING)('"z value"')
|
||||
PsiElement(,)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
JsonProperty
|
||||
JsonStringLiteral
|
||||
PsiElement(DOUBLE_QUOTED_STRING)('"z2"')
|
||||
PsiElement(:)(':')
|
||||
JsonArray
|
||||
PsiElement([)('[')
|
||||
PsiElement(])(']')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(})('}')
|
||||
Reference in New Issue
Block a user