1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

TDD / naming > TEST_GROUP_RUNNER() > 複数のテストを行う関数

Last updated at Posted at 2015-10-31

テスト駆動開発による組込みプログラミング
という本に TEST_GROUP_RUNNER() という関数があった。

複数のテストを実行する関数だった。

GROUPをつけることで、「色々なxxxをします」というのが分かるようになるだろうか。

コーディングしている中で、関数が以下のどちらであるかというのが分かったらソースリーディングがしやすくなるだろうか、と思う時がある。

  • 低レベルの処理
  • 高レベルの処理 : 低レベルの処理の組合せ

高レベルの処理だけ見ることにより、プログラムのだいたいの動きを追いやすくなる。

プログラム構造のドキュメントを残すということも手ではあるが、関数名から分かるとやりやすいと思う時がある。


低レベルと高レベルの処理に関連して http://qiita.com/7of9/items/49f9782d34b9fe278112 > 作業役クラスと管理役クラス / ...

クラスという考えだが、関数にあてはめてもいいかもしれない。 namingをどうするかは未定。

1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?