exercism / fortran

Exercism exercises in Fortran.
https://exercism.org/tracks/fortran
MIT License
23 stars 30 forks source link

Use latest version of test module in editor #228

Closed simisc closed 1 year ago

simisc commented 1 year ago

This was previously a comment on #227, but I'm moving it to a new issue because I think it's specific to how the test module is made available when testing in the editor.

Changes made to the test module in #226 and #227 are not applied when testing in the editor. When testing an incorrect solution to Sieve, there's still the An error occurred while running your tests. This might mean... message — this is the issue that #227 was intended to solve. For Saddle Points (with correct and incorrect solutions), the message is:

We received the following error when we ran your code:

/tmp/saddle-points/saddle_points_test.f:::

   |     character(MAX_RESULT_STRING_LEN) :: s
      |              
Error: GNU Extension: Symbol max_result_string_len is used before it is typed at ()
/tmp/saddle-points/saddle_points_test.f:::

   |   function pa_to_s(p) result(s)
      |                               
Error: Function result s at () has no IMPLICIT type

This suggests that the editor is using the updated version of saddle_points_test.f90, but not the latest TesterMain.f90. I can reproduce the same error when working locally by using the old TesterMain.f90 with the new saddle_points_test.f90.

When testing an incorrect solution to High Scores in the editor, failed tests are double-counted, so the same issue applies to #226 (i.e., the solution is being tested by the pre-#226 version of the test module).

Originally posted by @simisc in https://github.com/exercism/fortran/issues/227#issuecomment-1659794587