Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(zk): enable SelectorReplacerTest.Selector test on optimization mode #374

Merged
merged 1 commit into from
Apr 5, 2024

Conversation

chokobole
Copy link
Contributor

Description

ReplaceSelectors() only crashes only when compiled with debug mode, so this commit enables it using EXPECT_DEBUG_DEATH.

template <typename F>
class SelectorsReplacer : public Evaluator<F, std::unique_ptr<Expression<F>>> {
  std::unique_ptr<Expression<F>> Evaluate(const Expression<F>* input) override {

          if (selector.is_simple()) {
            LOG(DFATAL) << "Simple selector found in lookup argument";
          }
  }

Copy link
Contributor

@Insun35 Insun35 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

… mode

`ReplaceSelectors()` only crashes only when compiled with debug mode,
so this commit enables it using `EXPECT_DEBUG_DEATH`.

```c++
template <typename F>
class SelectorsReplacer : public Evaluator<F, std::unique_ptr<Expression<F>>> {
  std::unique_ptr<Expression<F>> Evaluate(const Expression<F>* input) override {

          if (selector.is_simple()) {
            LOG(DFATAL) << "Simple selector found in lookup argument";
          }
  }
```

Related: #370
@chokobole chokobole force-pushed the test/enable-selector-replacer-unittest-on-opt branch from 5c53be7 to b9c42bf Compare April 5, 2024 07:00
@ashjeong
Copy link
Contributor

ashjeong commented Apr 5, 2024

This PR fixes the issue in which running bazel test --config linux //... fails the test //tachyon/zk/expressions/evaluator:expression_unittests

Copy link
Contributor

@ashjeong ashjeong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@dongchangYoo dongchangYoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@TomTaehoonKim TomTaehoonKim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dongchangYoo dongchangYoo merged commit b8e6346 into main Apr 5, 2024
3 checks passed
@dongchangYoo dongchangYoo deleted the test/enable-selector-replacer-unittest-on-opt branch April 5, 2024 08:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants