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

Remove legacy tests #360

Merged
merged 2 commits into from
Jan 9, 2024
Merged

Remove legacy tests #360

merged 2 commits into from
Jan 9, 2024

Conversation

dbanck
Copy link
Member

@dbanck dbanck commented Jan 8, 2024

This PR deletes the converted legacy tests for the recently deleted expressions in #354.

Coverage

Pre removal
ok      github.com/hashicorp/hcl-lang/decoder   2.683s  coverage: 84.8% of statements


After removal
ok      github.com/hashicorp/hcl-lang/decoder   2.385s  coverage: 83.7% of statements


Keeping the hook tests
ok      github.com/hashicorp/hcl-lang/decoder   2.186s  coverage: 84.6% of statements

We lose a little bit of coverage in some functions, but only about 0.2% overall. I can look into that more if you think it's important to cover those branches.

expr_literal_type_semtok.go:16:           SemanticTokens                          91.4% --> 89.7%
expr_literal_value_hover.go:17:           HoverAtPos                              83.2% --> 82.2%
expr_literal_value_semtok.go:15:          SemanticTokens                          81.3% --> 80.4%           
expr_object_completion.go:21:             CompletionAtPos                         90.3% --> 88.9%
expr_object_hover.go:16:                  HoverAtPos                              96.0% --> 92.0%
expr_reference_completion.go:15:          CompletionAtPos                         97.1% --> 94.3%
expression.go:272:                        rawObjectKey                            82.6% --> 78.3%
expression_candidates.go:392:             labelForLiteralValue                    92.0% --> 90.0%
semantic_tokens.go:132:                   isPrimitiveTypeDeclaration              85.7% --> 71.4%

I can send you the html coverage report, if you want to dig deeper.

@dbanck dbanck self-assigned this Jan 8, 2024
@dbanck dbanck requested a review from a team as a code owner January 8, 2024 16:20
Copy link
Member

@radeksimko radeksimko left a comment

Choose a reason for hiding this comment

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

I can send you the html coverage report, if you want to dig deeper.

We can always generate it later if we need as the code will be in git history, so don't worry about it.

decoder/expression_candidates_test.go Show resolved Hide resolved
@dbanck dbanck force-pushed the c-remove-legacy-tests branch from 4767de9 to 25d912b Compare January 8, 2024 16:26
@dbanck dbanck requested a review from radeksimko January 9, 2024 10:00
@dbanck dbanck merged commit 8067e8d into main Jan 9, 2024
5 checks passed
@dbanck dbanck deleted the c-remove-legacy-tests branch January 9, 2024 10:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants