#include "TROOT.h"
#include "TBits.h"
#include <stdlib.h>
#include <stdio.h>
Go to the source code of this file.
#define A | ( | exp | ) |
Value:
do {\ if (!(exp)) {\ fprintf(stderr," FAILURE!\n\nIn %s:\n\n",current_test);\ fprintf(stderr,"Assertion (%s) failed at %s:%d.\n\n",\ #exp,__FILE__,__LINE__);\ exit(1);\ }\ } while (0)
Definition at line 15 of file testbits.cxx.
#define DO_TEST | ( | exp | ) |
Value:
do {\ current_test=#exp;\ fprintf(stderr,".");\ fflush(stderr);\ exp;\ ++test_count;\ } while (0)
Definition at line 24 of file testbits.cxx.
Referenced by main().
Definition at line 125 of file testbits.cxx.
Referenced by test_set_from_char(), test_set_from_int(), and test_set_from_short().
Definition at line 66 of file testbits.cxx.
References A, bits, buf, char_bits, and i.
Referenced by test_get_to_char().
Definition at line 96 of file testbits.cxx.
References A, bits, buf, i, and int_bits.
Referenced by test_get_to_int().
Definition at line 81 of file testbits.cxx.
References A, bits, buf, i, and short_bits.
Referenced by test_get_to_short().
int main | ( | int | , | |
char ** | v | |||
) |
Definition at line 183 of file testbits.cxx.
References DO_TEST, fprintf(), test_count, test_get_to_char(), test_get_to_int(), test_get_to_short(), test_set_bit(), test_set_from_char(), test_set_from_int(), and test_set_from_short().
Definition at line 106 of file testbits.cxx.
Referenced by test_get_to_char(), test_get_to_int(), and test_get_to_short().
Definition at line 61 of file testbits.cxx.
References bits, and char_bits.
Referenced by test_set_from_char().
Definition at line 91 of file testbits.cxx.
References bits, and int_bits.
Referenced by test_set_from_int().
Definition at line 76 of file testbits.cxx.
References bits, and short_bits.
Referenced by test_set_from_short().
static void test_get_to_char | ( | UInt_t | nbits | ) | [static] |
Definition at line 162 of file testbits.cxx.
References assert_bits_by_char(), b, and set_bits().
Referenced by main().
static void test_get_to_int | ( | UInt_t | nbits | ) | [static] |
Definition at line 174 of file testbits.cxx.
References assert_bits_by_int(), b, and set_bits().
Referenced by main().
static void test_get_to_short | ( | UInt_t | nbits | ) | [static] |
Definition at line 168 of file testbits.cxx.
References assert_bits_by_short(), b, and set_bits().
Referenced by main().
static void test_set_bit | ( | ) | [static] |
static void test_set_from_char | ( | UInt_t | nbits | ) | [static] |
Definition at line 144 of file testbits.cxx.
References assert_bits(), b, and set_bits_by_char().
Referenced by main().
static void test_set_from_int | ( | UInt_t | nbits | ) | [static] |
Definition at line 156 of file testbits.cxx.
References assert_bits(), b, and set_bits_by_int().
Referenced by main().
static void test_set_from_short | ( | UInt_t | nbits | ) | [static] |
Definition at line 150 of file testbits.cxx.
References assert_bits(), b, and set_bits_by_short().
Referenced by main().
Initial value:
{ 0, 1, 3, 7, 15, 31, 63, 127 }
Definition at line 38 of file testbits.cxx.
Referenced by assert_bits_by_char(), and set_bits_by_char().
const char* current_test [static] |
Definition at line 12 of file testbits.cxx.
Initial value:
{ 0 + 1 * 256 + 3 * 65536 + 7 * 16777216, 15 + 31 * 256 + 63 * 65536 + 127 * 16777216 }
Definition at line 56 of file testbits.cxx.
Referenced by assert_bits_by_int(), and set_bits_by_int().
const Short_t short_bits[] [static] |
Initial value:
{ 0 + 1 * 256, 3 + 7 * 256, 15 + 31 * 256, 63 + 127 * 256 }
Definition at line 49 of file testbits.cxx.
Referenced by assert_bits_by_short(), and set_bits_by_short().
unsigned test_count [static] |