サンプルコード
1 2 3 4 5 6 7 8 9 10 11 12 13 |
void TestFunction( int x, int y) { IUTEST_ASSERT_EQ(x, y); } IUTEST_PMZ(ParamMethodTest, EQ, TestFunction, 0, 0); IUTEST_PMZ(ParamMethodTest, EQ, TestFunction, 1, 2); IUTEST_PMZ(ParamMethodTest, EQ, TestFunction, 2, 2); typedef TestFixed ParamMethodTestFixed; IUTEST_PMZ_F(ParamMethodTestFixed, EQ, TestFunction, 0, 0); IUTEST_PMZ_F(ParamMethodTestFixed, EQ, TestFunction, 1, 2); IUTEST_PMZ_F(ParamMethodTestFixed, EQ, TestFunction, 2, 2); |
実行結果

"GetParam() = " と出力されますが、既存の仕組みを再利用しているのでそうなってます。
あと、良い名前が思い浮かばなかったのでイイ名前を募集中です。
0 件のコメント:
コメントを投稿