Commit 61a8cb1
authored
[CBOR] Implement support for tagged types (#34767)
* [CBOR] Implement support for dateTime types
* fix test errors
* refine RFC3339 dateTime formatting logic
* add invalid date string tests
* Implement BigInteger support
* initial decimal support implementation
* use stack allocated buffers instead of thread local buffers
* add test cases for negative unix time dates
* add WriteNegativeIntegerEncoding tests
* implement checkpointing logic and apply to SkipValue() method
* implement checkpointing for tagged type readers
* store reader checkpoints in the stack
* add tests for rollback logic in tagged type readers
* add tested that utilizes nested reader state rollbacks
* use culture invariant decimal parsing in tests
* add WriteUnixTimeSeconds(double) method
* split unix time and string time readers into separate methods
* add WriteUnixTestSeconds invalid input test
* add support and tests for indefinite-length buffers in tagged types
* add PeekTag() tests
* add Read/WriteInt32() convenience methods
* add pervasive buffer postcondition checks on negative reader tests; fix related bug.
* add comment on DateTime parsing
* Rename CborReader.Peek() to CborReader.PeekState()
* Use correct overload for int32 handling
* add caching to CborReader.PeekState()
* Use "simple" instead of "special" for cbor major type
* add Write/ReadUInt32() convenience methods
* add uint32 negative tests1 parent ab4a117 commit 61a8cb1
File tree
27 files changed
+1753
-448
lines changed- src/libraries/System.Security.Cryptography.Encoding/tests
- Cbor.Tests
- Cbor
27 files changed
+1753
-448
lines changedLines changed: 30 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
| 58 | + | |
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| 78 | + | |
78 | 79 | | |
| 80 | + | |
79 | 81 | | |
80 | 82 | | |
81 | 83 | | |
| |||
109 | 111 | | |
110 | 112 | | |
111 | 113 | | |
112 | | - | |
| 114 | + | |
113 | 115 | | |
114 | 116 | | |
115 | 117 | | |
116 | 118 | | |
117 | | - | |
| 119 | + | |
118 | 120 | | |
119 | 121 | | |
120 | 122 | | |
| |||
131 | 133 | | |
132 | 134 | | |
133 | 135 | | |
| 136 | + | |
134 | 137 | | |
| 138 | + | |
135 | 139 | | |
136 | 140 | | |
137 | 141 | | |
| |||
150 | 154 | | |
151 | 155 | | |
152 | 156 | | |
| 157 | + | |
153 | 158 | | |
| 159 | + | |
154 | 160 | | |
155 | 161 | | |
156 | 162 | | |
| |||
172 | 178 | | |
173 | 179 | | |
174 | 180 | | |
| 181 | + | |
175 | 182 | | |
| 183 | + | |
176 | 184 | | |
177 | 185 | | |
178 | 186 | | |
| |||
199 | 207 | | |
200 | 208 | | |
201 | 209 | | |
| 210 | + | |
202 | 211 | | |
| 212 | + | |
203 | 213 | | |
204 | 214 | | |
205 | 215 | | |
| |||
221 | 231 | | |
222 | 232 | | |
223 | 233 | | |
| 234 | + | |
224 | 235 | | |
| 236 | + | |
225 | 237 | | |
226 | 238 | | |
227 | 239 | | |
| |||
231 | 243 | | |
232 | 244 | | |
233 | 245 | | |
| 246 | + | |
234 | 247 | | |
235 | 248 | | |
236 | 249 | | |
| |||
244 | 257 | | |
245 | 258 | | |
246 | 259 | | |
247 | | - | |
248 | | - | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
249 | 263 | | |
| 264 | + | |
250 | 265 | | |
251 | 266 | | |
252 | 267 | | |
| |||
261 | 276 | | |
262 | 277 | | |
263 | 278 | | |
264 | | - | |
265 | | - | |
| 279 | + | |
| 280 | + | |
266 | 281 | | |
267 | 282 | | |
| 283 | + | |
268 | 284 | | |
269 | 285 | | |
270 | 286 | | |
271 | | - | |
272 | | - | |
| 287 | + | |
| 288 | + | |
273 | 289 | | |
274 | 290 | | |
275 | 291 | | |
276 | | - | |
277 | | - | |
| 292 | + | |
| 293 | + | |
278 | 294 | | |
279 | 295 | | |
| 296 | + | |
280 | 297 | | |
281 | 298 | | |
282 | 299 | | |
Lines changed: 19 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
32 | | - | |
| 31 | + | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
| 55 | + | |
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
| 60 | + | |
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
| 65 | + | |
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | | - | |
| 69 | + | |
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | | - | |
| 73 | + | |
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
| 77 | + | |
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | | - | |
| 81 | + | |
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
| 85 | + | |
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
102 | | - | |
| 102 | + | |
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
108 | | - | |
| 108 | + | |
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
127 | | - | |
| 127 | + | |
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
| |||
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
138 | | - | |
| 138 | + | |
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
| |||
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
157 | | - | |
| 157 | + | |
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
| |||
0 commit comments