#include <cxxtest/TestSuite.h>
#include "api/cvc4cpp.h"
+#include "base/configuration.h"
using namespace CVC4::api;
void SortBlack::testGetFPExponentSize()
{
- Sort fpSort = d_solver.mkFloatingPointSort(4, 8);
- TS_ASSERT_THROWS_NOTHING(fpSort.getFPExponentSize());
- Sort setSort = d_solver.mkSetSort(d_solver.getIntegerSort());
- TS_ASSERT_THROWS(setSort.getFPExponentSize(), CVC4ApiException&);
+ if (CVC4::Configuration::isBuiltWithSymFPU())
+ {
+ Sort fpSort = d_solver.mkFloatingPointSort(4, 8);
+ TS_ASSERT_THROWS_NOTHING(fpSort.getFPExponentSize());
+ Sort setSort = d_solver.mkSetSort(d_solver.getIntegerSort());
+ TS_ASSERT_THROWS(setSort.getFPExponentSize(), CVC4ApiException&);
+ }
}
void SortBlack::testGetFPSignificandSize()
{
- Sort fpSort = d_solver.mkFloatingPointSort(4, 8);
- TS_ASSERT_THROWS_NOTHING(fpSort.getFPSignificandSize());
- Sort setSort = d_solver.mkSetSort(d_solver.getIntegerSort());
- TS_ASSERT_THROWS(setSort.getFPSignificandSize(), CVC4ApiException&);
+ if (CVC4::Configuration::isBuiltWithSymFPU())
+ {
+ Sort fpSort = d_solver.mkFloatingPointSort(4, 8);
+ TS_ASSERT_THROWS_NOTHING(fpSort.getFPSignificandSize());
+ Sort setSort = d_solver.mkSetSort(d_solver.getIntegerSort());
+ TS_ASSERT_THROWS(setSort.getFPSignificandSize(), CVC4ApiException&);
+ }
}
void SortBlack::testGetDatatypeParamSorts()
#include <cxxtest/TestSuite.h>
+#include "base/configuration.h"
#include "expr/kind.h"
#include "theory/logic_info.h"
-
using namespace CVC4;
using namespace CVC4::theory;
CVC4::IllegalArgumentException&);
TS_ASSERT_THROWS(info.disableTheory(THEORY_UF),
CVC4::IllegalArgumentException&);
-
info = info.getUnlockedCopy();
- TS_ASSERT( !info.isLocked() );
+ TS_ASSERT(!info.isLocked());
info.disableTheory(THEORY_STRINGS);
info.disableTheory(THEORY_SETS);
info.disableTheory(THEORY_BAGS);
info.arithOnlyLinear();
info.disableIntegers();
info.lock();
- TS_ASSERT_EQUALS(info.getLogicString(), "SEP_AUFBVFPDTLRA");
+ if (CVC4::Configuration::isBuiltWithSymFPU())
+ {
+ TS_ASSERT_EQUALS(info.getLogicString(), "SEP_AUFBVFPDTLRA");
+ }
+ else
+ {
+ TS_ASSERT_EQUALS(info.getLogicString(), "SEP_AUFBVDTLRA");
+ }
info = info.getUnlockedCopy();
- TS_ASSERT( !info.isLocked() );
+ TS_ASSERT(!info.isLocked());
info.disableQuantifiers();
info.disableTheory(THEORY_BAGS);
info.lock();
- TS_ASSERT_EQUALS(info.getLogicString(), "QF_SEP_AUFBVFPDTLRA");
+ if (CVC4::Configuration::isBuiltWithSymFPU())
+ {
+ TS_ASSERT_EQUALS(info.getLogicString(), "QF_SEP_AUFBVFPDTLRA");
+ }
+ else
+ {
+ TS_ASSERT_EQUALS(info.getLogicString(), "QF_SEP_AUFBVDTLRA");
+ }
info = info.getUnlockedCopy();
- TS_ASSERT( !info.isLocked() );
+ TS_ASSERT(!info.isLocked());
info.disableTheory(THEORY_BV);
info.disableTheory(THEORY_DATATYPES);
info.disableTheory(THEORY_BAGS);
info.enableIntegers();
info.disableReals();
info.lock();
- TS_ASSERT_EQUALS(info.getLogicString(), "QF_SEP_AUFFPLIA");
+ if (CVC4::Configuration::isBuiltWithSymFPU())
+ {
+ TS_ASSERT_EQUALS(info.getLogicString(), "QF_SEP_AUFFPLIA");
+ }
+ else
+ {
+ TS_ASSERT_EQUALS(info.getLogicString(), "QF_SEP_AUFLIA");
+ }
info = info.getUnlockedCopy();
- TS_ASSERT( !info.isLocked() );
+ TS_ASSERT(!info.isLocked());
info.disableTheory(THEORY_ARITH);
info.disableTheory(THEORY_UF);
info.disableTheory(THEORY_FP);
info.disableTheory(THEORY_SEP);
info.disableTheory(THEORY_BAGS);
info.lock();
- TS_ASSERT_EQUALS( info.getLogicString(), "QF_AX" );
- TS_ASSERT( info.isPure( THEORY_ARRAYS ) );
- TS_ASSERT( ! info.isQuantified() );
-
+ TS_ASSERT_EQUALS(info.getLogicString(), "QF_AX");
+ TS_ASSERT(info.isPure(THEORY_ARRAYS));
+ TS_ASSERT(!info.isQuantified());
// check all-excluded logic
info = info.getUnlockedCopy();
TS_ASSERT( !info.isLocked() );