| OLD | NEW |
| 1 #region Copyright notice and license | 1 #region Copyright notice and license |
| 2 // Protocol Buffers - Google's data interchange format | 2 // Protocol Buffers - Google's data interchange format |
| 3 // Copyright 2008 Google Inc. All rights reserved. | 3 // Copyright 2008 Google Inc. All rights reserved. |
| 4 // https://developers.google.com/protocol-buffers/ | 4 // https://developers.google.com/protocol-buffers/ |
| 5 // | 5 // |
| 6 // Redistribution and use in source and binary forms, with or without | 6 // Redistribution and use in source and binary forms, with or without |
| 7 // modification, are permitted provided that the following conditions are | 7 // modification, are permitted provided that the following conditions are |
| 8 // met: | 8 // met: |
| 9 // | 9 // |
| 10 // * Redistributions of source code must retain the above copyright | 10 // * Redistributions of source code must retain the above copyright |
| (...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 } | 242 } |
| 243 | 243 |
| 244 [Test] | 244 [Test] |
| 245 [TestCase("[10, 20", 3)] | 245 [TestCase("[10, 20", 3)] |
| 246 [TestCase("[10,", 2)] | 246 [TestCase("[10,", 2)] |
| 247 [TestCase("[10:20]", 2)] | 247 [TestCase("[10:20]", 2)] |
| 248 [TestCase("[", 1)] | 248 [TestCase("[", 1)] |
| 249 [TestCase("[,", 1)] | 249 [TestCase("[,", 1)] |
| 250 [TestCase("{", 1)] | 250 [TestCase("{", 1)] |
| 251 [TestCase("{,", 1)] | 251 [TestCase("{,", 1)] |
| 252 [TestCase("{", 1)] | |
| 253 [TestCase("{[", 1)] | 252 [TestCase("{[", 1)] |
| 254 [TestCase("{{", 1)] | 253 [TestCase("{{", 1)] |
| 255 [TestCase("{0", 1)] | 254 [TestCase("{0", 1)] |
| 256 [TestCase("{null", 1)] | 255 [TestCase("{null", 1)] |
| 257 [TestCase("{false", 1)] | 256 [TestCase("{false", 1)] |
| 258 [TestCase("{true", 1)] | 257 [TestCase("{true", 1)] |
| 259 [TestCase("}", 0)] | 258 [TestCase("}", 0)] |
| 260 [TestCase("]", 0)] | 259 [TestCase("]", 0)] |
| 261 [TestCase(",", 0)] | 260 [TestCase(",", 0)] |
| 262 [TestCase("'foo' 'bar'", 1)] | 261 [TestCase("'foo' 'bar'", 1)] |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 400 if (actualToken == JsonToken.EndDocument) | 399 if (actualToken == JsonToken.EndDocument) |
| 401 { | 400 { |
| 402 Assert.Fail("Expected {0} but reached end of document", expe
ctedTokens[i]); | 401 Assert.Fail("Expected {0} but reached end of document", expe
ctedTokens[i]); |
| 403 } | 402 } |
| 404 Assert.AreEqual(expectedTokens[i], actualToken); | 403 Assert.AreEqual(expectedTokens[i], actualToken); |
| 405 } | 404 } |
| 406 Assert.Throws<InvalidJsonException>(() => tokenizer.Next()); | 405 Assert.Throws<InvalidJsonException>(() => tokenizer.Next()); |
| 407 } | 406 } |
| 408 } | 407 } |
| 409 } | 408 } |
| OLD | NEW |