- CppUnit . . . . 39 matches
C++ 에서 UnitTest를 하기 위한 UnitTestFramework. http://sourceforge.net/projects/cppunit/ 에서 다운 받을 수 있다.
[http://janbyul.com/moin/moin.cgi/CppUnit/HowTo/Kor 이곳]에 VS2005용 설정방법을 간단하게 정리해둠. - 임인택
* Library 화일 생성 : {{{~cpp ...cppunitexamplesexamples.dsw }}} 을 연뒤 {{{~cpp WorkSpace }}}의 {{{~cpp FileView }}}에서 {{{~cpp CppUnitTestApp files }}} 에 Set as Active Project로 맞춰준다.(기본값으로 되어 있다.) 그리고 컴파일 해주면 lib 폴더에 library 화일들이 생성될 것이다.
== 준비 2 - CppUnit을 사용할 프로젝트 열 때 해주어야 할 기본 세팅 ==
Library : {{{~cpp ...cppunit-x.x.xlib }}} [[BR]]
Include : {{{~cpp ...\cppunit-x.x.xinclude }}}
a. Tools -> Options -> Directories -> Include files 에서 해당 cppunit
* Project Setting - Link - General - object/library 에 cppunitd.lib, testrunnerd.lib 를 추가해준다.
copy c:cppunitlibtestrunnerd.dll .
#include <cppunit/extensions/testfactoryregistry.h>
runner.addTest ( CppUnit::TestFactoryRegistry::getRegistry().makeTest() );
Test Case 가 될 Class는 {{{~cpp CppUnit::TestCase }}} 를 상속받는다.
#include <cppunit/TestCase.h>
#include <cppunit/extensions/HelperMacros.h>
class ExampleTestCase : public CppUnit::TestCase
CPPUNIT_TEST_SUITE( ExampleTestCase ); // TestSuite
CPPUNIT_TEST( testExample ); // TestCase 의 등록.
CPPUNIT_TEST_SUITE_END(); // TestSuite 의 끝. 이로서 해당 Test Case 에 자동으로 suite 메소드가 만들어진다.
CPPUNIT_TEST_SUITE_REGISTRATION( ExampleTestCase ); // TestSuite 를 등록하기. TestRunner::addTest 가 필요없다.
CPPUNIT_ASSERT (1 == 2);
- VonNeumannAirport/1002 . . . . 10 matches
여기서 잠시 CppUnit 셋팅을 맞춰놓고.
#include <cppunit/TestCase.h>
#include <cppunit/extensions/HelperMacros.h>
#include <cppunit/Ui/Text/TestRunner.h>
class TestOne : public CppUnit::TestCase {
CPPUNIT_TEST_SUITE (TestOne);
CPPUNIT_TEST_SUITE_END();
CppUnit::TextUi::TestRunner runner;
class TestOne : public CppUnit::TestCase {
CPPUNIT_TEST_SUITE (TestOne);
CPPUNIT_TEST (test1);
CPPUNIT_TEST_SUITE_END();
CPPUNIT_ASSERT_EQUAL (1, conf->getTraffic ());
CPPUNIT_ASSERT_EQUAL (1, conf->getTraffic ());
CPPUNIT_ASSERT_EQUAL (2, conf->getTraffic ());
CPPUNIT_ASSERT_EQUAL (102, conf->getTraffic ());
CPPUNIT_ASSERT_EQUAL (expectedSet[i], conf->getTraffic ());
CPPUNIT_ASSERT_EQUAL(2, conf->getTraffic());
CPPUNIT_ASSERT_EQUAL(2, conf->getTraffic());
CPPUNIT_ASSERT_EQUAL(1, conf->getDistance(1,1));
- GuiTestingWithMfc . . . . 5 matches
CppUnit 을 이용한 MFC 에서의 GuiTesting (시도중. 결과는?)
Dialog Based 의 경우 Modal Dialog 를 이용하게 된다. 이 경우 Dialog 내에서만 메세지루프가 작동하게 되므로, DoModal 함수로 다이얼로그를 띄운 이후의 코드는 해당 Dialog 가 닫히기 전까지는 실행되지 않는다. 고로, CppUnit 에서의 fixture 를 미리 구성하여 쓸 수 없다.
#include "cppunit\ui\mfc\TestRunner.h"
CppUnit::MfcUi::TestRunner runner;
#include <cppunit/TestCase.h>
#include <cppunit/Extensions/HelperMacros.h>
class GuiTestCase : public CppUnit::TestCase {
CPPUNIT_TEST_SUITE(GuiTestCase);
CPPUNIT_TEST ( test1One );
CPPUNIT_TEST ( test2GuiOne );
CPPUNIT_TEST ( test3ListAdd );
CPPUNIT_TEST_SUITE_END();
CPPUNIT_ASSERT_EQUAL (10, 10);
CPPUNIT_ASSERT_EQUAL (true, pDlg->m_bFlag);
CPPUNIT_ASSERT_EQUAL (1, pDlg->m_ctlList.GetCount());
CPPUNIT_ASSERT ( isSameString(str, "Testing..."));
CPPUNIT_ASSERT_EQUAL (2, pDlg->m_ctlList.GetCount());
CPPUNIT_ASSERT ( isSameString(str, "Testing2..."));
CPPUNIT_ASSERT_EQUAL(0, pDlg->m_ctlList.GetCurSel());
CPPUNIT_ASSERT_EQUAL(1, pDlg->m_ctlList.GetCurSel());
- 유닛테스트세미나 . . . . 3 matches
2006년 2학년 1학기 자바 텀 프로젝트였던 심플트론 시뮬레이터에서 이재혁 팀이 이용한 유닛 테스트를 알아보고, JUnit 및 CppUnit을 실습해본다.
내가 만든 CppUnit실습
내가 만든 CppUnit
- MineFinder . . . . 2 matches
* 개발툴 : Visual C++ 6.0, cppunit 1.62, SPY++, 지뢰찾기 2000, 98버전
* CppUnit 를 쓸때에는 MFC 라이브러리들이 static 으로 링킹이 안되는 것 같다. 좀 더 살펴봐야겠다.
* CppUnit - 이번 플밍때 윈도우 메세지 관련 처리에 대해서는 코드를 작성못했다. (이 부분에 대해서는 전통적인 Manual Test방법을 쓸 수 밖에. GUI Testing 관련 글을 더 읽어봐야 겠다. 아직 더 지식이 필요하다.) 단, 나중에 비트맵 분석부분 & Refactoring 시에 TFP 를 할 수 있게 되었다.
- NUnit . . . . 2 matches
* C++에서 CppUnit을 사용할수도 있겠지만, [인수]군이 써본바로는, 또한 6.0이 아닌 .Net을 쓴다면 NUnit이 더 좋은것 같다.(어차피 6.0에선 돌아가지도 않지만--;) CppUnit은... 뭔가 좀 이상하다.--; --[인수]
- PairProgramming . . . . 2 matches
간단한 아날로그 시계를 만드는 프로그램이였다. MFC + CppUnit 로 작업했다.
* Pair 의 분배 - TFP를 공부하느냐고 시작한 것이였던지라, 상대적으로 CppUnit 에 익숙하지 않은 사람에게 코딩을 주도하게 했다. 한 1주일정도 되는 프로젝트라면 Junior로 하여금 경험을 쌓게 함으로써 오히려 장점으로 작용할 수도 있을 것 같다. 하지만, 역시 적절하게 분배를 했었어야 할 것 같다.
- C++ . . . . 1 match
* [C++/CppUnit]
- C++/CppUnit . . . . 1 match
#Redirect CppUnit
- SeminarHowToProgramIt . . . . 1 match
(See Also ["PyUnit"], ["UnitTest"], ["JUnit"], ["CppUnit"]. C 언어를 사용하시는 분들은 ASSERT 문으로 UnitTest 부분을 어느정도 대신할 수 있습니다.)
- SilentASSERT . . . . 1 match
CppUnit 을 쓸려고도 해 보았지만 역시 너무 까다로와서 ASSERT를 수정하기로 맘 먹었습니다.
- TestFirstProgramming . . . . 1 match
테스트 코드 작성에 대해서는 UnitTest 와 PyUnit, CppUnit 를 참조하라.
- TestSuiteExamples . . . . 1 match
=== CppUnit ===
- UnitTest . . . . 1 match
보통 테스트 코드를 작성할때는 UnitTestFramework Library들을 이용한다. 각 Language 별로 다양한데, C++ 사용자는 ["CppUnit"], Java 는 ["JUnit"], Python 은 ["PyUnit"] 등을 이용할 수 있다. PyUnit 의 경우는 2.1부터 기본 모듈에 포함되어있다.
- UnitTestFramework . . . . 1 match
* ["CppUnit"]
Found 15 matching pages out of 7555 total pages (5000 pages are searched)
You can also click here to search title.