X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=tests%2Futils.h;fp=tests%2Futils.h;h=52893b207f12bd1af51a851febc508159d16b319;hp=0000000000000000000000000000000000000000;hb=897b8e238be8ce71c0d484c31155fc8390cda6f0;hpb=e75cda3acbabc7570777d6e708f43231e7bc4cac diff --git a/tests/utils.h b/tests/utils.h new file mode 100644 index 000000000..52893b207 --- /dev/null +++ b/tests/utils.h @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2011 David Goulet + * + * 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 + * as published by the Free Software Foundation; only version 2 + * of the License. + * + * 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. + */ + +#include + +#define BRIGHT 1 +#define GREEN 32 +#define RED 31 + +#define PRINT_OK() printf("%c[%d;%dmOK%c[%dm\n", 0x1B, BRIGHT, GREEN, 0x1B, 0); +#define PRINT_FAIL() printf("%c[%d;%dmFAIL%c[%dm\n", 0x1B, BRIGHT, RED, 0x1B, 0);