且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

为什么Fortran中的单元测试框架依赖于Ruby而不是Fortran本身?

更新时间:2023-02-03 22:20:17

编写一个具有真正的XUnit克隆的复杂性,能力和动态性质的单元测试框架,在Fortran中是非常可怕的,是真正为数值分析而设计的。

Summarization: FRUIT can be used only with Fortran compilers, although its functionality can be enhanced by using Ruby. Check the answer below from its author Andrew Chen.

===========================================

It seems that the available unit test frameworks (XUnit) for Fortran include:
funit
http://nasarb.rubyforge.org/

fruit
http://sourceforge.net/projects/fortranxunit/

flibs
http://flibs.sourceforge.net/

ObjexxFTK (commercial)
http://www.objexx.com/ObjexxFTK.html

In their webpages, funit, fruit, and flibs mention they rely on Ruby to function. I have no idea about ObjexxFTK. It seems to me that XUnit frameworks in Java, C#, and Delphi and so forth only rely on the corresponding language itself. Then why do the Fortran frameworks choose to rely on Ruby instead of Fortran itself?

Writing a unit testing framework with the complexity, capability and dynamic nature of a true XUnit clone would be utterly horrendous in Fortran which is really designed for numerical analysis.