Skip to content
Permalink
Browse files

One more unit test for the `java` library (`iterator_element/2`)

  • Loading branch information...
pmoura committed Jun 12, 2019
1 parent 997069f commit 044f8a0a01660db384dd42d630ffbb72c7e5acdb
Showing with 7 additions and 1 deletion.
  1. +7 −1 library/java/tests.lgt
@@ -22,7 +22,7 @@
extends(lgtunit)).

:- info([
version is 0.2,
version is 0.3,
author is 'Paulo Moura',
date is 2019/06/12,
comment is 'Unit tests for the "java" library.'
@@ -132,4 +132,10 @@
^^assertion(terms, Terms == [a,42,foo]),
^^assertion(length, Length == 3).

test(java_iterator_element_2_01, true(Elements == [a,b,c])) :-
java('java.util.ArrayList')::new(ArrayList),
java(ArrayList)::(add(a), add(b), add(c)),
java(ArrayList, Iterator)::iterator,
findall(Element, java::iterator_element(Iterator,Element), Elements).

:- end_object.

0 comments on commit 044f8a0

Please sign in to comment.
You can’t perform that action at this time.