3 (ert-deftest ob-fortran
/assert
()
6 (ert-deftest ob-fortran
/simple-program
()
7 "Test of hello world program."
8 (org-test-at-id "459384e8-1797-4f11-867e-dde0473ea7cc"
9 (org-babel-next-src-block)
10 (should (equal "Hello world" (org-babel-execute-src-block))))
13 (ert-deftest ob-fortran
/fortran-var-program
()
14 "Test a fortran variable"
15 (org-test-at-id "459384e8-1797-4f11-867e-dde0473ea7cc"
16 (org-babel-next-src-block 2)
17 (should (= 10 (org-babel-execute-src-block))))
20 (ert-deftest ob-fortran
/input-var
()
22 (org-test-at-id "d8d1dfd3-5f0c-48fe-b55d-777997e02242"
23 (org-babel-next-src-block)
24 (should (= 15 (org-babel-execute-src-block)))))
26 (ert-deftest ob-fortran
/preprosessor-var
()
27 "Test preprocessed fortran"
28 (org-test-at-id "d8d1dfd3-5f0c-48fe-b55d-777997e02242"
29 (org-babel-next-src-block 2)
30 (should (= 42 (org-babel-execute-src-block)))))
32 (ert-deftest ob-fortran
/character-var
()
34 (org-test-at-id "d8d1dfd3-5f0c-48fe-b55d-777997e02242"
35 (org-babel-next-src-block 3)
36 (should (equal "word" (org-babel-execute-src-block)))))
38 (ert-deftest ob-fortran
/list-var
()
39 "Test real array input"
40 (org-test-at-id "c28569d9-04ce-4cad-ab81-1ea29f691465"
41 (org-babel-next-src-block)
42 (should (equal "1.00 2.00 3.00" (org-babel-execute-src-block)))))
44 (ert-deftest ob-fortran
/list-var-from-table
()
45 "Test real array from a table"
46 (org-test-at-id "c28569d9-04ce-4cad-ab81-1ea29f691465"
47 (org-babel-next-src-block 2)
48 (should (equal "1.00 2.00" (org-babel-execute-src-block)))))
50 (ert-deftest ob-fortran
/no-variables-with-main
()
51 "Test :var with explicit 'program'"
52 (org-test-at-id "891ead4a-f87a-473c-9ae0-1cf348bcd04f"
53 (org-babel-next-src-block)
54 (should-error (org-babel-execute-src-block))
57 ;; (ert-deftest ob-fortran/wrong-list ()
58 ;; "Test wrong input list"
59 ;; (org-test-at-id "891ead4a-f87a-473c-9ae0-1cf348bcd04f"
60 ;; (org-babel-next-src-block 2)
61 ;; (should-error (org-babel-execute-src-block))
64 ;; (ert-deftest ob-fortran/compiler-flags ()
65 ;; "Test compiler's flags"
66 ;; (org-test-at-id "891ead4a-f87a-473c-9ae0-1cf348bcd04f"
67 ;; (org-babel-next-src-block 3)
68 ;; (should-error (org-babel-execute-src-block))
71 (ert-deftest ob-fortran
/command-arguments
()
72 "Test real array from a table"
73 (org-test-at-id "2d5330ea-9934-4737-9ed6-e1d3dae2dfa4"
74 (org-babel-next-src-block)
75 (should (= 23 (org-babel-execute-src-block)))))
77 (provide 'test-ob-fortran
)
79 ;;; test-ob-fortran.el ends here