EUnit is a unit testing framework for Erlang. It is very powerful and flexible, is easy to use, and has small syntactical overhead. Unit testingTerminologyGetting startedEUnit macrosEUnit test representationEUnit builds on ideas from the family of unit testing frameworks for Object Oriented languages that originated with JUnit by Beck and Gamma (and Beck's previous framework SUnit for Smalltalk).
元々はNIF用に用意されているのだと思うのだが, moduleがloadされた際に実行する関数を指定することができる. これを使って, applicationの起動が必要なテストはここで起動処理を書いたりしていた. ただ, 本来の用途でないだけあって困ったことがいくつかある. テスト終了後の挙動 on_loadで起動したアプリケーションは, test終了後exit(Pid, kill)で終了される.これによる副作用がある. applicationにはloadに関するステータスとして loaded loading そして, startに関するステータスとして started running が存在するが(ちなみに, これらはapplication:info/0を呼ぶことで取得することができる), exitされるとrunningからは消えるがstartedに残るという現象が発生する. そして,
EUnitはErlang用のユニットテストフレームワークです。とてもパワフルで柔軟かつ、使用するのが簡単であり、構文上のオーバーヘッド(書かなければいけないもの)が少ないのが特徴です。 EUnitは、ケント・ベックと、エリック・ガンマが作成したJUnit(と、ケント・ベックがそれ以前に作成した、Smalltalk用のSUnit)を起源とする、オブジェクト指向言語用のユニットテストフレームワーク群から来たアイディアを元に開発されています。しかし、EUnitは、より関数型プログラミングと、並列プログラミングに適応するような技術が使用されています。また、関連するフレームワーク群よりも、言葉数が少なくて済むことが多いです。 EUnitは多くのプリプロセッサマクロを使用しますが、利用者にできるだけ負担をかけないように設計されています。また、既存のコードと衝突を起こさないように設計されています。モジュ
The document describes a Makefile and EUnit tests for Erlang modules dealing with Fibonacci calculations and an adder server. It outlines the structure of tests, their success or failure, and correct implementations in different modules, alongside example outputs from the tests. Overall, it provides a comprehensive overview of the testing results for the specified modules.
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く