1.1 --- a/src/java-tests/isac/util/formulae/TestCalcHead.java Fri Jun 17 20:04:55 2005 +0200
1.2 +++ b/src/java-tests/isac/util/formulae/TestCalcHead.java Fri Jun 17 20:05:22 2005 +0200
1.3 @@ -31,21 +31,25 @@
1.4 CalcHeadItem it1 = new CalcHeadItem(), it2 = new CalcHeadItem();
1.5
1.6 it1.setText("equality (x+1=2)");
1.7 + it1.setItemStatus("correct");
1.8 it2.setText("solveFor x");
1.9 + it2.setItemStatus("correct");
1.10 its = new CalcHeadItemList();
1.11 its.addItem(it1);
1.12 its.addItem(it2);
1.13 - ch.setGiven(its);
1.14 + ch.setGiven(its);//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1.15
1.16 it1.setText("matches (?a = ?b) (x+1=2)");
1.17 + it1.setItemStatus("correct");
1.18 its = new CalcHeadItemList();
1.19 its.addItem(it1);
1.20 - ch.setWhere(its);
1.21 + ch.setWhere(its);//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1.22
1.23 it1.setText("solutions L");
1.24 + it1.setItemStatus("correct");
1.25 its = new CalcHeadItemList();
1.26 its.addItem(it1);
1.27 - ch.setFind(its);
1.28 + ch.setFind(its);//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1.29
1.30 //----------------------
1.31 ch.setBelongsTo("Pbl");
1.32 @@ -102,7 +106,7 @@
1.33 ["sqroot-test","univariate","equation","test"],
1.34 ["Test","squ-equ-test-subpbl1"]));
1.35 */
1.36 - System.out.print(".CalcHead.toSMLstring="+ch.toSMLString());
1.37 + //System.out.print(".CalcHead.toSMLstring="+ch.toSMLString());
1.38
1.39 System.out.println("---END TestCalcHead#testToSMLstring");
1.40 System.out.println("---END isac.util.formulae.TestCalcHead");
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2.2 +++ b/src/java-tests/isac/util/formulae/TestModel.java Fri Jun 17 20:05:22 2005 +0200
2.3 @@ -0,0 +1,66 @@
2.4 +/*
2.5 + * @author Walther Neuper, member of the ISAC-team,
2.6 + * Copyright (c) 2005 by Walther Neuper
2.7 + * created Jun 17, 2005 7:08:04 PM
2.8 + * Institute for Softwaretechnology, Graz University of Technology, Austria.
2.9 + *
2.10 + * Use is subject to PGPL license terms.
2.11 + */
2.12 +package isac.util.formulae;
2.13 +
2.14 +import junit.framework.TestCase;
2.15 +
2.16 +/**
2.17 + * @author Walther Neuper
2.18 + */
2.19 +public class TestModel extends TestCase {
2.20 +
2.21 + public void testToSMLstring() {
2.22 + System.out.println("---BEGIN isac.util.formulae.TestModel");
2.23 + System.out.println("---BEGIN TestModel#testToSMLstring");
2.24 + Model m = new Model();
2.25 + CalcHeadItemList its;
2.26 + CalcHeadItem it1 = new CalcHeadItem(), it2 = new CalcHeadItem();
2.27 +
2.28 + it1.setText("equality (x+1=2)");
2.29 + it1.setItemStatus("correct");
2.30 + it2.setText("solveFor x");
2.31 + it2.setItemStatus("correct");
2.32 + its = new CalcHeadItemList();
2.33 + its.addItem(it1);
2.34 + its.addItem(it2);
2.35 + m.setGiven(its);//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2.36 +
2.37 + it1.setText("matches (?a = ?b) (x+1=2)");
2.38 + it1.setItemStatus("correct");
2.39 + its = new CalcHeadItemList();
2.40 + its.addItem(it1);
2.41 + m.setWhere(its);//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2.42 +
2.43 + it1.setText("solutions L");
2.44 + it1.setItemStatus("correct");
2.45 + its = new CalcHeadItemList();
2.46 + its.addItem(it1);
2.47 + m.setFind(its);//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2.48 +
2.49 + //m.setRelate !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2.50 +
2.51 + /*
2.52 + * WN050617 (Given ["equality (x+1=2)", "solveFor x"], Where ["matches
2.53 + * (x = 0) (-1 + x = 0)"], Find ["solutions L"], Relate [])
2.54 + */
2.55 + String test = ""//.................................................
2.56 + + "Given [\"equality (x+1=2)\", \"solveFor x\"], "//........
2.57 + + "Where [\"matches (x = 0) (-1 + x = 0)\"], "//........
2.58 + + "Find [\"solutions L\"], "//................................
2.59 + + "Relate []"//..............................................
2.60 + + "";
2.61 + System.out.println(m.toString());
2.62 + System.out.println(m.toSMLString());
2.63 + //assertEquals(m.toSMLString(), test);
2.64 +
2.65 + System.out.println("---END TestModel#testToSMLstring");
2.66 + System.out.println("---END isac.util.formulae.TestModel");
2.67 + }
2.68 +
2.69 +}
2.70 \ No newline at end of file