Skip to content

Commit fbbb357

Browse files
Critsium-xyclaude
andcommitted
Keep parameter.h inside the macro region in para_json_test.cpp
CI caught what the local build could not: source_io/module_json is only added with ENABLE_RAPIDJSON, so MODULE_IO_JSON_OUTPUT_TEST was never compiled here. para_json_test.cpp drives a local `Parameter param;` and writes `param.sys` / `param.input`. The scoping pass hoisted parameter.h out of the macro region because its 'does this file write PARAM' test only matched the uppercase `PARAM.input.` singleton, not a lowercase local object -- the same miss already fixed for lj_pot_test.cpp. Restored inside the region. Reproduced and verified on a minimal translation unit: the hoisted arrangement gives exactly the two 'is private within this context' errors CI reported, and the restored one compiles clean. Also drops the relax_criteria.h include from the three headers that do not name the type (ions_move_bfgs2.h, ions_move_lbfgs.h, lattice_change_basic.h). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent 517406a commit fbbb357

4 files changed

Lines changed: 1 addition & 4 deletions

File tree

source/source_io/module_json/test/para_json_test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#include "gtest/gtest.h"
22

3-
#include "source_io/module_parameter/parameter.h"
43
#define private public
4+
#include "source_io/module_parameter/parameter.h"
55
#include "source_io/module_json/abacusjson.h"
66
#include "source_io/module_json/general_info.h"
77
#include "source_io/module_json/init_info.h"

source/source_relax/ions_move_bfgs2.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#ifndef IONS_MOVE_BFGS2_H
22
#define IONS_MOVE_BFGS2_H
33

4-
#include "relax_criteria.h"
54
#include <vector>
65
#include <tuple>
76
#include <algorithm>

source/source_relax/ions_move_lbfgs.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#ifndef IONS_MOVE_LBFGS_H
22
#define IONS_MOVE_LBFGS_H
33

4-
#include "relax_criteria.h"
54
#include <vector>
65
#include <tuple>
76
#include <algorithm>

source/source_relax/lattice_change_basic.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#ifndef LATTICE_CHANGE_BASIC_H
22
#define LATTICE_CHANGE_BASIC_H
33

4-
#include "relax_criteria.h"
54
#include <fstream>
65
#include <vector>
76
#include "relax_data.h"

0 commit comments

Comments
 (0)