Skip to content

tests: added parser tests#26

Open
WojtussToKox wants to merge 3 commits into
mainfrom
tests/parser-tests
Open

tests: added parser tests#26
WojtussToKox wants to merge 3 commits into
mainfrom
tests/parser-tests

Conversation

@WojtussToKox

Copy link
Copy Markdown
Contributor

Created most tests for parser

@WojtussToKox WojtussToKox linked an issue Jun 18, 2026 that may be closed by this pull request
EXPECT_EQ(result->getExperimentName(), "MojProjekt");
}

TEST(ParserSceneNameTest, EmptyProjectNameIsPreserved) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

creating project with empty name should not be allowed, throw some error instead

Comment on lines 49 to 50
auto* comp = obj->add_components();
comp->mutable_blinker()->set_blink_frequency_hz(static_cast<double>(i));

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

is it necessary for this test to add components to object?

}

// Grupa: Parser -- scenariusze brzegowe
TEST(ParserEdgeCaseTest, ObjectWithEmptyNameIsParsed) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

this should also not be allowed

EXPECT_EQ(result->getObjects()[0]->components.size(), 1u);
}

TEST(ParserEdgeCaseTest, ParseReturnsDifferentObjectEachCall) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

spelling error - change from ParseReturnsDifferentObjectEachCall to ParserReturnsDifferentObjectEachCall

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.

Test Parser

2 participants