コード例 #1
0
            public static void OneErrorInClass()
            {
                var code = @"using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace N
{
    ↓class CodeReaderTests
    {
    }
}";

                CollectionAssert.AreEqual(new[] { new LinePosition(8, 4) }, CodeReader.FindLinePositions(code));
            }
コード例 #2
0
            public void TwoErrorsInClass()
            {
                var code = @"using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RoslynSandbox
{
    ↓class ↓CodeReaderTests
    {
    }
}";

                CollectionAssert.AreEqual(new[] { new LinePosition(8, 4), new LinePosition(8, 10) }, CodeReader.FindLinePositions(code));
            }