2006-12-01

CppUnit/cppunit-xのPukiWikiプラグイン

例えば

* ファイル操作/File
ファイルに関する操作をまとめたクラスです。

** オープン/open
ファイルを開く
** クローズ/close
ファイルを閉じる

とPukiWikiに書いたら、

/// ファイルに関する操作をまとめたクラスです。
class File {
/// ファイルを開く
open();
/// ファイルを閉じる
close();
};




class FileTest: public Test {
/// File::openのテスト
void test_open();
/// File::closeのテスト
void test_close();

static Test *suite() {
TestSuite *ts = new TestSuite();
ts->addTest(new TEST_CALLER(FileTest, test_open));
ts->addTest(new TEST_CALLER(FileTest, test_close));
return ts;
}
};


を出力するプラグイン作った。実戦投入して、便利だったら上流に投げてみようかなあ…

0 件のコメント: