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

refactor generator #121

Merged
merged 3 commits into from
Jun 15, 2024
Merged

Conversation

ccoVeille
Copy link
Contributor

@ccoVeille ccoVeille commented Jun 9, 2024

  • gen: move assertion sorter to a function so it could be reused
  • bool_compare: refactor tests

These commits were part of #107 and #111 that were suggested changes were discarded, but the refactoring made in each PR could be kept as discussed here

@coveralls
Copy link

coveralls commented Jun 9, 2024

Pull Request Test Coverage Report for Build 9436791382

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 93.611%

Totals Coverage Status
Change from base Build 9431505288: 0.0%
Covered Lines: 2110
Relevant Lines: 2254

💛 - Coveralls

@ccoVeille
Copy link
Contributor Author

ccoVeille commented Jun 13, 2024

@ccoVeille
Copy link
Contributor Author

@Antonboom do you think we could merge this one, it would help me to refactor for

internal/testgen/main.go Outdated Show resolved Hide resolved
internal/testgen/gen_bool_compare.go Outdated Show resolved Hide resolved
Assertion{Fn: "False", Argsf: "foo != foo"},
)

invalidAssertionsForTrue := make([]Assertion, 0)
Copy link
Owner

Choose a reason for hiding this comment

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

var

)

invalidAssertionsForTrue := make([]Assertion, 0)
invalidAssertionsForFalse := make([]Assertion, 0)
Copy link
Owner

Choose a reason for hiding this comment

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

var

internal/testgen/gen_compares.go Outdated Show resolved Hide resolved
internal/testgen/gen_useless_assert.go Show resolved Hide resolved
)
}

sortAssertions(invalidAssertionsForTrue)
Copy link
Owner

Choose a reason for hiding this comment

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

any reason to sort it?
the order of assertions is determined

safe this PR from unrelated changes around generated test files

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will remove it then

internal/testgen/gen_compares.go Outdated Show resolved Hide resolved
@ccoVeille ccoVeille force-pushed the refactor-generator branch from 63fab08 to 9cf6c96 Compare June 14, 2024 06:00
@coveralls
Copy link

coveralls commented Jun 14, 2024

Pull Request Test Coverage Report for Build 9511399411

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 93.611%

Totals Coverage Status
Change from base Build 9431505288: 0.0%
Covered Lines: 2110
Relevant Lines: 2254

💛 - Coveralls

@ccoVeille
Copy link
Contributor Author

I pushed too fast sorry.

I will fix other too

@ccoVeille ccoVeille force-pushed the refactor-generator branch from 9cf6c96 to c6c18dd Compare June 14, 2024 08:35
@coveralls
Copy link

coveralls commented Jun 14, 2024

Pull Request Test Coverage Report for Build 9513179523

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 93.611%

Totals Coverage Status
Change from base Build 9431505288: 0.0%
Covered Lines: 2110
Relevant Lines: 2254

💛 - Coveralls

@ccoVeille ccoVeille force-pushed the refactor-generator branch from c6c18dd to 8ade9bf Compare June 14, 2024 08:38
@ccoVeille
Copy link
Contributor Author

I resolved all your comments @Antonboom please check and review.

The number of changes is then very limited

@coveralls
Copy link

coveralls commented Jun 14, 2024

Pull Request Test Coverage Report for Build 9513220198

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 93.611%

Totals Coverage Status
Change from base Build 9431505288: 0.0%
Covered Lines: 2110
Relevant Lines: 2254

💛 - Coveralls

@coveralls
Copy link

coveralls commented Jun 15, 2024

Pull Request Test Coverage Report for Build 9525679838

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 93.611%

Totals Coverage Status
Change from base Build 9431505288: 0.0%
Covered Lines: 2110
Relevant Lines: 2254

💛 - Coveralls

@Antonboom Antonboom merged commit c1346cf into Antonboom:master Jun 15, 2024
3 checks passed
@ccoVeille ccoVeille deleted the refactor-generator branch June 15, 2024 10:03
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.

3 participants