Method: CodeRunner::Run::FortranNamelist.add_namelist_should_pass
- Defined in:
- lib/coderunner/fortran_namelist.rb
.add_namelist_should_pass(namelist, tst) ⇒ Object
Add a test which the namelist should pass before being included in the input file. The parameter tst must be of the form: { test: test_string explanation: explanation_string } where test_string is a string such that run.instance_eval(test_string) should be true when the run to be submitted passes the test. The explanation should be a string which explains what the test does. If the run to be submitted fails the test, a warning is given.
493 494 495 496 497 498 |
# File 'lib/coderunner/fortran_namelist.rb', line 493 def self.add_namelist_should_pass(namelist, tst) rcp.namelists[namelist][:should_pass] ||= [] rcp.namelists[namelist][:should_pass].push tst rcp.namelists[namelist][:should_pass].uniq! save_namelists end |