From 35e5a39b044f5916fb528ec1c80d05c05e4389c4 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sun, 26 Jul 2026 00:13:52 +0100 Subject: Add less than operator to Rust AST --- .../compiler/output/lang/rust/RustWriterTests.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/test/java/org/zwobble') 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 @@ -436,6 +436,19 @@ public class RustWriterTests { assertThat(string, equalTo("x == y")); } + @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() -- cgit v1.2.3