-
Notifications
You must be signed in to change notification settings - Fork 33
Closed
Description
hello,I meet a problem:source(test-all.R) failed on centos8_x86_64
Steps to reproduce the issue
[root@localhost tests]#Rscript test-all.R
Loading required package: nloptr
[1] 1.000000 4.743006 3.821141 1.379409
[1] 1.000000 4.743000 3.821150 1.379408
== Failed tests =============================================================================================================================================================================================
-- Failure (test-hs071.R:98:5): Test HS071. ------------------------------------
res$solution not equal to `solution.opt`.
3/4 mismatches (average diff: 5.54e-06)
[2] 4.74 - 4.74 == 6.69e-06
[3] 3.82 - 3.82 == -8.73e-06
[4] 1.38 - 1.38 == 1.21e-06
[ FAIL 1 | WARN 0 | SKIP 0 | PASS 46 ]
Error: Test failures
Execution halted
[root@localhost tests]#R
> source("test-all.R")
Loading required package: nloptr
[1] 1.000000 4.743006 3.821141 1.379409
[1] 1.000000 4.743000 3.821150 1.379408
Called from: eval(code, test_env)
Browse[1]> debug(expect_equal)
Browse[1]> expect_equal(res$solution, solution.opt, tolerance = 1e-6)
debugging in: expect_equal(res$solution, solution.opt, tolerance = 1e-06)
debug: {
act <- quasi_label(enquo(object), label, arg = "object")
exp <- quasi_label(enquo(expected), expected.label, arg = "expected")
if (edition_get() >= 3) {
expect_waldo_equal("equal", act, exp, info, ..., tolerance = tolerance)
}
else {
if (!is.null(tolerance)) {
comp <- compare(act$val, exp$val, ..., tolerance = tolerance)
}
else {
comp <- compare(act$val, exp$val, ...)
}
expect(comp$equal, sprintf("%s not equal to %s.\n%s",
act$lab, exp$lab, comp$message), info = info)
invisible(act$val)
}
}
Browse[4]> c
Error: res$solution not equal to `solution.opt`.
3/4 mismatches (average diff: 5.54e-06)
[2] 4.74 - 4.74 == 6.69e-06
[3] 3.82 - 3.82 == -8.73e-06
[4] 1.38 - 1.38 == 1.21e-06Can you tell me why this problem happened?
Metadata
Metadata
Assignees
Labels
No labels