|
Bugzilla – Full Text Bug Listing |
| Summary: | basic-data-calculators-test-suite.cc should use NS_TEST_ASSERT_MSG_EQ_TOL | ||
|---|---|---|---|
| Product: | ns-3 | Reporter: | Nicola Baldo <nicola> |
| Component: | stats | Assignee: | Mitch Watrous <watrous> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | ns-bugs, tjkopena, tommaso.pecorella |
| Priority: | P5 | ||
| Version: | ns-3-dev | ||
| Hardware: | All | ||
| OS: | All | ||
| Attachments: | proposed patch | ||
|
Description
Nicola Baldo
2011-06-23 10:01:49 UTC
Created attachment 1171 [details]
proposed patch
The proposed patch changes all macros to NS_TEST_ASSERT_MSG_EQ_TOL. A tolerance of 1e-14 is used, the rationale being that 1) double machine precision is around 1e-16, 2) we should account for additional floating point arithmetic errors of the operations being performed, and 3) it is a more than reasonable accuracy for practical applications.
After applying the patch we get this:
nicola@pcnbaldo:~/locale/ns-3-dev$ ./test.py -s basic-data-calculators -t results.txt
[SNIP]
PASS: TestSuite basic-data-calculators
1 of 1 tests passed (1 passed, 0 skipped, 0 failed, 0 crashed, 0 valgrind errors)
I do agree. +1 I applied the patch. Thanks. Bug closed. ns-3-dev changeset: 998d309a9b3d |