Skip to content

Commit

Permalink
Test: add return value for mock in tests to suppress compile warning (#…
Browse files Browse the repository at this point in the history
…4775)

* Test: add missing return value for mock in some tests to suppress compile warnings

* use proper data type for return values
  • Loading branch information
Cstandardlib authored Jul 24, 2024
1 parent a131482 commit 815017e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions source/module_base/module_mixing/test/mixing_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#define DOUBLETHRESHOLD 1e-8
double ext_inner_product_mock(double* x1, double* x2)
{
return 0.0;
}
class Mixing_Test : public testing::Test
{
Expand Down
2 changes: 2 additions & 0 deletions source/module_elecstate/test/elecstate_pw_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,12 @@ void pseudopot_cell_vnl::radial_fft_q<double, base_device::DEVICE_CPU>(base_devi
template <>
std::complex<float>* pseudopot_cell_vnl::get_vkb_data<float>() const
{
return nullptr;
}
template <>
std::complex<double>* pseudopot_cell_vnl::get_vkb_data<double>() const
{
return nullptr;
}
template <>
void pseudopot_cell_vnl::getvnl<float, base_device::DEVICE_CPU>(base_device::DEVICE_CPU*,
Expand Down
1 change: 1 addition & 0 deletions source/module_io/test_serial/read_input_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ namespace GlobalFunc
{
bool SCAN_BEGIN(std::ifstream& ifs, const std::string& TargetName, const bool restart, const bool ifwarn)
{
return false;
}
} // namespace GlobalFunc
namespace Global_File
Expand Down

0 comments on commit 815017e

Please sign in to comment.