use of org.jaxdb.www.ddlx_0_5.xLygluGCXAA.$Integer in project packages-jpl by SWI-Prolog.
the class TestJUnit method testIntegerFromChar1.
public void testIntegerFromChar1() {
// 0..65535
char c = (char) 64;
// System.out.println("c = " + c);
Integer i = new Integer(c);
assertTrue(i.intValue() == c);
}
use of org.jaxdb.www.ddlx_0_5.xLygluGCXAA.$Integer in project packages-jpl by SWI-Prolog.
the class TestOLD method main.
public static void main(String[] argv) {
Prolog.set_default_init_args(new String[] { "libpl.dll", "-f", "none", "-g", "set_prolog_flag(debug_on_error,false)", "-q" });
System.err.println("tag = " + Prolog.object_to_tag(new Query("hello")));
test10k();
test10();
// test10h();
// test10i();
test10j();
test10k();
test10l();
test10m();
// test10n();
test10o();
// test10p();
test10q();
// test10r();
// test10s();
// test10t();
// test10u();
// test10v();
String s = new String("" + '\0' + '\377');
System.err.println("s.length = " + s.length());
for (int i = 0; i < s.length(); i++) {
System.err.print((new Integer(s.charAt(i))).toString() + " ");
}
System.err.println();
System.err.println(new Query("atom_codes(A,[127,128,255,0])").oneSolution().toString());
}
use of org.jaxdb.www.ddlx_0_5.xLygluGCXAA.$Integer in project packages-jpl by SWI-Prolog.
the class Test_Integer method testIntegerFromChar1.
@Test
public void testIntegerFromChar1() {
// 0..65535
char c = (char) 64;
// System.out.println("c = " + c);
Integer i = new Integer(c);
assertEquals(i.intValue(), c);
}
use of org.jaxdb.www.ddlx_0_5.xLygluGCXAA.$Integer in project packages-jpl by SWI-Prolog.
the class Test_List method testIsPairList2.
@Test
public void testIsPairList2() {
Term t = new Compound(JPL.LIST_PAIR, new Term[] { new Integer(1), new Integer(2) });
String msg = String.format("term %s should be a pair list", t.toString());
assertTrue(msg, t.isListPair());
assertEquals("[1, 2]", t.toString());
}
use of org.jaxdb.www.ddlx_0_5.xLygluGCXAA.$Integer in project packages-jpl by SWI-Prolog.
the class Test_Dict method test_dict1.
// /////////////////////////////////////////////////////////////////////////////
// SUPPORTING CODE
// /////////////////////////////////////////////////////////////////////////////
// /////////////////////////////////////////////////////////////////////////////
// TESTS
// /////////////////////////////////////////////////////////////////////////////
@Test
public void test_dict1() {
Map<Atom, Term> map = new HashMap<Atom, Term>();
map.put(new Atom("x"), new org.jpl7.Integer(12));
map.put(new Atom("y"), new org.jpl7.Integer(23));
map.put(new Atom("z"), new Integer(312));
Dict dict = new Dict(new Atom("location"), map);
assertEquals("location{x:12, z:312, y:23}", dict.toString());
assertEquals(Prolog.DICT, dict.type());
}
Aggregations