From 79183c8b683594a260cf74c7485f9e517c31ccb6 Mon Sep 17 00:00:00 2001 From: "Valeriano A.R" Date: Sun, 6 Sep 2020 03:48:17 +0200 Subject: [PATCH] Convert old validity tests to a test project. --- .gitignore | 1 + VAR.Json.Tests/JsonParser_Tests.cs | 365 ++++++++++++++++++++++ VAR.Json.Tests/Program.cs | 129 -------- VAR.Json.Tests/Properties/AssemblyInfo.cs | 32 +- VAR.Json.Tests/VAR.Json.Tests.csproj | 103 +++--- VAR.Json.Tests/packages.config | 5 + VAR.Json.Tests/tests/fail01.json | 1 - VAR.Json.Tests/tests/fail02.json | 1 - VAR.Json.Tests/tests/fail03.json | 1 - VAR.Json.Tests/tests/fail04.json | 1 - VAR.Json.Tests/tests/fail05.json | 1 - VAR.Json.Tests/tests/fail06.json | 1 - VAR.Json.Tests/tests/fail07.json | 1 - VAR.Json.Tests/tests/fail08.json | 1 - VAR.Json.Tests/tests/fail09.json | 1 - VAR.Json.Tests/tests/fail10.json | 1 - VAR.Json.Tests/tests/fail11.json | 1 - VAR.Json.Tests/tests/fail12.json | 1 - VAR.Json.Tests/tests/fail13.json | 1 - VAR.Json.Tests/tests/fail14.json | 1 - VAR.Json.Tests/tests/fail15.json | 1 - VAR.Json.Tests/tests/fail16.json | 1 - VAR.Json.Tests/tests/fail17.json | 1 - VAR.Json.Tests/tests/fail18.json | 1 - VAR.Json.Tests/tests/fail19.json | 1 - VAR.Json.Tests/tests/fail20.json | 1 - VAR.Json.Tests/tests/fail21.json | 1 - VAR.Json.Tests/tests/fail22.json | 1 - VAR.Json.Tests/tests/fail23.json | 1 - VAR.Json.Tests/tests/fail24.json | 1 - VAR.Json.Tests/tests/fail25.json | 1 - VAR.Json.Tests/tests/fail26.json | 1 - VAR.Json.Tests/tests/fail27.json | 2 - VAR.Json.Tests/tests/fail28.json | 2 - VAR.Json.Tests/tests/fail29.json | 1 - VAR.Json.Tests/tests/fail30.json | 1 - VAR.Json.Tests/tests/fail31.json | 1 - VAR.Json.Tests/tests/fail32.json | 1 - VAR.Json.Tests/tests/fail33.json | 1 - VAR.Json.Tests/tests/pass01.json | 58 ---- VAR.Json.Tests/tests/pass02.json | 1 - VAR.Json.Tests/tests/pass03.json | 6 - VAR.Json.sln | 19 +- 43 files changed, 466 insertions(+), 288 deletions(-) create mode 100644 VAR.Json.Tests/JsonParser_Tests.cs delete mode 100644 VAR.Json.Tests/Program.cs create mode 100644 VAR.Json.Tests/packages.config delete mode 100644 VAR.Json.Tests/tests/fail01.json delete mode 100644 VAR.Json.Tests/tests/fail02.json delete mode 100644 VAR.Json.Tests/tests/fail03.json delete mode 100644 VAR.Json.Tests/tests/fail04.json delete mode 100644 VAR.Json.Tests/tests/fail05.json delete mode 100644 VAR.Json.Tests/tests/fail06.json delete mode 100644 VAR.Json.Tests/tests/fail07.json delete mode 100644 VAR.Json.Tests/tests/fail08.json delete mode 100644 VAR.Json.Tests/tests/fail09.json delete mode 100644 VAR.Json.Tests/tests/fail10.json delete mode 100644 VAR.Json.Tests/tests/fail11.json delete mode 100644 VAR.Json.Tests/tests/fail12.json delete mode 100644 VAR.Json.Tests/tests/fail13.json delete mode 100644 VAR.Json.Tests/tests/fail14.json delete mode 100644 VAR.Json.Tests/tests/fail15.json delete mode 100644 VAR.Json.Tests/tests/fail16.json delete mode 100644 VAR.Json.Tests/tests/fail17.json delete mode 100644 VAR.Json.Tests/tests/fail18.json delete mode 100644 VAR.Json.Tests/tests/fail19.json delete mode 100644 VAR.Json.Tests/tests/fail20.json delete mode 100644 VAR.Json.Tests/tests/fail21.json delete mode 100644 VAR.Json.Tests/tests/fail22.json delete mode 100644 VAR.Json.Tests/tests/fail23.json delete mode 100644 VAR.Json.Tests/tests/fail24.json delete mode 100644 VAR.Json.Tests/tests/fail25.json delete mode 100644 VAR.Json.Tests/tests/fail26.json delete mode 100644 VAR.Json.Tests/tests/fail27.json delete mode 100644 VAR.Json.Tests/tests/fail28.json delete mode 100644 VAR.Json.Tests/tests/fail29.json delete mode 100644 VAR.Json.Tests/tests/fail30.json delete mode 100644 VAR.Json.Tests/tests/fail31.json delete mode 100644 VAR.Json.Tests/tests/fail32.json delete mode 100644 VAR.Json.Tests/tests/fail33.json delete mode 100644 VAR.Json.Tests/tests/pass01.json delete mode 100644 VAR.Json.Tests/tests/pass02.json delete mode 100644 VAR.Json.Tests/tests/pass03.json diff --git a/.gitignore b/.gitignore index 150b756..add01fa 100644 --- a/.gitignore +++ b/.gitignore @@ -28,3 +28,4 @@ _ReSharper*/ *.userprefs *.nupkg /.vs/* +/packages/* diff --git a/VAR.Json.Tests/JsonParser_Tests.cs b/VAR.Json.Tests/JsonParser_Tests.cs new file mode 100644 index 0000000..d346f63 --- /dev/null +++ b/VAR.Json.Tests/JsonParser_Tests.cs @@ -0,0 +1,365 @@ +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace VAR.Json.Tests +{ + [TestClass()] + public class JsonParser_Tests + { + #region Validity tests + + [TestMethod()] + public void Parse__Validity_Fail01() + { + JsonParser parser = new JsonParser(); + object result = parser.Parse(@"""A JSON payload should be an object or array, not a string."""); + Assert.AreEqual(true, parser.Tainted); + } + + [TestMethod()] + public void Parse__Validity_Fail02() + { + JsonParser parser = new JsonParser(); + object result = parser.Parse(@"[""Unclosed array"""); + Assert.AreEqual(true, parser.Tainted); + } + + [TestMethod()] + public void Parse__Validity_Fail03() + { + JsonParser parser = new JsonParser(); + object result = parser.Parse(@"{unquoted_key: ""keys must be quoted""}"); + Assert.AreEqual(true, parser.Tainted); + } + + [TestMethod()] + public void Parse__Validity_Fail04() + { + JsonParser parser = new JsonParser(); + object result = parser.Parse(@"[""extra comma"",]"); + Assert.AreEqual(true, parser.Tainted); + } + + [TestMethod()] + public void Parse__Validity_Fail05() + { + JsonParser parser = new JsonParser(); + object result = parser.Parse(@"[""double extra comma"",,]"); + Assert.AreEqual(true, parser.Tainted); + } + + [TestMethod()] + public void Parse__Validity_Fail06() + { + JsonParser parser = new JsonParser(); + object result = parser.Parse(@"[ , ""<-- missing value""]"); + Assert.AreEqual(true, parser.Tainted); + } + + [TestMethod()] + public void Parse__Validity_Fail07() + { + JsonParser parser = new JsonParser(); + object result = parser.Parse(@"[""Comma after the close""],"); + Assert.AreEqual(true, parser.Tainted); + } + + [TestMethod()] + public void Parse__Validity_Fail08() + { + JsonParser parser = new JsonParser(); + object result = parser.Parse(@"[""Extra close""]]"); + Assert.AreEqual(true, parser.Tainted); + } + + [TestMethod()] + public void Parse__Validity_Fail09() + { + JsonParser parser = new JsonParser(); + object result = parser.Parse(@"{""Extra comma"": true,}"); + Assert.AreEqual(true, parser.Tainted); + } + + [TestMethod()] + public void Parse__Validity_Fail10() + { + JsonParser parser = new JsonParser(); + object result = parser.Parse(@"{""Extra value after close"": true} ""misplaced quoted value"""); + Assert.AreEqual(true, parser.Tainted); + } + + [TestMethod()] + public void Parse__Validity_Fail11() + { + JsonParser parser = new JsonParser(); + object result = parser.Parse(@"{""Illegal expression"": 1 + 2}"); + Assert.AreEqual(true, parser.Tainted); + } + + [TestMethod()] + public void Parse__Validity_Fail12() + { + JsonParser parser = new JsonParser(); + object result = parser.Parse(@"{""Illegal invocation"": alert()}"); + Assert.AreEqual(true, parser.Tainted); + } + + [TestMethod()] + public void Parse__Validity_Fail13() + { + JsonParser parser = new JsonParser(); + object result = parser.Parse(@"{""Numbers cannot have leading zeroes"": 013}"); + Assert.AreEqual(true, parser.Tainted); + } + + [TestMethod()] + public void Parse__Validity_Fail14() + { + JsonParser parser = new JsonParser(); + object result = parser.Parse(@"{""Numbers cannot be hex"": 0x14}"); + Assert.AreEqual(true, parser.Tainted); + } + + [TestMethod()] + public void Parse__Validity_Fail15() + { + JsonParser parser = new JsonParser(); + object result = parser.Parse(@"[""Illegal backslash escape: \x15""]"); + Assert.AreEqual(true, parser.Tainted); + } + + [TestMethod()] + public void Parse__Validity_Fail16() + { + JsonParser parser = new JsonParser(); + object result = parser.Parse(@"[\naked]"); + Assert.AreEqual(true, parser.Tainted); + } + + [TestMethod()] + public void Parse__Validity_Fail17() + { + JsonParser parser = new JsonParser(); + object result = parser.Parse(@"[""Illegal backslash escape: \017""]"); + Assert.AreEqual(true, parser.Tainted); + } + + [TestMethod()] + public void Parse__Validity_Fail18() + { + JsonParser parser = new JsonParser(); + object result = parser.Parse(@"[[[[[[[[[[[[[[[[[[[[""Too deep""]]]]]]]]]]]]]]]]]]]]"); + Assert.AreEqual(true, parser.Tainted); + } + + [TestMethod()] + public void Parse__Validity_Fail19() + { + JsonParser parser = new JsonParser(); + object result = parser.Parse(@"{""Missing colon"" null}"); + Assert.AreEqual(true, parser.Tainted); + } + + [TestMethod()] + public void Parse__Validity_Fail20() + { + JsonParser parser = new JsonParser(); + object result = parser.Parse(@"{""Double colon"":: null}"); + Assert.AreEqual(true, parser.Tainted); + } + + [TestMethod()] + public void Parse__Validity_Fail21() + { + JsonParser parser = new JsonParser(); + object result = parser.Parse(@"{""Comma instead of colon"", null}"); + Assert.AreEqual(true, parser.Tainted); + } + + [TestMethod()] + public void Parse__Validity_Fail22() + { + JsonParser parser = new JsonParser(); + object result = parser.Parse(@"[""Colon instead of comma"": false]"); + Assert.AreEqual(true, parser.Tainted); + } + + [TestMethod()] + public void Parse__Validity_Fail23() + { + JsonParser parser = new JsonParser(); + object result = parser.Parse(@"[""Bad value"", truth]"); + Assert.AreEqual(true, parser.Tainted); + } + + [TestMethod()] + public void Parse__Validity_Fail24() + { + JsonParser parser = new JsonParser(); + object result = parser.Parse(@"['single quote']"); + Assert.AreEqual(true, parser.Tainted); + } + + [TestMethod()] + public void Parse__Validity_Fail25() + { + JsonParser parser = new JsonParser(); + object result = parser.Parse(@"["" tab character in string ""]"); + Assert.AreEqual(true, parser.Tainted); + } + + [TestMethod()] + public void Parse__Validity_Fail26() + { + JsonParser parser = new JsonParser(); + object result = parser.Parse(@"[""tab\ character\ in\ string\ ""]"); + Assert.AreEqual(true, parser.Tainted); + } + + [TestMethod()] + public void Parse__Validity_Fail27() + { + JsonParser parser = new JsonParser(); + object result = parser.Parse(@"[""line +break""]"); + Assert.AreEqual(true, parser.Tainted); + } + + [TestMethod()] + public void Parse__Validity_Fail28() + { + JsonParser parser = new JsonParser(); + object result = parser.Parse(@"[""line\ +break""]"); + Assert.AreEqual(true, parser.Tainted); + } + + [TestMethod()] + public void Parse__Validity_Fail29() + { + JsonParser parser = new JsonParser(); + object result = parser.Parse(@"[0e]"); + Assert.AreEqual(true, parser.Tainted); + } + + [TestMethod()] + public void Parse__Validity_Fail30() + { + JsonParser parser = new JsonParser(); + object result = parser.Parse(@"[0e+]"); + Assert.AreEqual(true, parser.Tainted); + } + + [TestMethod()] + public void Parse__Validity_Fail31() + { + JsonParser parser = new JsonParser(); + object result = parser.Parse(@"[0e+-1]"); + Assert.AreEqual(true, parser.Tainted); + } + + [TestMethod()] + public void Parse__Validity_Fail32() + { + JsonParser parser = new JsonParser(); + object result = parser.Parse(@"{""Comma instead if closing brace"": true,"); + Assert.AreEqual(true, parser.Tainted); + } + + [TestMethod()] + public void Parse__Validity_Fail33() + { + JsonParser parser = new JsonParser(); + object result = parser.Parse(@"[""mismatch""}"); + Assert.AreEqual(true, parser.Tainted); + } + + [TestMethod()] + public void Parse__Validity_Pass01() + { + JsonParser parser = new JsonParser(); + object result = parser.Parse(@"[ + ""JSON Test Pattern pass1"", + {""object with 1 member"":[""array with 1 element""]}, + {}, + [], + -42, + true, + false, + null, + { + ""integer"": 1234567890, + ""real"": -9876.543210, + ""e"": 0.123456789e-12, + ""E"": 1.234567890E+34, + """": 23456789012E66, + ""zero"": 0, + ""one"": 1, + ""space"": "" "", + ""quote"": ""\"""", + ""backslash"": ""\\"", + ""controls"": ""\b\f\n\r\t"", + ""slash"": ""/ & \/"", + ""alpha"": ""abcdefghijklmnopqrstuvwyz"", + ""ALPHA"": ""ABCDEFGHIJKLMNOPQRSTUVWYZ"", + ""digit"": ""0123456789"", + ""0123456789"": ""digit"", + ""special"": ""`1~!@#$%^&*()_+-={':[,]}|;.?"", + ""hex"": ""\u0123\u4567\u89AB\uCDEF\uabcd\uef4A"", + ""true"": true, + ""false"": false, + ""null"": null, + ""array"":[ ], + ""object"":{ }, + ""address"": ""50 St. James Street"", + ""url"": ""http://www.JSON.org/"", + ""comment"": ""// /* */"": "" "", + "" s p a c e d "" :[1,2 , 3 + +, + +4 , 5 , 6 ,7 ],""compact"":[1,2,3,4,5,6,7], + ""jsontext"": ""{\""object with 1 member\"":[\""array with 1 element\""]}"", + ""quotes"": """ \u0022 %22 0x22 034 """, + ""\/\\\""\uCAFE\uBABE\uAB98\uFCDE\ubcda\uef4A\b\f\n\r\t`1~!@#$%^&*()_+-=[]{}|;:',./<>?"" +: ""A key can be any string"" + }, + 0.5 ,98.6 +, +99.44 +, + +1066, +1e1, +0.1e1, +1e-1, +1e00,2e+00,2e-00 +,""rosebud""]"); + Assert.AreEqual(false, parser.Tainted); + } + + [TestMethod()] + public void Parse__Validity_Pass02() + { + JsonParser parser = new JsonParser(); + object result = parser.Parse(@"[[[[[[[[[[[[[[[[[[[""Not too deep""]]]]]]]]]]]]]]]]]]]"); + Assert.AreEqual(false, parser.Tainted); + } + + [TestMethod()] + public void Parse__Validity_Pass03() + { + JsonParser parser = new JsonParser(); + object result = parser.Parse(@"{ + ""JSON Test Pattern pass3"": { + ""The outermost value"": ""must be an object or array."", + ""In this test"": ""It is an object."" + } +} +"); + Assert.AreEqual(false, parser.Tainted); + } + + #endregion Validity tests + } +} \ No newline at end of file diff --git a/VAR.Json.Tests/Program.cs b/VAR.Json.Tests/Program.cs deleted file mode 100644 index c163feb..0000000 --- a/VAR.Json.Tests/Program.cs +++ /dev/null @@ -1,129 +0,0 @@ -using System; -using System.IO; -using System.Text; - -namespace VAR.Json.Tests -{ - class Program - { - static void Main(string[] args) - { - // http://www.json.org/JSON_checker/ - - string currentPath = System.Reflection.Assembly.GetEntryAssembly().Location; - currentPath = FindPath(currentPath, "tests"); - - // Test all files - string[] files; - files = Directory.GetFiles(currentPath, "*.json"); - foreach (string file in files) - { - TestFile(file); - } - - Console.Read(); - } - - private static void TestFile(string fileName) - { - string testName = Path.GetFileNameWithoutExtension(fileName); - string fileContent = File.ReadAllText(fileName, Encoding.UTF8); - if (testName.StartsWith("fail")) - { - TestFailCase(testName, fileContent); - } - if (testName.StartsWith("pass")) - { - TestPassCase(testName, fileContent); - } - } - - private static void TestFailCase(string testName, string fileContent) - { - JsonParser parser = new JsonParser(); - object result; - try - { - result = parser.Parse(fileContent); - } - catch (Exception ex) - { - OutputFailure(testName, fileContent, ex); - return; - } - if (parser.Tainted == false) - { - OutputFailure(testName, fileContent, result); - return; - } - Console.Out.WriteLine("OK! {0}", testName); - } - - private static void TestPassCase(string testName, string fileContent) - { - JsonParser parser = new JsonParser(); - object result; - try - { - result = parser.Parse(fileContent); - } - catch (Exception ex) - { - OutputFailure(testName, fileContent, ex); - return; - } - if (parser.Tainted) - { - OutputFailure(testName, fileContent, result); - return; - } - Console.Out.WriteLine("OK! {0}", testName); - } - - private static void OutputFailure(string testName, string fileContent, object obj) - { - Console.Out.WriteLine("Failure! {0}", testName); - Console.Out.WriteLine("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"); - Console.Out.WriteLine("Content:\n{0}", fileContent); - Console.Out.WriteLine("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"); - if (obj is Exception) - { - Exception ex = obj as Exception; - Console.Out.WriteLine("Ex.Message: {0}", ex.Message); - Console.Out.WriteLine("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"); - Console.Out.WriteLine("Ex.Stacktrace:\n{0}", ex.StackTrace); - Console.Out.WriteLine("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"); - } - if (obj != null && (obj is Exception) == false) - { - JsonWriter writter = new JsonWriter(new JsonWriterConfiguration(indent: true)); - Console.Out.WriteLine("Parsed:\n{0}", writter.Write(obj)); - Console.Out.WriteLine("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"); - } - } - - private static string FindPath(string currentPath, string directory) - { - do - { - string testPath = Path.Combine(currentPath, directory); - if (Directory.Exists(testPath)) - { - currentPath = testPath; - Console.Out.WriteLine(testPath); - break; - } - else - { - DirectoryInfo dirInfo = Directory.GetParent(currentPath); - if (dirInfo == null) - { - throw new Exception(string.Format("FindPath: Directory {0} not found", directory)); - } - currentPath = dirInfo.ToString(); - } - } while (string.IsNullOrEmpty(currentPath) == false); - return currentPath; - } - } -} diff --git a/VAR.Json.Tests/Properties/AssemblyInfo.cs b/VAR.Json.Tests/Properties/AssemblyInfo.cs index f40f1bc..eff68c7 100644 --- a/VAR.Json.Tests/Properties/AssemblyInfo.cs +++ b/VAR.Json.Tests/Properties/AssemblyInfo.cs @@ -1,14 +1,36 @@ using System.Reflection; +using System.Runtime.CompilerServices; using System.Runtime.InteropServices; +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. [assembly: AssemblyTitle("VAR.Json.Tests")] -[assembly: AssemblyDescription("Json Tests")] +[assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("VAR")] +[assembly: AssemblyCompany("")] [assembly: AssemblyProduct("VAR.Json.Tests")] -[assembly: AssemblyCopyright("Copyright © VAR 2016")] +[assembly: AssemblyCopyright("Copyright © 2020")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] -[assembly: Guid("576297b8-423d-4533-b75a-f186ccff0d2a")] -[assembly: AssemblyVersion("1.0.*")] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("b92ac920-87d7-46de-afd8-d9c5eff7debe")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/VAR.Json.Tests/VAR.Json.Tests.csproj b/VAR.Json.Tests/VAR.Json.Tests.csproj index 4736b13..ec600e3 100644 --- a/VAR.Json.Tests/VAR.Json.Tests.csproj +++ b/VAR.Json.Tests/VAR.Json.Tests.csproj @@ -1,20 +1,27 @@  - - + + Debug AnyCPU - {576297B8-423D-4533-B75A-F186CCFF0D2A} - Exe + {B92AC920-87D7-46DE-AFD8-D9C5EFF7DEBE} + Library Properties VAR.Json.Tests VAR.Json.Tests v4.6.1 512 - true + {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + 10.0 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + $(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages + False + UnitTest + + + - AnyCPU true full false @@ -24,7 +31,6 @@ 4 - AnyCPU pdbonly true bin\Release\ @@ -33,58 +39,63 @@ 4 + + ..\packages\MSTest.TestFramework.2.1.1\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.dll + + + ..\packages\MSTest.TestFramework.2.1.1\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll + - + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - {28b3f937-145c-4fd4-a75b-a25ea4cc0428} + {28B3F937-145C-4FD4-A75B-A25EA4CC0428} VAR.Json + + + + + False + + + False + + + False + + + False + + + + + + + + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + */": " ", - " s p a c e d " :[1,2 , 3 - -, - -4 , 5 , 6 ,7 ],"compact":[1,2,3,4,5,6,7], - "jsontext": "{\"object with 1 member\":[\"array with 1 element\"]}", - "quotes": "" \u0022 %22 0x22 034 "", - "\/\\\"\uCAFE\uBABE\uAB98\uFCDE\ubcda\uef4A\b\f\n\r\t`1~!@#$%^&*()_+-=[]{}|;:',./<>?" -: "A key can be any string" - }, - 0.5 ,98.6 -, -99.44 -, - -1066, -1e1, -0.1e1, -1e-1, -1e00,2e+00,2e-00 -,"rosebud"] \ No newline at end of file diff --git a/VAR.Json.Tests/tests/pass02.json b/VAR.Json.Tests/tests/pass02.json deleted file mode 100644 index d3c63c7..0000000 --- a/VAR.Json.Tests/tests/pass02.json +++ /dev/null @@ -1 +0,0 @@ -[[[[[[[[[[[[[[[[[[["Not too deep"]]]]]]]]]]]]]]]]]]] \ No newline at end of file diff --git a/VAR.Json.Tests/tests/pass03.json b/VAR.Json.Tests/tests/pass03.json deleted file mode 100644 index 4528d51..0000000 --- a/VAR.Json.Tests/tests/pass03.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "JSON Test Pattern pass3": { - "The outermost value": "must be an object or array.", - "In this test": "It is an object." - } -} diff --git a/VAR.Json.sln b/VAR.Json.sln index 824c942..bd34964 100644 --- a/VAR.Json.sln +++ b/VAR.Json.sln @@ -1,18 +1,18 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.25420.1 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30330.147 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VAR.Json", "VAR.Json\VAR.Json.csproj", "{28B3F937-145C-4FD4-A75B-A25EA4CC0428}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VAR.Json.Tests", "VAR.Json.Tests\VAR.Json.Tests.csproj", "{576297B8-423D-4533-B75A-F186CCFF0D2A}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Notes", "Notes", "{4C23A421-5348-48F1-8B67-A4D43E616FDE}" ProjectSection(SolutionItems) = preProject LICENSE.txt = LICENSE.txt README.md = README.md EndProjectSection EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VAR.Json.Tests", "VAR.Json.Tests\VAR.Json.Tests.csproj", "{B92AC920-87D7-46DE-AFD8-D9C5EFF7DEBE}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -23,12 +23,15 @@ Global {28B3F937-145C-4FD4-A75B-A25EA4CC0428}.Debug|Any CPU.Build.0 = Debug .Net 4.6.1|Any CPU {28B3F937-145C-4FD4-A75B-A25EA4CC0428}.Release|Any CPU.ActiveCfg = Release .Net 4.6.1|Any CPU {28B3F937-145C-4FD4-A75B-A25EA4CC0428}.Release|Any CPU.Build.0 = Release .Net 4.6.1|Any CPU - {576297B8-423D-4533-B75A-F186CCFF0D2A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {576297B8-423D-4533-B75A-F186CCFF0D2A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {576297B8-423D-4533-B75A-F186CCFF0D2A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {576297B8-423D-4533-B75A-F186CCFF0D2A}.Release|Any CPU.Build.0 = Release|Any CPU + {B92AC920-87D7-46DE-AFD8-D9C5EFF7DEBE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B92AC920-87D7-46DE-AFD8-D9C5EFF7DEBE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B92AC920-87D7-46DE-AFD8-D9C5EFF7DEBE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B92AC920-87D7-46DE-AFD8-D9C5EFF7DEBE}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {B9700B54-1919-4B81-B123-D4D3DE74124A} + EndGlobalSection EndGlobal