use of de.prob.translator.types.Set in project probparsers by bendisposto.
the class TestTranslator method testTranslateRecordWithSetValues.
@Test
public void testTranslateRecordWithSetValues() throws Exception {
Record o = (Record) Translator.translate("rec(key1:{1,2,3}, key2:{a,b})");
Set a = (Set) o.get("key1");
assertTrue(a.contains(Number.build(1)));
}
use of de.prob.translator.types.Set in project probparsers by bendisposto.
the class TestTranslator method testTranslateEmptySet.
@Test
public void testTranslateEmptySet() throws Exception {
Set o = (Set) Translator.translate("{}");
assertTrue(o.size() == 0);
}
use of de.prob.translator.types.Set in project probparsers by bendisposto.
the class TestTranslator method testTranslateIntSet.
@Test
public void testTranslateIntSet() throws Exception {
Set o = (Set) Translator.translate("{5,6,7}");
assertTrue(o.size() == 3);
assertFalse(o.contains(Number.build("8")));
}