From 1437a1f3f25b073c6e2dbe8565ce7bf1ef6c96d2 Mon Sep 17 00:00:00 2001 From: wqzhou <33364058+WHUweiqingzhou@users.noreply.github.com> Date: Wed, 2 Aug 2023 13:39:01 +0800 Subject: [PATCH] Fix: add a initialization of lmaxmax in UnitTests `cell_unitcell_test_setupcell` (#2767) * add a initialization of lmaxmax in UnitTests #test_setupcell * Update source/module_cell/test/unitcell_test_setupcell.cpp * Update source/module_cell/test_pw/unitcell_test_pw.cpp * Update source/module_cell/test/unitcell_test_setupcell.cpp * Update source/module_cell/test_pw/unitcell_test_pw.cpp --------- Co-authored-by: Zhao Tianqi --- source/module_cell/test/unitcell_test_setupcell.cpp | 4 ++++ source/module_cell/test_pw/unitcell_test_pw.cpp | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/source/module_cell/test/unitcell_test_setupcell.cpp b/source/module_cell/test/unitcell_test_setupcell.cpp index bb33ff768b..db5eacbe1c 100644 --- a/source/module_cell/test/unitcell_test_setupcell.cpp +++ b/source/module_cell/test/unitcell_test_setupcell.cpp @@ -61,6 +61,10 @@ class UcellTest : public ::testing::Test protected: std::unique_ptr ucell{new UnitCell}; std::string output; + void SetUp() + { + ucell->lmaxmax = 2; + } }; using UcellDeathTest = UcellTest; diff --git a/source/module_cell/test_pw/unitcell_test_pw.cpp b/source/module_cell/test_pw/unitcell_test_pw.cpp index e7a546c1ab..81e4a116cb 100644 --- a/source/module_cell/test_pw/unitcell_test_pw.cpp +++ b/source/module_cell/test_pw/unitcell_test_pw.cpp @@ -37,6 +37,10 @@ class UcellTest : public ::testing::Test protected: std::unique_ptr ucell{new UnitCell}; std::string output; + void SetUp() + { + ucell->lmaxmax = 2; + } }; TEST_F(UcellTest,ReadAtomSpecies)