Skip to content

Commit b9f3b06

Browse files
rootroot
authored andcommitted
test:modify mathzone_add1_test.cpp
1 parent 96a721b commit b9f3b06

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

source/module_base/test/mathzone_add1_test.cpp

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,21 @@ class MathzoneAdd1Test : public testing::Test
3333
const int MaxInt = 100;
3434
int nr_in = 17;
3535
int nr_out = 161;
36-
double *r_in = new double[nr_in];
37-
double *r_out = new double[nr_out];
38-
double *y2 = new double[nr_in];
39-
double *psi_in = new double[nr_in];
40-
double *psi_out = new double[nr_out];
41-
double *dpsi = new double[nr_out];
36+
double *r_in;
37+
double *r_out;
38+
double *y2;
39+
double *psi_in;
40+
double *psi_out;
41+
double *dpsi;
42+
void SetUp()
43+
{
44+
r_in = new double[nr_in];
45+
r_out = new double[nr_out];
46+
y2 = new double[nr_in];
47+
psi_in = new double[nr_in];
48+
psi_out = new double[nr_out];
49+
dpsi = new double[nr_out];
50+
}
4251
void TearDown()
4352
{
4453
delete[] r_in;

0 commit comments

Comments
 (0)