Skip to content

Commit

Permalink
Update BinaryOperatorNodeTest.java
Browse files Browse the repository at this point in the history
  • Loading branch information
MShadiF committed May 24, 2024
1 parent 285b82d commit 4b19133
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,15 @@ public void testGetAstNodeValueFloat() {
Assertions.assertEquals("5.0", node.toString());
}

@Test
public void testGetAstNodeValueIntFloat() {
AstNode left = new FloatNode("3.0");
AstNode right = new IntNode("2");
AstNode node = BinaryOperatorNode.getAstNodeValue(left, right, "+");
Assertions.assertEquals("5.0", node.toString());
Assertions.assertInstanceOf(FloatNode.class, node);
}

@Test
public void testGetLeft() {
AstNode left = new IntNode("3");
Expand Down

0 comments on commit 4b19133

Please sign in to comment.