Skip to content

Fix parsing of underlined headers#411

Merged
kaklakariada merged 25 commits into
feature/378_rst_importerfrom
feature/278_rst_importer-add-tests
Jun 2, 2024
Merged

Fix parsing of underlined headers#411
kaklakariada merged 25 commits into
feature/378_rst_importerfrom
feature/278_rst_importer-add-tests

Conversation

@kaklakariada

Copy link
Copy Markdown
Contributor

No description provided.

Comment on lines -10 to -11
/** We are outside any specification item */
OUTSIDE,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Replaced with START to simplify state machines

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.

Sure that there was no transition between start and outside? When the first line was hit?

I must admit I forgot why I introduced that. Too long ago.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The behavior of START and OUTSIDE was the same. And tests are still green ;)

@kaklakariada kaklakariada requested a review from redcatbear May 31, 2024 14:35
Comment on lines -10 to -11
/** We are outside any specification item */
OUTSIDE,

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.

Sure that there was no transition between start and outside? When the first line was hit?

I must admit I forgot why I introduced that. Too long ago.

static Stream<Arguments> testCases()
{
return Stream.of(
testCase(null, null, null),

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.

You could define TITLE_NOT_RECOGNIZED as null to make the test definition clearer. Similar in other cases.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Now I use a separate method titleNotRecongnized to avoid repeating the parameter ;)

.description("Item 1 description")
.location("file", 2 + titleLocationOffset)
.build(),
item().id(SpecificationItemId.createId("req", "item2", 1))

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.

👍 Good test!

Indentation looks strange, though.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The formatter did it ;) Is it better now?

@sonarqubecloud

sonarqubecloud Bot commented Jun 2, 2024

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
68.4% Coverage on New Code (required ≥ 80%)

See analysis details on SonarCloud

@kaklakariada kaklakariada merged commit efb776b into feature/378_rst_importer Jun 2, 2024
@kaklakariada kaklakariada deleted the feature/278_rst_importer-add-tests branch June 2, 2024 08:13
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