diff --git a/src/CSnakes.Tests/BasicSmokeTests.cs b/src/CSnakes.Tests/BasicSmokeTests.cs index aba060d9..b553ee76 100644 --- a/src/CSnakes.Tests/BasicSmokeTests.cs +++ b/src/CSnakes.Tests/BasicSmokeTests.cs @@ -22,14 +22,18 @@ public class BasicSmokeTest(TestEnvironment testEnv) : IClassFixture str:\n ...\n", "string HelloWorld(string name, long age)")] [InlineData("def hello_world(numbers: list[float]) -> list[int]:\n ...\n", "IEnumerable HelloWorld(IEnumerable numbers)")] [InlineData("def hello_world(numbers: List[float]) -> List[int]:\n ...\n", "IEnumerable HelloWorld(IEnumerable numbers)")] + [InlineData("def hello_world(value: tuple[int]) -> None:\n ...\n", "void HelloWorld(ValueTuple value)")] [InlineData("def hello_world(a: bool, b: str, c: list[tuple[int, float]]) -> bool: \n ...\n", "bool HelloWorld(bool a, string b, IEnumerable<(long, double)> c)")] [InlineData("def hello_world(a: bool = True, b: str = None) -> bool: \n ...\n", "bool HelloWorld(bool a = true, string b = null)")] + [InlineData("def hello_world(a: bytes, b: bool = False, c: float = 0.1) -> None: \n ...\n", "void HelloWorld(byte[] a, bool b = false, double c = 0.1)")] + [InlineData("def hello_world(a: str = 'default') -> None: \n ...\n", "void HelloWorld(string a = \"default\")")] [InlineData("def hello_world(a: str, *args) -> None: \n ...\n", "void HelloWorld(string a, ValueTuple args)")] [InlineData("def hello_world(a: str, *, b: int) -> None: \n ...\n", "void HelloWorld(string a, ValueTuple args, long b)")] [InlineData("def hello_world(a: str, *, b: int = 3) -> None: \n ...\n", "void HelloWorld(string a, ValueTuple args, long b = 3)")] [InlineData("def hello_world(a: str, *args, **kwargs) -> None: \n ...\n", "void HelloWorld(string a, ValueTuple args, IReadOnlyDictionary kwargs)")] [InlineData("def hello(a: int = 0xdeadbeef) -> None:\n ...\n", "void Hello(long a = 0xDEADBEEF)")] [InlineData("def hello(a: int = 0b10101010) -> None:\n ...\n", "void Hello(long a = 0b10101010)")] + [InlineData("def hello(a: int = 2147483648) -> None:\n ...\n", "void Hello(long a = 2147483648L)")] public void TestGeneratedSignature(string code, string expected) {