Browse Source

Documentation update.

newNRvisualizers
Daniel Grunwald 13 years ago
parent
commit
ce2e5281e1
  1. 3
      ICSharpCode.NRefactory.CSharp.AstVerifier/.gitignore
  2. 16
      ICSharpCode.NRefactory.ConsistencyCheck/Readme.txt
  3. 2
      ICSharpCode.NRefactory.Xml/AXmlParser.cs
  4. 16
      doc/TODO

3
ICSharpCode.NRefactory.CSharp.AstVerifier/.gitignore vendored

@ -0,0 +1,3 @@ @@ -0,0 +1,3 @@
bin/
obj/

16
ICSharpCode.NRefactory.ConsistencyCheck/Readme.txt

@ -5,7 +5,19 @@ These checks assume that the code is valid C# without any compilation errors, @@ -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

2
ICSharpCode.NRefactory.Xml/AXmlParser.cs

@ -27,7 +27,7 @@ using ICSharpCode.NRefactory.Utils; @@ -27,7 +27,7 @@ using ICSharpCode.NRefactory.Utils;
namespace ICSharpCode.NRefactory.Xml
{
/// <summary>
/// XML tag soup parser that .
/// XML parser that is error tolerant.
/// </summary>
public class AXmlParser
{

16
doc/TODO

@ -19,19 +19,3 @@ Features: @@ -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)

Loading…
Cancel
Save