Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29261 Discussions

About UnitTest in a new Fortran release

oleglebedev
New Contributor I
464 Views
Good day, dear vendors,
I always want to have a safe good portable code. And so, I have brought my notice to aunit test. I saw the fUnit, for example. But it is not so good. It requires the Ruby.A probability that I will have in another machine the Ruby is too small. But theprobability that I`ll have Fortran in another one is high. Are you going toinclude assertions with an error interface to the Fortran syntax in the nearfuture or release some librariry?
Oleg.
0 Kudos
2 Replies
Steven_L_Intel1
Employee
464 Views
Oleg,

I'm sorry to say that I don't fully understand your question. However, our philosophy is that we do not add new syntax to the Fortran language that is not part of the Fortran standard. (Many years ago, we did, when the standard was lacking, but not now.)

It is not difficult to define your own assertion functions.
0 Kudos
oleglebedev
New Contributor I
464 Views
Steve, I did.
But I mean something like in the Java.
[fortran]!DEC$ unitTest myUnitTest
logical function testMyMethod() RESULT(res)
!...
this = myMethod()
res = assertion_eq( this, that )
end function testMyMethod[/fortran]
The directive !DEC$ unitTest defines (declares) the testMyMethod with an assertion of this and that variables.
And this function is placed in a module where I code the myMethod function (and this one may be private, you can call a private method in a module).
Oleg.
0 Kudos
Reply