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

Rewrite eval unit tests to gtest (pass 1). #33353

Merged
merged 4 commits into from
Feb 19, 2025

Conversation

toregge
Copy link
Member

@toregge toregge commented Feb 18, 2025

@vekterli : please review

@toregge toregge requested a review from vekterli February 18, 2025 21:29
vekterli
vekterli previously approved these changes Feb 19, 2025
Copy link
Member

@vekterli vekterli left a comment

Choose a reason for hiding this comment

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

👍

TEST_DO(f1.eval("a+b").verify_error("type resolving failed"));
TEST(EvalExprTest, require_that_type_issues_produces_error)
{
Server f1;
Copy link
Member

Choose a reason for hiding this comment

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

This could probably be part of a parent fixture

gen_key(*Function::parse("\"b\""), PassParams::SEPARATE));
EXPECT_NOT_EQUAL(gen_key(*Function::parse("\"a\""), PassParams::ARRAY),
EXPECT_NE(gen_key(*Function::parse("\"a\""), PassParams::ARRAY),
Copy link
Member

Choose a reason for hiding this comment

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

Consider restoring indentation alignment for added prettiness

EXPECT_EQUAL("[bogus(]...[unknown function: 'bogus']...[x)+y]", Function::parse(params, "bogus(x)+y")->dump());
EXPECT_EQUAL("[bogus]...[unknown symbol: 'bogus']...[(x)+y]", Function::parse(params, "bogus(x)+y", MySymbolExtractor())->dump());
EXPECT_EQUAL("[bogus(x)]...[unknown symbol: 'bogus(x)']...[+y]", Function::parse(params, "bogus(x)+y", MySymbolExtractor({'(', ')'}))->dump());
TEST(FunctionTest, require_that_unknown_function_works_as_expected__with_custom_symbol_extractor)
Copy link
Member

Choose a reason for hiding this comment

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

nit: double underscore due to double space

Copy link
Member

@vekterli vekterli left a comment

Choose a reason for hiding this comment

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

👍

@toregge toregge merged commit dd28815 into master Feb 19, 2025
3 checks passed
@toregge toregge deleted the toregge/rewrite-eval-unit-tests-to-gtest-pass-1 branch February 19, 2025 12:59
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.

2 participants