Describe the bug
Command file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/input.txt DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/input.txt) in tests/operators/CMakeLists.txt actually copies input.txt under build/tests/operators/input.txt/input.txt
This means when tests try to open input.txt, they are opening a directory instead of actual *.txt file. Surprisingly std::ifstream::is_open() return true in such cases, causing the tests to be reported as pass with ever being run.
The command should be file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/input.txt DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/)
To Reproduce
Steps to reproduce the behavior:
Configure the project with cmake.
See the directory structure under build/tests/
Expected behavior
The additional input.txt directory should not be created.
Describe the bug Command
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/input.txt DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/input.txt)
in tests/operators/CMakeLists.txt actually copies input.txt under build/tests/operators/input.txt/input.txtThis means when tests try to open input.txt, they are opening a directory instead of actual *.txt file. Surprisingly std::ifstream::is_open() return true in such cases, causing the tests to be reported as pass with ever being run.
The command should be
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/input.txt DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/)
To Reproduce Steps to reproduce the behavior:
Expected behavior The additional input.txt directory should not be created.
Screenshots
Desktop: