1 //------------------------------------------------------------------------------ 2 // MessageEasyFindTest.cpp 3 // 4 //------------------------------------------------------------------------------ 5 6 // Standard Includes ----------------------------------------------------------- 7 8 // System Includes ------------------------------------------------------------- 9 #include <Message.h> 10 #include <Point.h> 11 #include <Rect.h> 12 13 // Project Includes ------------------------------------------------------------ 14 15 // Local Includes -------------------------------------------------------------- 16 #include "MessageEasyFindTest.h" 17 18 // Local Defines --------------------------------------------------------------- 19 20 // Globals --------------------------------------------------------------------- 21 22 //------------------------------------------------------------------------------ 23 void TMessageEasyFindTest::MessageEasyFindTest1() 24 { 25 BRect r(0, 0, -1, -1); 26 BPoint p(0, 0); 27 BMessage msg; 28 CPPUNIT_ASSERT(msg.FindRect("data") == r); 29 CPPUNIT_ASSERT(msg.FindPoint("data") == p); 30 CPPUNIT_ASSERT(msg.FindString("data") == NULL); 31 CPPUNIT_ASSERT(msg.FindInt8("data") == 0); 32 CPPUNIT_ASSERT(msg.FindInt16("data") == 0); 33 CPPUNIT_ASSERT(msg.FindInt32("data") == 0); 34 CPPUNIT_ASSERT(msg.FindInt64("data") == 0); 35 CPPUNIT_ASSERT(msg.FindBool("data") == false); 36 CPPUNIT_ASSERT(msg.FindFloat("data") == 0); 37 CPPUNIT_ASSERT(msg.FindDouble("data") == 0); 38 } 39 //------------------------------------------------------------------------------ 40 TestSuite* TMessageEasyFindTest::Suite() 41 { 42 TestSuite* suite = new TestSuite("BMessage::EasyFinds"); 43 44 ADD_TEST4(BMessage, suite, TMessageEasyFindTest, MessageEasyFindTest1); 45 46 return suite; 47 } 48 //------------------------------------------------------------------------------ 49 50 /* 51 * $Log $ 52 * 53 * $Id $ 54 * 55 */ 56 57