Пример #1
0
        public void equality()
        {
            var s  = new SourceSpan(new SourceLocation(10, 2, 5), 8);
            var sa = new SourceSpan(new SourceLocation(10, 2, 5), 11);
            var sb = new SourceSpan(new SourceLocation(10, 1, 5), 8);
            var sc = new SourceSpan(new SourceLocation(10, 2, 5), 8);

            Assert.IsTrue(s.Equals(s));
            Assert.IsFalse(s.Equals(sa));
            Assert.IsFalse(s.Equals(sb));
            Assert.IsTrue(s.Equals(sc));
        }
 /// <summary>
 /// The warning applies to a specific section in a file
 /// </summary>
 public WarningLocation(string fullPath, string relativePath, SourceSpan span)
     : this(fullPath, relativePath)
 {
     RefersToEntireFile = Span.Equals(span);
     Span = span;
 }