タグ

ブックマーク / seasons.hateblo.jp (1)

  • BOOST_AUTO_TEST入門 - Seasons.NET

    BOOSTのユニットテストは、手軽で便利だけど、やはりsuiteを作って addしないといけないので、これが面倒。気軽さがない。 でも、そんな人の為にAUTO_TESTというものがあります。 BOOST_AUTO_TEST_CASEを追加し、次々とテストを追加していけばOKです。 非常に簡単ですね。 テストしたくないテストは、ifdefで囲ってもいいんではないでしょうか。 #include "stdafx.h" #include <iostream> #include <vector> #include <string> // このdefineを必ず定義して、下でboost/test/auto_unit_test.hppをincludeすること。 #define BOOST_AUTO_TEST_MAIN #include <boost/test/auto_unit_test.hpp> BO

    BOOST_AUTO_TEST入門 - Seasons.NET
  • 1