Skip to content

Commit

Permalink
More tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kniazkov committed Sep 4, 2024
1 parent ea03034 commit f69dbf1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@ private boolean fullMapping(final Node[] destination, final List<Node> source) {
break;
}
result = this.bindAllNodes(destination, array);
assert !result || this.required.getCount() == 0;
} while (false);
return result;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import java.util.Collections;
import java.util.Optional;
import org.cqfn.astranaut.core.base.Node;
import org.cqfn.astranaut.core.base.PrototypeBasedNode;
import org.cqfn.astranaut.core.base.Tree;
import org.cqfn.astranaut.core.example.LittleTrees;
import org.junit.jupiter.api.Assertions;
Expand All @@ -51,5 +52,8 @@ void testBaseMethods() {
.findFirst(node -> node.getTypeName().equals(target.getTypeName()));
Assertions.assertTrue(colored.isPresent());
Assertions.assertEquals(colored.get().getProperties().get(name), value);
final Node root = labeled.getRoot();
Assertions.assertTrue(root instanceof PrototypeBasedNode);
Assertions.assertSame(((PrototypeBasedNode) root).getPrototype(), original);
}
}

0 comments on commit f69dbf1

Please sign in to comment.