Skip to content

Commit

Permalink
cleaning collect in attributes testing
Browse files Browse the repository at this point in the history
  • Loading branch information
xtofalex committed Oct 20, 2024
1 parent 5dc5d39 commit 1d4d2a1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
3 changes: 2 additions & 1 deletion test/VerilogConstructorTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ void VerilogConstructorTest::startModule(const naja::verilog::Identifier& identi
if (inFirstPass()) {
currentModule_ = new Module(identifier);
addModule(currentModule_);
currentModuleAttributes_.clear();
std::cerr << "Construct Module: " << identifier.getString() << std::endl;
} else {
if (auto it = modulesMap_.find(identifier.name_); it != modulesMap_.end()) {
Expand Down Expand Up @@ -136,5 +137,5 @@ void VerilogConstructorTest::addDefParameterAssignment(
void VerilogConstructorTest::addAttribute(
const naja::verilog::Identifier& attributeName,
const naja::verilog::ConstantExpression& expression) {
attributes_.push_back(naja::verilog::Attribute(attributeName, expression));
currentModuleAttributes_.push_back(naja::verilog::Attribute(attributeName, expression));
}
12 changes: 6 additions & 6 deletions test/VerilogConstructorTest.h
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,12 @@ class VerilogConstructorTest: public naja::verilog::VerilogConstructor {
using Attributes = std::list<naja::verilog::Attribute>;
void addModule(Module* module);

bool firstPass_ {true};
Modules modules_ {};
ModulesMap modulesMap_ {};
Module* currentModule_ {nullptr};
Attributes attributes_ {};
std::string currentModelName_ {};
bool firstPass_ {true};
Modules modules_ {};
ModulesMap modulesMap_ {};
Module* currentModule_ {nullptr};
Attributes currentModuleAttributes_ {};
std::string currentModelName_ {};
};

#endif /* __VERILOG_CONSTRUCTOR_TEST_H_ */

0 comments on commit 1d4d2a1

Please sign in to comment.