我犯了更新软件的错误,现在我无法运行任何 OUnit 测试。
我想我已经设法将问题归结为一个简单的 REPL 会话。
$ ocaml -I /opt/local/lib/ocaml/site-lib/oUnit OCaml version 4.01.0 # Ounit.assert_equal;; Error: Wrong file naming: /opt/local/lib/ocaml/site-lib/oUnit/ounit.cmi contains the compiled interface for Ounit when OUnit was expected # OUnit.assert_equal;; Error: Reference to undefined global `OUnit'
任何想法我做错了什么?
我在 Mac 笔记本电脑上运行它,它具有默认的不区分大小写/保留大小写的文件系统,但是使用包含路径的大小写并没有帮助。
我更大的问题是这样表现的:
ocamlbuild \ -libs \ nums,str,unix,oUnit,graph \ -cflags \ -g,-w,+a-4,-warn-error,+a-4,-I,/opt/local/lib/ocaml/site-lib/oUnit,-I,/opt/local/lib/ocaml/site-lib/ocamlgraph \ -lflags \ -g,-I,/opt/local/lib/ocaml/site-lib/oUnit,-I,/opt/local/lib/ocaml/site-lib/ocamlgraph \ ./AllTests.native Error: No implementations provided for the following modules: OUnitCore referenced from /opt/local/lib/ocaml/site-lib/oUnit/oUnit.cmxa(OUnit2), /opt/local/lib/ocaml/site-lib/oUnit/oUnit.cmxa(OUnit) OUnitLoggerStd referenced from /opt/local/lib/ocaml/site-lib/oUnit/oUnit.cmxa(OUnit) OUnitUtils referenced from /opt/local/lib/ocaml/site-lib/oUnit/oUnit.cmxa(OUnit2), /opt/local/lib/ocaml/site-lib/oUnit/oUnit.cmxa(OUnit) OUnitConf referenced from /opt/local/lib/ocaml/site-lib/oUnit/oUnit.cmxa(OUnit2), /opt/local/lib/ocaml/site-lib/oUnit/oUnit.cmxa(OUnit) OUnitAssert referenced from /opt/local/lib/ocaml/site-lib/oUnit/oUnit.cmxa(OUnit2), /opt/local/lib/ocaml/site-lib/oUnit/oUnit.cmxa(OUnit) OUnitBracket referenced from /opt/local/lib/ocaml/site-lib/oUnit/oUnit.cmxa(OUnit2), /opt/local/lib/ocaml/site-lib/oUnit/oUnit.cmxa(OUnit) OUnitTest referenced from /opt/local/lib/ocaml/site-lib/oUnit/oUnit.cmxa(OUnit2), /opt/local/lib/ocaml/site-lib/oUnit/oUnit.cmxa(OUnit) OUnitRunner referenced from /opt/local/lib/ocaml/site-lib/oUnit/oUnit.cmxa(OUnit) OUnitChooser referenced from /opt/local/lib/ocaml/site-lib/oUnit/oUnit.cmxa(OUnit) OUnitLogger referenced from /opt/local/lib/ocaml/site-lib/oUnit/oUnit.cmxa(OUnit2), /opt/local/lib/ocaml/site-lib/oUnit/oUnit.cmxa(OUnit) OUnitTestData referenced from /opt/local/lib/ocaml/site-lib/oUnit/oUnit.cmxa(OUnit2) Command exited with code 2. Compilation unsuccessful after building 646 targets (645 cached) in 00:00:02.