Skip to content

Commit

Permalink
Tests: Add test for Java 10 type inference, #53
Browse files Browse the repository at this point in the history
This was already accidentally supported, but now we're making our support
for type inference explicit and under test.
  • Loading branch information
paulirwin committed Aug 12, 2023
1 parent b8d9644 commit 4acdb61
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions JavaToCSharp.Tests/IntegrationTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ public void GeneralUnsuccessfulConversionTest(string filePath)
[InlineData("Resources/Java7TryWithResources.java")]
[InlineData("Resources/Java9TryWithResources.java")]
[InlineData("Resources/Java9PrivateInterfaceMethods.java")]
[InlineData("Resources/Java10TypeInference.java")]
public void FullIntegrationTests(string filePath)
{
var options = new JavaConversionOptions
Expand Down
10 changes: 10 additions & 0 deletions JavaToCSharp.Tests/Resources/Java10TypeInference.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/// Expect:
/// - output: "Hello world!\n"
package example;

public class Program {
public static void main(String[] args) {
var message = "Hello world!";
System.out.println(message);
}
}

0 comments on commit 4acdb61

Please sign in to comment.