Skip to content

Commit 49987f8

Browse files
committed
fix psi-ut bug
1 parent c55e20d commit 49987f8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

source/module_psi/test/psi_test.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,9 @@ TEST_F(TestPsi, get_pointer_op_zero_complex_double)
9999
// cover all lines in fix_k func
100100
psi_object31->fix_k(2);
101101
EXPECT_EQ(psi_object31->get_psi_bias(), 0);
102-
psi::Psi<std::complex<double>>* psi_temp = new psi::Psi<std::complex<double>>(ink, inbands, inbasis, inbasis, true);
102+
103+
std::vector<int> temp(ink, inbasis);
104+
psi::Psi<std::complex<double>>* psi_temp = new psi::Psi<std::complex<double>>(ink, inbands, inbasis, temp.data(), true);
103105
psi_temp->fix_k(0);
104106
EXPECT_EQ(psi_object31->get_current_nbas(), inbasis);
105107
delete psi_temp;

0 commit comments

Comments
 (0)