TRIQS / nda

C++ library for multi-dimensional arrays
https://triqs.github.io/nda
Other
15 stars 12 forks source link

Bug report: Failing hda #40

Closed HugoStrand closed 1 year ago

HugoStrand commented 1 year ago

Description

I have a failing nda_norm test in the cppdlr project.

Steps to Reproduce

  1. Run the test suite in cppdlr

or paste a minimal code example to reproduce the issue.

Actual behavior:

% ctest -V -R nda_norm
Test project /.../dev/cppdlr/cbuild
Constructing a list of tests
Done constructing a list of tests
Updating test list for fixtures
Added 0 tests to meet fixture requirements
Checking test dependency graph...
Checking test dependency graph end
test 76
    Start 76: nda_norm

76: Test command: /.../dev/cppdlr/cbuild/deps/nda/test/c++/nda_norm
76: Test timeout computed to be: 10000000
76: Running main() from /.../dev/cppdlr/cbuild/deps/GTest_src/googletest/src/gtest_main.cc
76: [==========] Running 4 tests from 1 test suite.
76: [----------] Global test environment set-up.
76: [----------] 4 tests from Norm
76: [ RUN      ] Norm.Zeros
76: [       OK ] Norm.Zeros (0 ms)
76: [ RUN      ] Norm.Ones
76: [       OK ] Norm.Ones (0 ms)
76: [ RUN      ] Norm.Rand
76: [       OK ] Norm.Rand (0 ms)
76: [ RUN      ] Norm.Example
76: /.../dev/cppdlr/cbuild/deps/nda_src/test/c++/nda_norm.cpp:81: Failure
76: Expected equality of these values:
76:   norm(v, 2.0)
76:     Which is: 2.7386127875258302
76:   sqrt(7.5)
76:     Which is: 2.7386127875258306
76: [  FAILED  ] Norm.Example (0 ms)
76: [----------] 4 tests from Norm (0 ms total)
76: 
76: [----------] Global test environment tear-down
76: [==========] 4 tests from 1 test suite ran. (0 ms total)
76: [  PASSED  ] 3 tests.
76: [  FAILED  ] 1 test, listed below:
76: [  FAILED  ] Norm.Example
76: 
76:  1 FAILED TEST
1/1 Test #76: nda_norm .........................***Failed    0.04 sec

0% tests passed, 1 tests failed out of 1

Total Test time (real) =   0.04 sec

The following tests FAILED:
     76 - nda_norm (Failed)
Errors while running CTest
Output from these tests are in: /.../dev/cppdlr/cbuild/Testing/Temporary/LastTest.log
Use "--rerun-failed --output-on-failure" to re-run the failed cases verbosely.

Versions

cppdlr on commit 4c0a99d.

Wentzell commented 1 year ago

Thank you @HugoStrand for pointing this out. This should be fixed with 3a6ecc9, please confirm.

HugoStrand commented 1 year ago

Dear Nils, thank you for the fix. I can confirm that the nda_norm test now is passing in cppdlr/dev_triqs.