ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
Classes | Macros | Functions
global_function_test.cpp File Reference
#include "../global_function.h"
#include "../global_variable.h"
#include "source_io/module_parameter/parameter.h"
#include "../vector3.h"
#include "../tool_quit.h"
#include <string>
#include <cstring>
#include <fstream>
#include <streambuf>
#include "gmock/gmock.h"
#include "gtest/gtest.h"
#include <ctime>
Include dependency graph for global_function_test.cpp:

Classes

class  GlobalFunctionTest
 

Macros

#define private   public
 

Functions

void EXPECT_COMPLEX_FLOAT_EQ (const std::complex< float > &a, const std::complex< float > &b)
 
void EXPECT_COMPLEX_DOUBLE_EQ (const std::complex< double > &a, const std::complex< double > &b)
 
template<typename T >
void CHECK_ZEROS (T &size)
 
 TEST_F (GlobalFunctionTest, NewPart)
 
 TEST_F (GlobalFunctionTest, OutScreen)
 
 TEST_F (GlobalFunctionTest, OutV1)
 
 TEST_F (GlobalFunctionTest, OutV2)
 
 TEST_F (GlobalFunctionTest, OutV3)
 
 TEST_F (GlobalFunctionTest, OutP)
 
 TEST_F (GlobalFunctionTest, ToString)
 
 TEST_F (GlobalFunctionTest, MakeDir)
 
 TEST_F (GlobalFunctionTest, OutTime)
 
 TEST_F (GlobalFunctionTest, AutoSet)
 
 TEST_F (GlobalFunctionTest, Done)
 
 TEST_F (GlobalFunctionTest, Zeros)
 
 TEST_F (GlobalFunctionTest, Scan)
 
 TEST_F (GlobalFunctionTest, MapExist)
 
 TEST_F (GlobalFunctionTest, ReadValue)
 
 TEST_F (GlobalFunctionTest, Dcopy)
 
 TEST_F (GlobalFunctionTest, VectorToPointer)
 
 TEST_F (GlobalFunctionTest, COPYARRAY)
 
 TEST_F (GlobalFunctionTest, IsColumnMajor)
 
 TEST_F (GlobalFunctionTest, Vector2Ptr)
 
 TEST_F (GlobalFunctionTest, MemAvailable)
 
 TEST_F (GlobalFunctionTest, BlockHere)
 
 TEST_F (GlobalFunctionTest, BlockHere2)
 
 TEST_F (GlobalFunctionTest, BlockHere3)
 
 TEST_F (GlobalFunctionTest, Vector2Ptr_v3double)
 

Macro Definition Documentation

◆ private

#define private   public

Function Documentation

◆ CHECK_ZEROS()

template<typename T >
void CHECK_ZEROS ( T size)
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ EXPECT_COMPLEX_DOUBLE_EQ()

void EXPECT_COMPLEX_DOUBLE_EQ ( const std::complex< double > &  a,
const std::complex< double > &  b 
)
inline
Here is the caller graph for this function:

◆ EXPECT_COMPLEX_FLOAT_EQ()

void EXPECT_COMPLEX_FLOAT_EQ ( const std::complex< float > &  a,
const std::complex< float > &  b 
)
inline
  • Tested Function
  • NewPart
    • note the start of new calculation part
  • OutV1
    • output a string name with format
  • OutV2
    • output a string name and its value with format
  • OutV3
    • output a string name and three value with format
  • OutP
    • output a string paramter, its value and explanation with format
  • TO_STRING
    • change an arbitrary type of data to string
  • MakeDir
    • make a directory
  • OutTime
    • print out calculation time > 0.1 minites
  • AutoSet
    • note the setting of values in code
  • Done
    • output info. and time on screen and log
  • Zero
    • zero out complex array
  • Scan
    • SCAN_BEGIN and SCAN_END used to read xml files
  • MapExist
    • search the existence of an index in a map
  • ReadValue
    • read a value and delete "\n"
  • Dcopy
    • copy vector
  • VectorToPointer
    • get the first pointer of (const) vector or valarray
  • Note
    • print out warning info in running.log file
  • COPYARRAY
    • copy complex or double arrays
  • IS_COLUMN_MAJOR_KS_SOLVER(PARAM.input.ks_solver)
    • judge whether the KS_SOLVER is column major
  • VECTOR_TO_PTR
    • get a copy of the ptr of a vector
  • VECTOR_TO_PTR_v3double
    • get a copy of the ptr of a vector whose elements' type belongs to Vector3<double>
  • MemAvailable
    • get the current memory valus
  • TETS_LEVEL
    • set the test level
  • BLOCK_HERE
    • add the block
Here is the caller graph for this function:

◆ TEST_F() [1/25]

TEST_F ( GlobalFunctionTest  ,
AutoSet   
)
Here is the call graph for this function:

◆ TEST_F() [2/25]

TEST_F ( GlobalFunctionTest  ,
BlockHere   
)
Here is the call graph for this function:

◆ TEST_F() [3/25]

TEST_F ( GlobalFunctionTest  ,
BlockHere2   
)
Here is the call graph for this function:

◆ TEST_F() [4/25]

TEST_F ( GlobalFunctionTest  ,
BlockHere3   
)
Here is the call graph for this function:

◆ TEST_F() [5/25]

TEST_F ( GlobalFunctionTest  ,
COPYARRAY   
)
Here is the call graph for this function:

◆ TEST_F() [6/25]

TEST_F ( GlobalFunctionTest  ,
Dcopy   
)
Here is the call graph for this function:

◆ TEST_F() [7/25]

TEST_F ( GlobalFunctionTest  ,
Done   
)
Here is the call graph for this function:

◆ TEST_F() [8/25]

TEST_F ( GlobalFunctionTest  ,
IsColumnMajor   
)

◆ TEST_F() [9/25]

TEST_F ( GlobalFunctionTest  ,
MakeDir   
)
Here is the call graph for this function:

◆ TEST_F() [10/25]

TEST_F ( GlobalFunctionTest  ,
MapExist   
)
Here is the call graph for this function:

◆ TEST_F() [11/25]

TEST_F ( GlobalFunctionTest  ,
MemAvailable   
)
Here is the call graph for this function:

◆ TEST_F() [12/25]

TEST_F ( GlobalFunctionTest  ,
NewPart   
)
Here is the call graph for this function:

◆ TEST_F() [13/25]

TEST_F ( GlobalFunctionTest  ,
OutP   
)
Here is the call graph for this function:

◆ TEST_F() [14/25]

TEST_F ( GlobalFunctionTest  ,
OutScreen   
)
Here is the call graph for this function:

◆ TEST_F() [15/25]

TEST_F ( GlobalFunctionTest  ,
OutTime   
)
Here is the call graph for this function:

◆ TEST_F() [16/25]

TEST_F ( GlobalFunctionTest  ,
OutV1   
)
Here is the call graph for this function:

◆ TEST_F() [17/25]

TEST_F ( GlobalFunctionTest  ,
OutV2   
)
Here is the call graph for this function:

◆ TEST_F() [18/25]

TEST_F ( GlobalFunctionTest  ,
OutV3   
)
Here is the call graph for this function:

◆ TEST_F() [19/25]

TEST_F ( GlobalFunctionTest  ,
ReadValue   
)

◆ TEST_F() [20/25]

TEST_F ( GlobalFunctionTest  ,
Scan   
)
Here is the call graph for this function:

◆ TEST_F() [21/25]

TEST_F ( GlobalFunctionTest  ,
ToString   
)
Here is the call graph for this function:

◆ TEST_F() [22/25]

TEST_F ( GlobalFunctionTest  ,
Vector2Ptr   
)
Here is the call graph for this function:

◆ TEST_F() [23/25]

TEST_F ( GlobalFunctionTest  ,
Vector2Ptr_v3double   
)

◆ TEST_F() [24/25]

TEST_F ( GlobalFunctionTest  ,
VectorToPointer   
)

◆ TEST_F() [25/25]

TEST_F ( GlobalFunctionTest  ,
Zeros   
)
Here is the call graph for this function: