Reputation: 11
I have a Fortran(f90) project which was converted to C# completely. To test, I have to write a unit which is different from a normal one, because all the methods are interlinked which is nested. A single variable passed as the ref is undergoing changes in all these nested methods. So I can't test each individual method and can't assert it as I converted the methods without knowing what is happening exactly. So now I have to debug the code line by line in both Fortran and newly converted C# to know whether the conversion happened or not. Is there any way I can write any automation such that whenever the ref variable enters in each method (both in Fortran and C#) and compare the output from these methods? Please help me
Upvotes: 1
Views: 51
Reputation: 26370
If you have a rough idea what the code is supposed to do you could call the Fortran code with "interesting" input values and record the results. Then you use this as basis for testing the C# code (should have the same results.
If you really have no idea what the code is doing (and therefore do not know what "interesting" might mean for the code) you could try the same with lots of ranomized input values.
Upvotes: 1