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)
5
using ICSharpCode.NRefactory;
6
using ICSharpCode.PythonBinding;
9
namespace PythonBinding.Tests.Converter
12
public class BitShiftConversionTestFixture
14
string csharp = "class Foo\r\n" +
16
"\tpublic int Convert()\r\n" +
18
"\t\tint a = (b >> 16) & 0xffff;\r\n" +
25
public void ConvertedPythonCode()
27
NRefactoryToPythonConverter converter = new NRefactoryToPythonConverter(SupportedLanguage.CSharp);
28
string python = converter.Convert(csharp);
29
string expectedPython = "class Foo(object):\r\n" +
30
"\tdef Convert(self):\r\n" +
31
"\t\ta = (b >> 16) & 0xffff\r\n" +
34
Assert.AreEqual(expectedPython, python);