From ce2e5281e1af87fe89ce9d875b63b0da639e0422 Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Fri, 16 Mar 2012 15:40:15 +0100 Subject: [PATCH] Documentation update. --- .../.gitignore | 3 +++ .../Readme.txt | 16 ++++++++++++++-- ICSharpCode.NRefactory.Xml/AXmlParser.cs | 2 +- doc/TODO | 16 ---------------- 4 files changed, 18 insertions(+), 19 deletions(-) create mode 100644 ICSharpCode.NRefactory.CSharp.AstVerifier/.gitignore diff --git a/ICSharpCode.NRefactory.CSharp.AstVerifier/.gitignore b/ICSharpCode.NRefactory.CSharp.AstVerifier/.gitignore new file mode 100644 index 0000000000..9ce745d95d --- /dev/null +++ b/ICSharpCode.NRefactory.CSharp.AstVerifier/.gitignore @@ -0,0 +1,3 @@ + +bin/ +obj/ \ No newline at end of file diff --git a/ICSharpCode.NRefactory.ConsistencyCheck/Readme.txt b/ICSharpCode.NRefactory.ConsistencyCheck/Readme.txt index a34b7f0f10..caabc02b2b 100644 --- a/ICSharpCode.NRefactory.ConsistencyCheck/Readme.txt +++ b/ICSharpCode.NRefactory.ConsistencyCheck/Readme.txt @@ -5,7 +5,19 @@ These checks assume that the code is valid C# without any compilation errors, so make sure to only pass in compilable source code. Checks currently being performed: - - Checks that ID strings are unique and refer back to the correct entity - - Roundtripping test: parses C# code and outputs it again using CSharpOutputVisitor, checking that only whitespace is changing + - IDStringConsistencyCheck: Checks that ID strings are unique and refer back to the correct entity + - RoundtripTest: parses C# code and outputs it again using CSharpOutputVisitor, checking that only whitespace is changing - ResolverTest: fully resolves all ASTs and validates that no errors are detected (no false positives in semantic error checking) - RandomizedOrderResolverTest: checks that the order of Resolve()/GetResolverState() calls has no effect on the result + - FindReferencesConsistencyCheck: checks that FindReferences is the inverse of FindReferencedEntities + + XML Tests: + - IncrementalXmlParserTests: tests that incremental parsing produces results identical to a full reparse + - XmlReaderTests: compares AXmlParser.Parse().CreateReader() with new XmlTextReader() + + + + Ideas for further tests: + - Test token positions (see AstVerifier) + - Compare resolve results with csc compiler output (using Cecil) + - Randomly mutate a C# file (e.g. remove tokens) and verify that the parser does not crash diff --git a/ICSharpCode.NRefactory.Xml/AXmlParser.cs b/ICSharpCode.NRefactory.Xml/AXmlParser.cs index d16500e390..dfee11174d 100644 --- a/ICSharpCode.NRefactory.Xml/AXmlParser.cs +++ b/ICSharpCode.NRefactory.Xml/AXmlParser.cs @@ -27,7 +27,7 @@ using ICSharpCode.NRefactory.Utils; namespace ICSharpCode.NRefactory.Xml { /// - /// XML tag soup parser that . + /// XML parser that is error tolerant. /// public class AXmlParser { diff --git a/doc/TODO b/doc/TODO index 047cdc1509..f7b2c37dd2 100644 --- a/doc/TODO +++ b/doc/TODO @@ -19,19 +19,3 @@ Features: For integration into SharpDevelop: - Review NR and DOM changes done in the timeframe - - -Idea for automated testing of the NR resolver: - -Given some source code + the references, - Compile source code with MS C# Compiler - Load references into NR.TypeSystem - Load source code into NR.TypeSystem - Load compiled assembly into NR.TypeSystem - Compare entities 3a. and 3b. (but ignore compiled-generated members - ILSpy has logic to detect those) - For each method: - Resolve whole method with ResolveVisitor - Ensure there are no errors detected - Extract list of methods being called (incl. op_Implicit etc.) - Compare with methods being called in compiled assembly. (also compare type arguments) -