Skip to content

Commit

Permalink
resumed .h
Browse files Browse the repository at this point in the history
  • Loading branch information
xtcyclist committed Jan 10, 2023
1 parent 897933f commit 1c40e8b
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions src/common/expression/test/ExpressionContextMock.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,7 @@ class ExpressionContextMock final : public ExpressionContext {
}

void setInnerVar(const std::string& var, Value val) override {
if (var == "xxx") {
if (vals_.empty()) {
vals_.emplace_back(val);
indices_[var] = vals_.size() - 1;
} else {
vals_[indices_[var]] = val;
}
} else {
exprValueMap_[var] = std::move(val);
}
exprValueMap_[var] = std::move(val);
}

const Value& getInnerVar(const std::string& var) const override {
Expand Down Expand Up @@ -152,7 +143,7 @@ class ExpressionContextMock final : public ExpressionContext {

void setVar(const std::string& var, Value val) override {
// used by tests of list comprehesion, predicate or reduce
if (var == "n" || var == "p" || var == "totalNum" || var == "v") {
if (var == "n" || var == "p" || var == "totalNum") {
vals_.emplace_back(val);
indices_[var] = vals_.size() - 1;
}
Expand Down

0 comments on commit 1c40e8b

Please sign in to comment.