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

Unit tests - internal/scorer/value #258

Merged
merged 5 commits into from
Jan 10, 2023

Conversation

nathannaveen
Copy link
Contributor

  • Added unit tests for internal/scorer/value

Signed-off-by: nathannaveen 42319948+nathannaveen@users.noreply.github.com

- Added unit tests for internal/scorer/value

Signed-off-by: nathannaveen <42319948+nathannaveen@users.noreply.github.com>
"testing"
)

func TestExistsCondition(t *testing.T) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think TestExistsCondition and TestNotCondition can be combined into a single test e.g. TestCondition.

Rather than "f", have "condition" and specify the condition in each test struct.

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 have combined TestExistsCondition and TestNotCondition into one test called TestCondition. But I don't understand what you mean by

"Rather than "f", have "condition" and specify the condition in each test struct."

Could you please clarify?

internal/scorer/algorithm/value_test.go Outdated Show resolved Hide resolved
Signed-off-by: nathannaveen <42319948+nathannaveen@users.noreply.github.com>
Signed-off-by: nathannaveen <42319948+nathannaveen@users.noreply.github.com>
@nathannaveen
Copy link
Contributor Author

@calebbrown, a friendly ping!

@calebbrown calebbrown merged commit 2579b07 into ossf:main Jan 10, 2023
nathannaveen added a commit to nathannaveen/criticality_score that referenced this pull request Feb 9, 2023
* Unit tests - internal/scorer/value

- Added unit tests for internal/scorer/value

Signed-off-by: nathannaveen <42319948+nathannaveen@users.noreply.github.com>

* Updated based on code review comments

Signed-off-by: nathannaveen <42319948+nathannaveen@users.noreply.github.com>

* Renamed function

Signed-off-by: nathannaveen <42319948+nathannaveen@users.noreply.github.com>

Signed-off-by: nathannaveen <42319948+nathannaveen@users.noreply.github.com>
Co-authored-by: Caleb Brown <calebbrown@google.com>
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.

None yet

2 participants