MoinMoin   Cpp UTest UserPreferences
 
Help Info Print View Search Diffs Edit
 À妽º   µµ¿ò¸»   Ã£±â   ´ë¹®   ¹Ù²ï±Û 

  1. ¸ñÀû
  2. CppUTest
  3. °ü·Ã ¼­Àû
  4. °ü·Ã »çÀÌÆ®
Since 2009. 2. 19.

¸ñÀû

CppUTest

CHECK(bool)
CHECK_EQUAL(expected_alltype, actual_alltype)
STRCMP_EQUAL(expected_string, actual_string)
LONGS_EQUAL(expected_long, actual_long)
BYTES_EQUAL(expected_byte, actual_double)
DOUBLES_EQUAL(expected_double, actual_double)

//ÀüÁ¦Á¶°Ç 
libCppUTest.a°¡ ÀÖ´Â °æ¿ì 
 
//»õ·Î¿î Project »ý¼º 
NewTestProject 
 
//include path ¼³Á¤ 
CppUTest_UnzipFoler/Include 
 
//lib path ¼³Á¤ 
Properties -> C/C++ Build -> Settings -> C++ Linker -> Libraries¿¡¼­ libCppUTest.a ¼³Á¤ 
 
//AllTests.cpp 
#include "CppUTest/CommandLineTestRunner.h" 
 
int main(int ac, const char** av) 
{ 
  return CommandLineTestRunner::RunAllTests(ac, av); 
} 
 
//AllTests.h 
IMPORT_TEST_GROUP(TestGroupName); 
 
//fooTest.cpp 
extern "C"{ 
    #include "foo.h" 
} 
 
#include "CppUTest/TestHarness.h" 
TEST_GROUP(TestGroupName) 
{ 
    void setup() 
    {} 
 
    void teardown() 
    {} 
}; 
 
TEST(TestGroupName, TestName) 
{ 
    CHECK_EQUAL(1, 1); 
} 
 
//foo.c 
 
//foo.h 

°ü·Ã ¼­Àû

°ü·Ã »çÀÌÆ®


PythonPowered EditText of this page (last modified 2009-10-10 08:08:27)
FindPage by browsing, searching, or an index
Or try one of these actions: DeletePage, DeleteUploadedFile, LikePages, SpellCheck, UploadFile