mirror of https://github.com/CGAL/cgal
automatic removal of CGAL_assertion_code in tests
according to our guidelines, we should use assert so no need for CGAL_assertion_code using find */test/* -name '*.*' | xargs perl -i -pe 's/CGAL_assertion_code\s*\(([a-zA-Z_-\s:=;0-9.]+)\)/$1/g'
This commit is contained in:
parent
146ca2db18
commit
08d6ec062f
|
|
@ -898,7 +898,7 @@ bool IO_base_test<Traits>::read_point(stream& is, Point_2& p) {
|
|||
is >> x;
|
||||
Traits::X_monotone_curve_2 xcv;
|
||||
CGAL::swallow(is,'(');
|
||||
CGAL_assertion_code(bool check=)
|
||||
bool check=
|
||||
read_xcurve(is, xcv);
|
||||
CGAL_assertion(check);
|
||||
|
||||
|
|
@ -910,7 +910,7 @@ bool IO_base_test<Traits>::read_point(stream& is, Point_2& p) {
|
|||
Traits::Algebraic_real_1 x;
|
||||
is >> x;
|
||||
Traits::Curve_2 c;
|
||||
CGAL_assertion_code(bool check = )
|
||||
bool check =
|
||||
read_curve(is,c);
|
||||
CGAL_assertion(check);
|
||||
int arcno=0;
|
||||
|
|
@ -941,16 +941,16 @@ bool IO_base_test<Traits>::read_xcurve(stream& is,
|
|||
case '1': {
|
||||
Curve_2 cv;
|
||||
Point_2 end_left,end_right;
|
||||
CGAL_assertion_code(bool check=)
|
||||
bool check=
|
||||
read_curve(is,cv);
|
||||
CGAL_assertion(check);
|
||||
CGAL::swallow(is,'(');
|
||||
CGAL_assertion_code(check=)
|
||||
check=
|
||||
read_point(is,end_left);
|
||||
CGAL_assertion(check);
|
||||
CGAL::swallow(is,')');
|
||||
CGAL::swallow(is,'(');
|
||||
CGAL_assertion_code(check=)
|
||||
check=
|
||||
read_point(is,end_right);
|
||||
CGAL_assertion(check);
|
||||
CGAL::swallow(is,')');
|
||||
|
|
@ -963,11 +963,11 @@ bool IO_base_test<Traits>::read_xcurve(stream& is,
|
|||
case '2': {
|
||||
Curve_2 cv;
|
||||
Point_2 p;
|
||||
CGAL_assertion_code(bool check=)
|
||||
bool check=
|
||||
read_curve(is,cv);
|
||||
CGAL_assertion(check);
|
||||
CGAL::swallow(is,'(');
|
||||
CGAL_assertion_code(check=)
|
||||
check=
|
||||
read_point(is,p);
|
||||
CGAL_assertion(check);
|
||||
CGAL::swallow(is,')');
|
||||
|
|
|
|||
|
|
@ -1091,7 +1091,7 @@ void test_Polyhedron() {
|
|||
{
|
||||
// Check use of kernel as traits class.
|
||||
PolyhedronN P;
|
||||
CGAL_assertion_code( HalfedgeN_handle h =) P.make_triangle();
|
||||
HalfedgeN_handle h = P.make_triangle();
|
||||
CGAL_assertion( P.is_valid());
|
||||
CGAL_assertion( P.is_triangle( h));
|
||||
CGAL_assertion( ! P.is_tetrahedron( h));
|
||||
|
|
|
|||
|
|
@ -263,7 +263,7 @@ void test_In_place_list() {
|
|||
CGAL_assertion( k == (*i).key);
|
||||
su += (*i).key;
|
||||
++k;
|
||||
CGAL_assertion_code( Iterator j =) ++i;
|
||||
Iterator j = ++i;
|
||||
CGAL_assertion( i == j);
|
||||
if ( i != end) {
|
||||
CGAL_assertion( (*i).key == (*j).key);
|
||||
|
|
@ -283,7 +283,7 @@ void test_In_place_list() {
|
|||
CGAL_assertion( k == (*i).key);
|
||||
su += (*i).key;
|
||||
++k;
|
||||
CGAL_assertion_code( Iterator j =) i++;
|
||||
Iterator j = i++;
|
||||
CGAL_assertion( i != j);
|
||||
if ( i != end) {
|
||||
CGAL_assertion( (*i).key == (*j).key + 1);
|
||||
|
|
@ -356,7 +356,7 @@ void test_In_place_list() {
|
|||
CGAL_assertion( k == (*i).key);
|
||||
su += (*i).key;
|
||||
++k;
|
||||
CGAL_assertion_code( Iterator j =) ++i;
|
||||
Iterator j = ++i;
|
||||
CGAL_assertion( i == j);
|
||||
if ( i != end) {
|
||||
CGAL_assertion( (*i).key == (*j).key);
|
||||
|
|
@ -376,7 +376,7 @@ void test_In_place_list() {
|
|||
CGAL_assertion( k == (*i).key);
|
||||
su += (*i).key;
|
||||
++k;
|
||||
CGAL_assertion_code( Iterator j =) i++;
|
||||
Iterator j = i++;
|
||||
CGAL_assertion( i != j);
|
||||
if ( i != end) {
|
||||
CGAL_assertion( (*i).key == (*j).key + 1);
|
||||
|
|
@ -394,7 +394,7 @@ void test_In_place_list() {
|
|||
int su = 0;
|
||||
int k = 5;
|
||||
do {
|
||||
CGAL_assertion_code(Iterator j =) --i;
|
||||
Iterator j = --i;
|
||||
CGAL_assertion( i == j);
|
||||
CGAL_assertion( (*i).key == (*j).key);
|
||||
CGAL_assertion( k == (*i).key);
|
||||
|
|
@ -461,7 +461,7 @@ void test_In_place_list() {
|
|||
CGAL_assertion( k == (*i).key);
|
||||
su += (*i).key;
|
||||
++k;
|
||||
CGAL_assertion_code( Const_iterator j =) ++i;
|
||||
Const_iterator j = ++i;
|
||||
CGAL_assertion( i == j);
|
||||
if ( i != c_end) {
|
||||
CGAL_assertion( (*i).key == (*j).key);
|
||||
|
|
@ -481,7 +481,7 @@ void test_In_place_list() {
|
|||
CGAL_assertion( k == (*i).key);
|
||||
su += (*i).key;
|
||||
++k;
|
||||
CGAL_assertion_code( Const_iterator j =) i++;
|
||||
Const_iterator j = i++;
|
||||
CGAL_assertion( i != j);
|
||||
if ( i != c_end) {
|
||||
CGAL_assertion( (*i).key == (*j).key + 1);
|
||||
|
|
@ -499,7 +499,7 @@ void test_In_place_list() {
|
|||
int su = 0;
|
||||
int k = 5;
|
||||
do {
|
||||
CGAL_assertion_code(Const_iterator j =) --i;
|
||||
Const_iterator j = --i;
|
||||
CGAL_assertion( i == j);
|
||||
CGAL_assertion( (*i).key == (*j).key);
|
||||
CGAL_assertion( k == (*i).key);
|
||||
|
|
@ -593,7 +593,7 @@ void test_In_place_list() {
|
|||
CGAL_assertion( k == (*i).key);
|
||||
su += (*i).key;
|
||||
++k;
|
||||
CGAL_assertion_code( Iterator j =) ++i;
|
||||
Iterator j = ++i;
|
||||
CGAL_assertion( i == j);
|
||||
if ( i != end) {
|
||||
CGAL_assertion( (*i).key == (*j).key);
|
||||
|
|
@ -613,7 +613,7 @@ void test_In_place_list() {
|
|||
CGAL_assertion( k == (*i).key);
|
||||
su += (*i).key;
|
||||
++k;
|
||||
CGAL_assertion_code( Iterator j =) i++;
|
||||
Iterator j = i++;
|
||||
CGAL_assertion( i != j);
|
||||
if ( i != end) {
|
||||
CGAL_assertion( (*i).key == (*j).key + 1);
|
||||
|
|
@ -686,7 +686,7 @@ void test_In_place_list() {
|
|||
CGAL_assertion( k == (*i).key);
|
||||
su += (*i).key;
|
||||
++k;
|
||||
CGAL_assertion_code( Iterator j =) ++i;
|
||||
Iterator j = ++i;
|
||||
CGAL_assertion( i == j);
|
||||
if ( i != end) {
|
||||
CGAL_assertion( (*i).key == (*j).key);
|
||||
|
|
@ -706,7 +706,7 @@ void test_In_place_list() {
|
|||
CGAL_assertion( k == (*i).key);
|
||||
su += (*i).key;
|
||||
++k;
|
||||
CGAL_assertion_code( Iterator j =) i++;
|
||||
Iterator j = i++;
|
||||
CGAL_assertion( i != j);
|
||||
if ( i != end) {
|
||||
CGAL_assertion( (*i).key == (*j).key + 1);
|
||||
|
|
@ -724,7 +724,7 @@ void test_In_place_list() {
|
|||
int su = 0;
|
||||
int k = 5;
|
||||
do {
|
||||
CGAL_assertion_code(Iterator j =) --i;
|
||||
Iterator j = --i;
|
||||
CGAL_assertion( i == j);
|
||||
CGAL_assertion( (*i).key == (*j).key);
|
||||
CGAL_assertion( k == (*i).key);
|
||||
|
|
@ -790,7 +790,7 @@ void test_In_place_list() {
|
|||
CGAL_assertion( k == (*i).key);
|
||||
su += (*i).key;
|
||||
++k;
|
||||
CGAL_assertion_code( Const_iterator j =) ++i;
|
||||
Const_iterator j = ++i;
|
||||
CGAL_assertion( i == j);
|
||||
if ( i != c_end) {
|
||||
CGAL_assertion( (*i).key == (*j).key);
|
||||
|
|
@ -810,7 +810,7 @@ void test_In_place_list() {
|
|||
CGAL_assertion( k == (*i).key);
|
||||
su += (*i).key;
|
||||
++k;
|
||||
CGAL_assertion_code( Const_iterator j =) i++;
|
||||
Const_iterator j = i++;
|
||||
CGAL_assertion( i != j);
|
||||
if ( i != c_end) {
|
||||
CGAL_assertion( (*i).key == (*j).key + 1);
|
||||
|
|
@ -828,7 +828,7 @@ void test_In_place_list() {
|
|||
int su = 0;
|
||||
int k = 5;
|
||||
do {
|
||||
CGAL_assertion_code(Const_iterator j =) --i;
|
||||
Const_iterator j = --i;
|
||||
CGAL_assertion( i == j);
|
||||
CGAL_assertion( (*i).key == (*j).key);
|
||||
CGAL_assertion( k == (*i).key);
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ void test()
|
|||
|
||||
// Exceptions
|
||||
bool ok = true;
|
||||
CGAL_assertion_code( ok = false );
|
||||
ok = false ;
|
||||
try { CGAL::get_certain(u); }
|
||||
catch (CGAL::Assertion_exception) { ok = true; }
|
||||
bool_assert(ok);
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue