| Cpp UTest | UserPreferences |
|
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
°ü·Ã ¼Àû
°ü·Ã »çÀÌÆ®
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