summaryrefslogtreecommitdiff
path: root/test/unit
diff options
context:
space:
mode:
Diffstat (limited to 'test/unit')
-rw-r--r--test/unit/Makefile.am1
-rw-r--r--test/unit/context/context_black.h4
-rw-r--r--test/unit/expr/type_node_white.h33
-rw-r--r--test/unit/parser/parser_black.h8
-rw-r--r--test/unit/theory/type_enumerator_white.h3
-rw-r--r--test/unit/util/subrange_bound_white.h74
6 files changed, 8 insertions, 115 deletions
diff --git a/test/unit/Makefile.am b/test/unit/Makefile.am
index c2f2b24e2..53981f94e 100644
--- a/test/unit/Makefile.am
+++ b/test/unit/Makefile.am
@@ -52,7 +52,6 @@ UNIT_TESTS += \
util/rational_white \
util/stats_black \
util/boolean_simplification_black \
- util/subrange_bound_white \
main/interactive_shell_black
endif
diff --git a/test/unit/context/context_black.h b/test/unit/context/context_black.h
index 207fbc182..00dc42922 100644
--- a/test/unit/context/context_black.h
+++ b/test/unit/context/context_black.h
@@ -37,7 +37,7 @@ struct MyContextNotifyObj : public ContextNotifyObj {
nCalls(0) {
}
- virtual ~MyContextNotifyObj() throw(AssertionException) {}
+ virtual ~MyContextNotifyObj() {}
void contextNotifyPop() {
++nCalls;
@@ -75,7 +75,7 @@ public:
nSaves(0) {
}
- virtual ~MyContextObj() throw(AssertionException) {
+ virtual ~MyContextObj() {
destroy();
}
diff --git a/test/unit/expr/type_node_white.h b/test/unit/expr/type_node_white.h
index 701f04003..d0438e376 100644
--- a/test/unit/expr/type_node_white.h
+++ b/test/unit/expr/type_node_white.h
@@ -24,7 +24,6 @@
#include "expr/expr_manager.h"
#include "expr/node_manager.h"
#include "expr/type_node.h"
-#include "util/subrange_bound.h"
#include "smt/smt_engine.h"
using namespace CVC4;
@@ -59,7 +58,6 @@ public:
TypeNode booleanType = d_nm->booleanType();
TypeNode arrayType = d_nm->mkArrayType(realType, integerType);
TypeNode bvType = d_nm->mkBitVectorType(32);
- TypeNode subrangeType = d_nm->mkSubrangeType(SubrangeBounds(Integer(1), Integer(10)));
Node x = d_nm->mkBoundVar("x", realType);
Node xPos = d_nm->mkNode(GT, x, d_nm->mkConst(Rational(0)));
@@ -68,73 +66,42 @@ public:
vector<Expr> formals;
formals.push_back(x.toExpr());
d_smt->defineFunction(lambda.toExpr(), formals, xPos.toExpr());
- TypeNode predicateSubtype = d_nm->mkPredicateSubtype(lambda.toExpr());
TS_ASSERT( not realType.isComparableTo(booleanType) );
TS_ASSERT( realType.isComparableTo(integerType) );
TS_ASSERT( realType.isComparableTo(realType) );
TS_ASSERT( not realType.isComparableTo(arrayType) );
TS_ASSERT( not realType.isComparableTo(bvType) );
- TS_ASSERT( realType.isComparableTo(subrangeType) );
- TS_ASSERT( realType.isComparableTo(predicateSubtype) );
TS_ASSERT( not booleanType.isComparableTo(integerType) );
TS_ASSERT( not booleanType.isComparableTo(realType) );
TS_ASSERT( booleanType.isComparableTo(booleanType) );
TS_ASSERT( not booleanType.isComparableTo(arrayType) );
TS_ASSERT( not booleanType.isComparableTo(bvType) );
- TS_ASSERT( not booleanType.isComparableTo(subrangeType) );
- TS_ASSERT( not booleanType.isComparableTo(predicateSubtype) );
TS_ASSERT( integerType.isComparableTo(realType) );
TS_ASSERT( integerType.isComparableTo(integerType) );
TS_ASSERT( not integerType.isComparableTo(booleanType) );
TS_ASSERT( not integerType.isComparableTo(arrayType) );
TS_ASSERT( not integerType.isComparableTo(bvType) );
- TS_ASSERT( integerType.isComparableTo(subrangeType) );
- TS_ASSERT( integerType.isComparableTo(predicateSubtype) );
TS_ASSERT( not arrayType.isComparableTo(booleanType) );
TS_ASSERT( not arrayType.isComparableTo(integerType) );
TS_ASSERT( not arrayType.isComparableTo(realType) );
TS_ASSERT( arrayType.isComparableTo(arrayType) );
TS_ASSERT( not arrayType.isComparableTo(bvType) );
- TS_ASSERT( not arrayType.isComparableTo(subrangeType) );
- TS_ASSERT( not arrayType.isComparableTo(predicateSubtype) );
TS_ASSERT( not bvType.isComparableTo(booleanType) );
TS_ASSERT( not bvType.isComparableTo(integerType) );
TS_ASSERT( not bvType.isComparableTo(realType) );
TS_ASSERT( not bvType.isComparableTo(arrayType) );
TS_ASSERT( bvType.isComparableTo(bvType) );
- TS_ASSERT( not bvType.isComparableTo(subrangeType) );
- TS_ASSERT( not bvType.isComparableTo(predicateSubtype) );
-
- TS_ASSERT( not subrangeType.isComparableTo(booleanType) );
- TS_ASSERT( subrangeType.isComparableTo(integerType) );
- TS_ASSERT( subrangeType.isComparableTo(realType) );
- TS_ASSERT( not subrangeType.isComparableTo(arrayType) );
- TS_ASSERT( not subrangeType.isComparableTo(bvType) );
- TS_ASSERT( subrangeType.isComparableTo(subrangeType) );
- TS_ASSERT( subrangeType.isComparableTo(predicateSubtype) );
-
- TS_ASSERT( not predicateSubtype.isComparableTo(booleanType) );
- TS_ASSERT( predicateSubtype.isComparableTo(integerType) );
- TS_ASSERT( predicateSubtype.isComparableTo(realType) );
- TS_ASSERT( not predicateSubtype.isComparableTo(arrayType) );
- TS_ASSERT( not predicateSubtype.isComparableTo(bvType) );
- TS_ASSERT( predicateSubtype.isComparableTo(subrangeType) );
- TS_ASSERT( predicateSubtype.isComparableTo(predicateSubtype) );
TS_ASSERT(realType.getBaseType() == realType);
TS_ASSERT(integerType.getBaseType() == realType);
TS_ASSERT(booleanType.getBaseType() == booleanType);
TS_ASSERT(arrayType.getBaseType() == arrayType);
TS_ASSERT(bvType.getBaseType() == bvType);
- TS_ASSERT(subrangeType.getBaseType() == realType);
- TS_ASSERT(predicateSubtype.getBaseType() == realType);
-
- TS_ASSERT(predicateSubtype.getSubtypeParentType() == integerType);
}
};/* TypeNodeWhite */
diff --git a/test/unit/parser/parser_black.h b/test/unit/parser/parser_black.h
index 4fa163050..9266c42b0 100644
--- a/test/unit/parser/parser_black.h
+++ b/test/unit/parser/parser_black.h
@@ -257,10 +257,10 @@ public:
tryBadInput("a : INT; a: INT = 5;"); // can't define after decl
tryBadInput("a : INT = 5; a: BOOLEAN;"); // decl w/ incompatible type
tryBadInput("a : TYPE; a : INT; a : a;"); // ok except a is both INT and sort `a'
- tryBadInput("a : [1..-1];"); // bad subrange
- tryBadInput("a : [0. .0];"); // bad subrange
- tryBadInput("a : [..0];"); // bad subrange
- tryBadInput("a : [0.0];"); // bad subrange
+ //tryBadInput("a : [1..-1];"); // bad subrange
+ //tryBadInput("a : [0. .0];"); // bad subrange
+ //tryBadInput("a : [..0];"); // bad subrange
+ //tryBadInput("a : [0.0];"); // bad subrange
tryBadInput("DATATYPE list = nil | cons(car:INT,cdr:list) END; DATATYPE list = nil | cons(car:INT,cdr:list) END;");
tryBadInput("DATATYPE list = nil | cons(car:INT,cdr:list) END; DATATYPE list2 = nil END;");
tryBadInput("DATATYPE tree = node(data:(list,list,ARRAY trex OF list)), list = cons(car:ARRAY list OF tree,cdr:BITVECTOR(32)) END;");
diff --git a/test/unit/theory/type_enumerator_white.h b/test/unit/theory/type_enumerator_white.h
index 1631ddeba..3094345bd 100644
--- a/test/unit/theory/type_enumerator_white.h
+++ b/test/unit/theory/type_enumerator_white.h
@@ -140,7 +140,7 @@ public:
TS_ASSERT_EQUALS(*++te, d_nm->mkConst(Rational(1, 7)));
TS_ASSERT_EQUALS(*++te, d_nm->mkConst(Rational(-1, 7)));
TS_ASSERT( ! te.isFinished() );
-
+/*
// subrange bounded only below
te = TypeEnumerator(d_nm->mkSubrangeType(SubrangeBounds(SubrangeBound(Integer(0)), SubrangeBound())));
TS_ASSERT( ! te.isFinished() );
@@ -173,6 +173,7 @@ public:
TS_ASSERT_THROWS(*te, NoMoreValuesException);
std::cout<<"here\n";
TS_ASSERT_THROWS(*++te, NoMoreValuesException);
+ */
}
void testDatatypesFinite() {
diff --git a/test/unit/util/subrange_bound_white.h b/test/unit/util/subrange_bound_white.h
deleted file mode 100644
index c6281213c..000000000
--- a/test/unit/util/subrange_bound_white.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/********************* */
-/*! \file subrange_bound_white.h
- ** \verbatim
- ** Top contributors (to current version):
- ** Morgan Deters, Paul Meng, Tim King
- ** This file is part of the CVC4 project.
- ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS
- ** in the top-level source directory) and their institutional affiliations.
- ** All rights reserved. See the file COPYING in the top-level source
- ** directory for licensing information.\endverbatim
- **
- ** \brief White-box testing of CVC4::SubrangeBound
- **
- ** White-box testing of CVC4::SubrangeBound.
- **/
-
-#include <sstream>
-#include <string>
-
-#include "util/integer.h"
-#include "util/subrange_bound.h"
-
-using namespace CVC4;
-using namespace std;
-
-class SubrangeBoundWhite : public CxxTest::TestSuite {
- stringstream ss;
-
-public:
-
- void testInfinite() {
- SubrangeBound b;
- TS_ASSERT( ! b.hasBound() );
- TS_ASSERT_THROWS( b.getBound(), IllegalArgumentException );
- ss.str(""); ss << b;
- TS_ASSERT_EQUALS( ss.str(), "_" );
- }
-
- void testZero() {
- SubrangeBound b1(0), b2(Integer("0")), b3(Integer("1"));
- TS_ASSERT( b1.hasBound() && b2.hasBound() && b3.hasBound() );
- TS_ASSERT( b1.getBound() == 0 && b2.getBound() == 0 && b3.getBound() == 1 );
- TS_ASSERT( b1 == b2 ); TS_ASSERT( b2 == b1 );
- TS_ASSERT( !(b1 == b3) ); TS_ASSERT( !(b3 == b1) );
- TS_ASSERT( !(b2 == b3) ); TS_ASSERT( !(b3 == b2) );
- TS_ASSERT( !(b1 != b2) ); TS_ASSERT( !(b2 != b1) );
- TS_ASSERT( b1 != b3 ); TS_ASSERT( b3 != b1 );
- TS_ASSERT( b2 != b3 ); TS_ASSERT( b3 != b2 );
- ss.str(""); ss << b1;
- TS_ASSERT( ss.str() == "0" );
- ss.str(""); ss << b2;
- TS_ASSERT( ss.str() == "0" );
- ss.str(""); ss << b3;
- TS_ASSERT( ss.str() == "1" );
- }
-
- void testOne() {
- SubrangeBound b(Integer("1"));
- TS_ASSERT( b.hasBound() );
- TS_ASSERT( b.getBound() == 1 );
- ss.str(""); ss << b;
- TS_ASSERT( ss.str() == "1" );
- }
-
- void testMinusOne() {
- }
-
- void testLarge() {
- }
-
- void testSmall() {
- }
-
-};/* class SubrangeBoundWhite */
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback