diff options
| author | Michael Williamson <mike@zwobble.org> | 2026-07-26 00:13:52 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2026-07-26 00:13:52 +0100 |
| commit | 35e5a39b044f5916fb528ec1c80d05c05e4389c4 (patch) | |
| tree | 9d970f6aa578f70e4211d59c808049d5adb5b002 /src/test | |
| parent | 051ea60dc8a775f0fc82ebbc5f65a8c5f57157c0 (diff) | |
Add less than operator to Rust AST
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/java/org/zwobble/hobgoblin/compiler/output/lang/rust/RustWriterTests.java | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/rust/RustWriterTests.java b/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/rust/RustWriterTests.java index 55c8f54..b5dd515 100644 --- a/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/rust/RustWriterTests.java +++ b/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/rust/RustWriterTests.java @@ -437,6 +437,19 @@ public class RustWriterTests { } @Test + public void binaryExpressionLessThan() throws IOException { + var rust = RustBinaryExpression.arbitrary() + .withOperator(RustBinaryOperator.LESS_THAN) + .withLeft(RustPath.of("x")) + .withRight(RustPath.of("y")) + .build(); + + var string = write(writer -> writer.writeTopLevelExpression(rust)); + + assertThat(string, equalTo("x < y")); + } + + @Test public void binaryExpressionNotEqual() throws IOException { var rust = RustBinaryExpression.arbitrary() .withOperator(RustBinaryOperator.NOT_EQUAL) |
