~halega/+junk/sharpdevelop

« back to all changes in this revision

Viewing changes to src/AddIns/BackendBindings/Python/PythonBinding/Test/Testing/PythonTestResultStackTraceLineNumberOverflowTestFixture.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
using ICSharpCode.PythonBinding;
 
6
using ICSharpCode.UnitTesting;
 
7
using NUnit.Framework;
 
8
 
 
9
namespace PythonBinding.Tests.Testing
 
10
{
 
11
        [TestFixture]
 
12
        public class PythonTestResultLineNumberOverflowTestFixture
 
13
        {
 
14
                PythonTestResult pythonTestResult;
 
15
                string stackTraceText;
 
16
                
 
17
                [SetUp]
 
18
                public void Init()
 
19
                {
 
20
                        TestResult testResult = new TestResult("MyTest");
 
21
                        testResult.ResultType = TestResultType.Failure;
 
22
                        testResult.Message = "test failed";
 
23
                        
 
24
                        stackTraceText = 
 
25
                                "Traceback (most recent call last):\r\n" +
 
26
                                "  File \"d:\\temp\\test\\PyTests\\Tests\\MyClassTest.py\", line 4294967296, in testAssertEquals\r\n" +
 
27
                                "    self.assertEqual(10, 15, 'wrong size after resize')\r\n" +
 
28
                                "AssertionError: wrong size after resize";
 
29
                        
 
30
                        testResult.StackTrace = stackTraceText;
 
31
                        pythonTestResult = new PythonTestResult(testResult);
 
32
                }
 
33
                
 
34
                [Test]
 
35
                public void StackTraceFilePositionIsEmpty()
 
36
                {
 
37
                        Assert.IsTrue(pythonTestResult.StackTraceFilePosition.IsEmpty);
 
38
                }
 
39
        }
 
40
}