ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
test_write_dmr.cpp File Reference

Unit tests for write_dmr.cpp: dmr_gen_fname and write_dmr_csr. More...

#include "source_hamilt/module_hcontainer/unittests/tmp_mocks.h"
#include "gmock/gmock.h"
#include "gtest/gtest.h"
#include "source_io/module_dm/write_dmr.h"
#include "source_cell/unitcell.h"
#include "source_hamilt/module_hcontainer/atom_pair.h"
#include "source_hamilt/module_hcontainer/hcontainer.h"
#include <cstdio>
#include <fstream>
#include <sstream>
#include <string>
Include dependency graph for test_write_dmr.cpp:

Functions

 TEST (WriteDmr, GenFnameKeepsCurrentContract)
 TEST (WriteDmr, CsrHeaderKeepsCurrentFormat)
 TEST (WriteDmr, ModeOneFixedNameTruncatesOnRerun)

Detailed Description

Unit tests for write_dmr.cpp: dmr_gen_fname and write_dmr_csr.

dmr_gen_fname builds the spin-dependent DM(R) filename; write_dmr_csr writes the DM(R) matrix in the legacy CSR text layout. Both tests pin the current contract so format changes are caught by a failing test. Neither function reads PARAM (the high-level write_dmr driver does, but it is not exercised here), so no PARAM fixture is required.

Function Documentation

◆ TEST() [1/3]

TEST ( WriteDmr ,
CsrHeaderKeepsCurrentFormat  )
Here is the call graph for this function:

◆ TEST() [2/3]

TEST ( WriteDmr ,
GenFnameKeepsCurrentContract  )
Here is the call graph for this function:

◆ TEST() [3/3]

TEST ( WriteDmr ,
ModeOneFixedNameTruncatesOnRerun  )
Here is the call graph for this function: