• Main Page
  • Related Pages
  • Modules
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

test/TestTypes.cpp

00001 /*
00002  *   This file is part of the Standard Portable Library (SPL).
00003  *
00004  *   SPL is free software: you can redistribute it and/or modify
00005  *   it under the terms of the GNU General Public License as published by
00006  *   the Free Software Foundation, either version 3 of the License, or
00007  *   (at your option) any later version.
00008  *
00009  *   SPL is distributed in the hope that it will be useful,
00010  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  *   GNU General Public License for more details.
00013  *
00014  *   You should have received a copy of the GNU General Public License
00015  *   along with SPL.  If not, see <http://www.gnu.org/licenses/>.
00016  */
00017 #include <spl/Debug.h>
00018 #include <spl/types.h>
00019 
00020 #ifdef DEBUG
00021 
00022 void testtypes(  )
00023 {
00024         UNIT_TEST( "int8", sizeof(int8) == 1 );
00025         UNIT_TEST( "int16", sizeof(int16) == 2 );
00026         UNIT_TEST( "int32", sizeof(int32) == 4 );
00027         UNIT_TEST( "int64", sizeof(int64) == 8 );
00028         UNIT_TEST( "uint8", sizeof(uint8) == 1 );
00029         UNIT_TEST( "byte", sizeof(byte) == 1 );
00030         UNIT_TEST( "uint16", sizeof(uint16) == 2 );
00031         UNIT_TEST( "uint32", sizeof(uint32) == 4 );
00032         UNIT_TEST( "uint64", sizeof(uint64) == 8 );
00033         UNIT_TEST( "bool true", true == (1==1) );
00034         UNIT_TEST( "bool false", false == (1==0) );
00035 }
00036 
00037 #endif /* DEBUG */
00038 
00039