_tests/fsAssert/main.cpp

00001 
00002 //---------------------------------------------------------------------------
00003 #include <fs/sys/fsAssert.h>
00004 
00005 #include <stdio.h> // printf
00006 //---------------------------------------------------------------------------
00007 int main()
00008 {
00009     struct Local_t
00010     {
00011         static bool Test()
00012         {
00013             printf("Local_t::Test()\n");
00014             return true;
00015         }
00016     };
00017             
00018     // Note that in the case of FS_ASSERT_... the expression is not
00019     // evaluated in the release mode !!!
00020 
00021     FS_ASSERT(Local_t::Test());
00022     FS_ASSERT_MSG(Local_t::Test(), "Problem description...");
00023     FS_ASSERT_BEEP(Local_t::Test());
00024     FS_VERIFY(Local_t::Test());
00025     FS_VERIFY_MSG(Local_t::Test(), "Problem description...");
00026     FS_VERIFY_BEEP(Local_t::Test());
00027     FS_STATIC_ASSERT(sizeof(char) < sizeof(int));
00028     
00029     printf("---\n");
00030     
00031     FS_ASSERT(!Local_t::Test());
00032     FS_ASSERT_MSG(!Local_t::Test(), "Problem description...");
00033     FS_ASSERT_BEEP(!Local_t::Test());
00034     FS_VERIFY(!Local_t::Test());
00035     FS_VERIFY_MSG(!Local_t::Test(), "Problem description...");
00036     FS_VERIFY_BEEP(!Local_t::Test());
00037             
00038     return 0;
00039 }
00040 //---------------------------------------------------------------------------

FipS' Code (Thu Feb 15 22:43:35 2007) - (c) Filip STOKLAS (FipS) - [ www ] [ Guest Book ]