Node n = noKind;
+#ifdef CVC4_DEBUG
TS_ASSERT_THROWS_ANYTHING(noKind.getKind(););
-
+#endif
NodeBuilder<> spec(specKind);
push_back(noKind, K);
TS_ASSERT_EQUALS(noKind.getNumChildren(), K+K);
+#ifdef CVC4_DEBUG
noKind << specKind;
n = noKind;
TS_ASSERT_THROWS_ANYTHING( noKind.getNumChildren() );
+#endif
}
void testOperatorSquare(){
Node i_K = d_nm->mkNode(NOT);
+#ifdef CVC4_DEBUG
TS_ASSERT_THROWS_ANYTHING(arr[-1];);
TS_ASSERT_THROWS_ANYTHING(arr[0];);
-
+#endif
arr << i_0;
for(int i=3;i<K;++i) TS_ASSERT_EQUALS(arr[i], Node::null());
TS_ASSERT_EQUALS(arr[K], i_K);
+#ifdef CVC4_DEBUG
Node n = arr;
TS_ASSERT_THROWS_ANYTHING(arr[0];);
+#endif
}
void testClear(){
/* void clear(Kind k = UNDEFINED_KIND); */
NodeBuilder<> nb;
-
TS_ASSERT_EQUALS(nb.getKind(), UNDEFINED_KIND);
TS_ASSERT_EQUALS(nb.getNumChildren(), 0);
TS_ASSERT_EQUALS(nb.begin(), nb.end());
void testStreamInsertionKind(){
/* NodeBuilder& operator<<(const Kind& k); */
+#ifdef CVC4_DEBUG
NodeBuilder<> spec(specKind);
TS_ASSERT_THROWS_ANYTHING( spec << PLUS; );
+#endif
NodeBuilder<> noSpec;
noSpec << specKind;
NodeBuilder<> nb(specKind);
Node n = nb;// avoid warning on clear()
nb.clear(PLUS);
+
+#ifdef CVC4_DEBUG
TS_ASSERT_THROWS_ANYTHING( nb << PLUS; );
+#endif
NodeBuilder<> testRef;
TS_ASSERT_EQUALS((testRef << specKind).getKind(), specKind);
-
+#ifdef CVC4_DEBUG
NodeBuilder<> testTwo;
TS_ASSERT_THROWS_ANYTHING(testTwo << specKind << PLUS;);
+#endif
NodeBuilder<> testMixOrder1;
TS_ASSERT_EQUALS((testMixOrder1<< specKind << d_nm->mkNode(TRUE)).getKind(),
TS_ASSERT_EQUALS(nb.getNumChildren(), K);
TS_ASSERT_DIFFERS(nb.begin(), nb.end());
+#ifdef CVC4_DEBUG
Node n = nb;
TS_ASSERT_THROWS_ANYTHING(nb << n;);
-
+#endif
NodeBuilder<> overflow(specKind);
TS_ASSERT_EQUALS(overflow.getKind(), specKind);
TS_ASSERT_EQUALS(nexplicit.getKind(), specKind);
TS_ASSERT_EQUALS(nexplicit.getNumChildren(), K);
+#ifdef CVC4_DEBUG
TS_ASSERT_THROWS_ANYTHING(Node blah = implicit);
+#endif
}
void testToStream(){