|
ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
|
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>Functions | |
| TEST (WriteDmr, GenFnameKeepsCurrentContract) | |
| TEST (WriteDmr, CsrHeaderKeepsCurrentFormat) | |
| TEST (WriteDmr, ModeOneFixedNameTruncatesOnRerun) | |
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.
| TEST | ( | WriteDmr | , |
| CsrHeaderKeepsCurrentFormat | ) |
| TEST | ( | WriteDmr | , |
| GenFnameKeepsCurrentContract | ) |
| TEST | ( | WriteDmr | , |
| ModeOneFixedNameTruncatesOnRerun | ) |