Commit b2180f1c authored by Matthew Dawson's avatar Matthew Dawson
Browse files

Remove deprecated functions from the api.

In preparation for release, remove some functions from the public api.  They
aren't even needed for testing anymore, so just kill it.
parent 75763723
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -65,10 +65,7 @@ final public class CVC3VariablesDeclarationGenerator implements VariablesDeclara
        return ret.toString();
    }

    /**@deprecated
     * it is only public for unit tests, and will be made private eventually
     */
    public String GenerateType(Type type) {
    private String GenerateType(Type type) {
        if (type instanceof RealType) {
            return "REAL";
        } else if (type instanceof FixedPointType) {
+1 −4
Original line number Diff line number Diff line
@@ -72,10 +72,7 @@ public class SMTLIBVariablesDeclarationGenerator implements VariablesDeclaration
        return ret.toString();
    }

    /**@deprecated
     * it is only public for unit tests, and will be made private eventually
     */
    public static String GenerateType(Type type) {
    private static String GenerateType(Type type) {
        if (type instanceof RealType) {
            return "Real";
        } else if (type instanceof BooleanType) {
+0 −9
Original line number Diff line number Diff line
@@ -27,15 +27,6 @@ public class FixedPointTypeTest {
        assertEquals(19, instance.digits());
        assertEquals(9, instance.fractionPart());
    }
    /**
     * Test of getCVC3Definition method, of class FixedPointType.
     */
    @Test
    public void testGetCVC3Definition() {
        CVC3VariablesDeclarationGenerator generator = new CVC3VariablesDeclarationGenerator();
        FixedPointType instance = new FixedPointType(true, 16, 8);
        assertEquals("BITVECTOR(16)", generator.GenerateType(instance));
    }

    /**
     * Test of canCastToType method, of class FixedPointType.
+0 −27
Original line number Diff line number Diff line
@@ -19,33 +19,6 @@ import org.junit.runners.JUnit4;
 */
@RunWith(JUnit4.class)
public class BooleanTypeTest {

    /**
     * Test of getCVC3Definition method, of class RealType.
     */
    @Test
    public void testGetCVC3Definition() {
        CVC3VariablesDeclarationGenerator generator = new CVC3VariablesDeclarationGenerator();
        String variableName = "test_variable";
        BooleanType instance = new BooleanType();
        String expResult = "BOOLEAN";
        String result = generator.GenerateType(instance);
        assertEquals(expResult, result);
    }

    /**
     * Test of SMT-LIB generation of boolean type.
     */
    @Test
    public void testGetSMTLIBDefinition() {
        SMTLIBVariablesDeclarationGenerator generator = new SMTLIBVariablesDeclarationGenerator();
        String variableName = "test_variable";
        BooleanType instance = new BooleanType();
        String expResult = "Bool";
        String result = generator.GenerateType(instance);
        assertEquals(expResult, result);
    }

    /**
     * Test of equals method, of class RealType.
     */
+0 −27
Original line number Diff line number Diff line
@@ -19,33 +19,6 @@ import org.junit.runners.JUnit4;
 */
@RunWith(JUnit4.class)
public class RealTypeTest {

    /**
     * Test of getCVC3Definition method, of class RealType.
     */
    @Test
    public void testGetCVC3Definition() {
        CVC3VariablesDeclarationGenerator generator = new CVC3VariablesDeclarationGenerator();
        String variableName = "test_variable";
        RealType instance = new RealType();
        String expResult = "REAL";
        String result = generator.GenerateType(instance);
        assertEquals(expResult, result);
    }

    /**
     * Test SMTLIB generates the correct type.
     */
    @Test
    public void testGetSMTLIBDefinition() {
        SMTLIBVariablesDeclarationGenerator generator = new SMTLIBVariablesDeclarationGenerator();
        String variableName = "test_variable";
        RealType instance = new RealType();
        String expResult = "Real";
        String result = generator.GenerateType(instance);
        assertEquals(expResult, result);
    }

    /**
     * Test of equals method, of class RealType.
     */