~halega/+junk/sharpdevelop

« back to all changes in this revision

Viewing changes to src/AddIns/Analysis/UnitTesting/Test/Utils/JumpedToFile.cs

  • Committer: sk
  • Date: 2011-09-10 05:17:57 UTC
  • Revision ID: halega@halega.com-20110910051757-qfouz1llya9m6boy
4.1.0.7915 Release Candidate 1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
 
2
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
 
3
 
 
4
using System;
 
5
 
 
6
namespace UnitTesting.Tests.Utils
 
7
{
 
8
        public class JumpedToFile
 
9
        {
 
10
                string fileName = String.Empty;
 
11
                int line = -2;
 
12
                int col = -2;
 
13
                
 
14
                public JumpedToFile(string fileName, int line, int col)
 
15
                {
 
16
                        this.fileName = fileName;
 
17
                        this.line = line;
 
18
                        this.col = col;
 
19
                }
 
20
                
 
21
                public override string ToString()
 
22
                {
 
23
                        return String.Format("File: {0} Line: {1} Col: {2}", fileName, line, col);
 
24
                }
 
25
                
 
26
                public override bool Equals(object obj)
 
27
                {
 
28
                        JumpedToFile rhs = obj as JumpedToFile;
 
29
                        if (rhs != null) {
 
30
                                return (fileName == rhs.fileName) &&
 
31
                                        (line == rhs.line) &&
 
32
                                        (col == rhs.col);
 
33
                        }
 
34
                        return false;
 
35
                }
 
36
                
 
37
                public override int GetHashCode()
 
38
                {
 
39
                        return base.GetHashCode();
 
40
                }
 
41
        }
 
42
}