File tree Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -127,3 +127,8 @@ AddTest(
127127 TARGET base_opt_TN
128128 SOURCES opt_TN_test.cpp opt_test_tools.cpp ../opt_CG.cpp ../opt_DCsrch.cpp ../global_variable.cpp ../../src_parallel/parallel_reduce.cpp
129129)
130+
131+ AddTest(
132+ TARGET base_ylm
133+ SOURCES ylm_test.cpp ../ylm.cpp ../timer.cpp ../tool_quit.cpp ../global_variable.cpp ../global_file.cpp ../memory.cpp
134+ )
Original file line number Diff line number Diff line change 1+ #include " ../ylm.h"
2+ #include " gtest/gtest.h"
3+ /* ***********************************************
4+ * unit test of class ylm
5+ ***********************************************/
6+
7+ /* *
8+ * - Tested Functions:
9+ * - ZEROS
10+ * - set all elements of a double float array to zero
11+ * */
12+
13+ class ylmTest : public testing ::Test
14+ {
15+ };
16+
17+ TEST_F (ylmTest,Zeros)
18+ {
19+ double aaaa[100 ];
20+ ModuleBase::Ylm::ZEROS (aaaa,100 );
21+ for (int i = 0 ; i < 100 ; i++)
22+ {
23+ EXPECT_EQ (aaaa[i],0.0 );
24+ }
25+ }
You can’t perform that action at this time.
0 commit comments