tests/sav: Update tests results
[nit.git] / tests / sav / test_json_deserialization_alt3.res
1 # Nit:
2 <A: true a 0.123 1234 asdf false p4ssw0rd>
3
4 # Json:
5 {
6         "__kind": "obj", "__id": 0, "__class": "A",
7         "b": true,
8         "c": {"__kind": "char", "__val": "a"},
9         "f": 0.123,
10         "i": 1234,
11         "serialization_specific_name": "asdf",
12         "n": null
13 }
14
15 # Back in Nit:
16 <A: true a 0.123 1234 asdf false p4ssw0rd>
17
18 # Nit:
19 <B: <A: false b 123.123 2345 hjkl true p4ssw0rd> 1111 qwer>
20
21 # Json:
22 {
23         "__kind": "obj", "__id": 0, "__class": "B",
24         "b": false,
25         "c": {"__kind": "char", "__val": "b"},
26         "f": 123.123,
27         "i": 2345,
28         "serialization_specific_name": "hjkl",
29         "n": 12,
30         "ii": 1111,
31         "ss": "qwer"
32 }
33
34 # Back in Nit:
35 <B: <A: false b 123.123 2345 hjkl true p4ssw0rd> 1111 qwer>
36
37 # Nit:
38 <C: <A: true a 0.123 1234 asdf false p4ssw0rd> <B: <A: false b 123.123 2345 hjkl true p4ssw0rd> 1111 qwer>>
39
40 # Json:
41 {
42         "__kind": "obj", "__id": 0, "__class": "C",
43         "a": {
44                 "__kind": "obj", "__id": 1, "__class": "A",
45                 "b": true,
46                 "c": {"__kind": "char", "__val": "a"},
47                 "f": 0.123,
48                 "i": 1234,
49                 "serialization_specific_name": "asdf",
50                 "n": null
51         },
52         "b": {
53                 "__kind": "obj", "__id": 2, "__class": "B",
54                 "b": false,
55                 "c": {"__kind": "char", "__val": "b"},
56                 "f": 123.123,
57                 "i": 2345,
58                 "serialization_specific_name": "hjkl",
59                 "n": 12,
60                 "ii": 1111,
61                 "ss": "qwer"
62         },
63         "aa": {
64                 "__kind": "ref", "__id": 1
65         }
66 }
67
68 # Back in Nit:
69 <C: <A: true a 0.123 1234 asdf false p4ssw0rd> <B: <A: false b 123.123 2345 hjkl true p4ssw0rd> 1111 qwer>>
70
71 # Nit:
72 <D: <B: <A: false b 123.123 2345 new line ->
73 <- false p4ssw0rd> 1111         f"\r\/> true>
74
75 # Json:
76 {
77         "__kind": "obj", "__id": 0, "__class": "D",
78         "b": false,
79         "c": {"__kind": "char", "__val": "b"},
80         "f": 123.123,
81         "i": 2345,
82         "serialization_specific_name": "new line ->\n<-",
83         "n": null,
84         "ii": 1111,
85         "ss": "\tf\"\r\\/",
86         "d": {
87                 "__kind": "ref", "__id": 0
88         }
89 }
90
91 # Back in Nit:
92 <D: <B: <A: false b 123.123 2345 new line ->
93 <- false p4ssw0rd> 1111         f"\r\/> true>
94
95 # Nit:
96 <E: a: hello, 1234, 123.4; b: hella, 2345, 234.5>
97
98 # Json:
99 {
100         "__kind": "obj", "__id": 0, "__class": "E",
101         "a": {
102                 "__kind": "obj", "__id": 1, "__class": "Array[Object]",
103                 "__items": ["hello", 1234, 123.4]
104         },
105         "b": {
106                 "__kind": "obj", "__id": 2, "__class": "Array[nullable Serializable]",
107                 "__items": ["hella", 2345, 234.5]
108         }
109 }
110
111 # Back in Nit:
112 <E: a: hello, 1234, 123.4; b: hella, 2345, 234.5>
113
114 # Nit:
115 <F: 2222>
116
117 # Json:
118 {
119         "__kind": "obj", "__id": 0, "__class": "F[Int]",
120         "n": 2222
121 }
122
123 # Back in Nit:
124 <F: 2222>
125
126 # Nit:
127 <F: 33.33>
128
129 # Json:
130 {
131         "__kind": "obj", "__id": 0, "__class": "F[Float]",
132         "n": 33.33
133 }
134
135 # Back in Nit:
136 <F: 33.33>
137
138 # Nit:
139 <G: hs: -1, 0; s: one, two; hm: one. 1, two. 2; am: three. 3, four. 4>
140
141 # Json:
142 {
143         "__kind": "obj", "__id": 0, "__class": "G",
144         "hs": {
145                 "__kind": "obj", "__id": 1, "__class": "HashSet[Int]",
146                 "__items": [-1, 0]
147         },
148         "s": {
149                 "__kind": "obj", "__id": 2, "__class": "ArraySet[String]",
150                 "__items": ["one", "two"]
151         },
152         "hm": {
153                 "__kind": "obj", "__id": 3, "__class": "HashMap[String, Int]", "__length": 2,
154                 "__keys": ["one", "two"],
155                 "__values": [1, 2]
156         },
157         "am": {
158                 "__kind": "obj", "__id": 4, "__class": "ArrayMap[String, String]", "__length": 2,
159                 "__keys": ["three", "four"],
160                 "__values": ["3", "4"]
161         }
162 }
163
164 # Back in Nit:
165 <G: hs: -1, 0; s: one, two; hm: one. 1, two. 2; am: three. 3, four. 4>
166