@Test() public void ReadStructTest() throws NullPointerException, JavasciException { assertTrue(sci.exec("myDate=struct('day',25,'month' ,'DEC','year',2006)")); assertEquals(sci.getVariableType("myDate"), ScilabTypeEnum.sci_mlist); ScilabMList myDate = (ScilabMList) sci.get("myDate"); assertTrue( myDate .toString() .equals( "mlist([\"st\", \"dims\", \"day\", \"month\", \"year\"], int32([1, 1]), [25.0], [\"DEC\"], [2006.0])")); assertEquals(myDate.getHeight(), 1); assertEquals(myDate.getWidth(), 5); assertTrue(myDate.getVarName().equals("myDate")); assertTrue(myDate.getMListType().equals("st")); Map<String, ScilabType> listFields = myDate.getMListFields(); ScilabString month = (ScilabString) listFields.get("month"); assertTrue(month.getData()[0][0].equals("DEC")); ScilabDouble year = (ScilabDouble) listFields.get("year"); assertEquals(year.getRealPart()[0][0], 2006.0, 1e-8); ScilabDouble day = (ScilabDouble) listFields.get("day"); assertEquals(day.getRealPart()[0][0], 25.0, 1e-8); }