From bfddda84f4233f55dc2220bbb33e94e625110a8b Mon Sep 17 00:00:00 2001 From: James Newton-King Date: Mon, 23 Jan 2017 17:56:31 +1300 Subject: [PATCH] -Tests --- .../JsonTextReaderTests/ExceptionHandlingAsyncTests.cs | 2 +- .../JsonTextReaderTests/ExceptionHandlingTests.cs | 2 +- .../JsonTextReaderTests/MiscAsyncTests.cs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Src/Newtonsoft.Json.Tests/JsonTextReaderTests/ExceptionHandlingAsyncTests.cs b/Src/Newtonsoft.Json.Tests/JsonTextReaderTests/ExceptionHandlingAsyncTests.cs index db959b22..09e6f0b7 100644 --- a/Src/Newtonsoft.Json.Tests/JsonTextReaderTests/ExceptionHandlingAsyncTests.cs +++ b/Src/Newtonsoft.Json.Tests/JsonTextReaderTests/ExceptionHandlingAsyncTests.cs @@ -76,7 +76,7 @@ namespace Newtonsoft.Json.Tests.JsonTextReaderTests { JsonReader reader = new JsonTextReader(new StringReader(@"'h\u123")); - await ExceptionAssert.ThrowsAsync(async () => { await reader.ReadAsync(); }, "Unexpected end while parsing Unicode character. Path '', line 1, position 4."); + await ExceptionAssert.ThrowsAsync(async () => { await reader.ReadAsync(); }, "Unexpected end while parsing Unicode escape sequence. Path '', line 1, position 4."); } [Test] diff --git a/Src/Newtonsoft.Json.Tests/JsonTextReaderTests/ExceptionHandlingTests.cs b/Src/Newtonsoft.Json.Tests/JsonTextReaderTests/ExceptionHandlingTests.cs index c278baef..624e2e36 100644 --- a/Src/Newtonsoft.Json.Tests/JsonTextReaderTests/ExceptionHandlingTests.cs +++ b/Src/Newtonsoft.Json.Tests/JsonTextReaderTests/ExceptionHandlingTests.cs @@ -87,7 +87,7 @@ namespace Newtonsoft.Json.Tests.JsonTextReaderTests { JsonReader reader = new JsonTextReader(new StringReader(@"'h\u123")); - ExceptionAssert.Throws(() => { reader.Read(); }, "Unexpected end while parsing Unicode character. Path '', line 1, position 4."); + ExceptionAssert.Throws(() => { reader.Read(); }, "Unexpected end while parsing Unicode escape sequence. Path '', line 1, position 4."); } [Test] diff --git a/Src/Newtonsoft.Json.Tests/JsonTextReaderTests/MiscAsyncTests.cs b/Src/Newtonsoft.Json.Tests/JsonTextReaderTests/MiscAsyncTests.cs index 138fd8ee..112368ae 100644 --- a/Src/Newtonsoft.Json.Tests/JsonTextReaderTests/MiscAsyncTests.cs +++ b/Src/Newtonsoft.Json.Tests/JsonTextReaderTests/MiscAsyncTests.cs @@ -983,9 +983,10 @@ null//comment Assert.IsFalse(await r.ReadAsync()); } +#endif [Test] - public async Task InvalidUnicodeSequence() + public async Task InvalidUnicodeSequenceAsync() { string json1 = @"{'prop':'\u123!'}"; @@ -996,7 +997,6 @@ null//comment await ExceptionAssert.ThrowsAsync(async () => { await r.ReadAsync(); }, @"Invalid Unicode escape sequence: \u123!. Path 'prop', line 1, position 11."); } -#endif } }