Julia文档中有一个unit test example:
using Test
@test π ≈ 3.14 atol=0.01
当我在当前版本为1.0.3的Juliabox中运行时,测试通过。
当我在使用Julia版本1.2的Windows 10计算机上运行它时,我得到:
Error During Test at In[25]:2
Test threw exception
Expression: ≈(π, 3.14, atol=0.01)
function ≈ does not accept keyword arguments
@test ≈(π, 3.14, atol=0.01)
给出相同的结果。