X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flibpspp%2Fassertion.h;h=237710813d52ffaa1237f17e55ddbf981e0429e8;hb=bbcfaa2d011a9e0115286769a51476a4dddf2b12;hp=96b2d6fcff45fdeb04c8ac4bc152ed43b6ca8d65;hpb=97d4f38945476834fd7fce612b663f19f2b291f8;p=pspp diff --git a/src/libpspp/assertion.h b/src/libpspp/assertion.h index 96b2d6fcff..237710813d 100644 --- a/src/libpspp/assertion.h +++ b/src/libpspp/assertion.h @@ -1,22 +1,18 @@ -/* PSPP - computes sample statistics. +/* PSPP - a program for statistical analysis. Copyright (C) 2006 Free Software Foundation, Inc. - Written by John Darrington - and Ben Pfaff . - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301, USA. */ + along with this program. If not, see . */ #ifndef __PSPP_ASSERT_H #define __PSPP_ASSERT_H @@ -26,7 +22,7 @@ #define NOT_REACHED() do { assert (0); abort (); } while (0) -#endif +#endif #include @@ -40,3 +36,6 @@ #else #define expensive_assert(EXPR) ((void) 0) #endif + + +#define testing_assert(EXPR) do {if (settings_get_testing_mode ()) assert (EXPR); } while (0);